Arch Linux PPTP Vpn Connection

Config pptp exactly as arch linux wiki says except for the routing part.

1. Follow wiki steps

2. Routing

If you don’t know what route table is, see next section.

As arch wiki says, you just run ip route add default dev ppp0 to route all trafic through your VPN. But this may fail depending on the current route table of your system, if there’s already a default route, you should first delete it before adding a new one.

3. Understand route table

Most of the content of this section comes from this tutorial

Take the following route table as example (run route -n to get such output).

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    302    0        0 wlp2s0
69.90.184.209   192.168.1.1     255.255.255.255 UGH   0      0        0 wlp2s0
192.168.1.0     0.0.0.0         255.255.255.0   U     302    0        0 wlp2s0
192.168.1.100   127.0.0.1       255.255.255.255 UGH   302    0        0 lo

The meaning of each field is:

The first line of the above route table contains a destination of default (shown as 0.0.0.0), which means everything not alreay classified. In this case, everything not destined for 69.90.184.209, 192.168.1.100, 192.168.1.0/255.255.255.0 will be sent to 192.168.1.1 – which is the forwarding gateway – and the route to the internet. NOTE that only one default route is allowed at any given time, replacing the default route can be done by first deleting the current one and then adding a new one.

For 192.168.1.0/255.255.255.0 network, no gateway is specify, since it’s the local network which does not require a forwarding gateway.