Print Story linux networking
Software
By theantix (Sun Jan 21, 2007 at 04:41:12 PM EST) (all tags)
Anyone here have some expertise in the world of linux networking?  I'm having a hell of a time connecting to my work VPN using PPTP.  Fun times with "route" ahead.

Update [2007-1-21 18:7:21 by theantix]: ni, ruler of the known universe, solved this problem for me. Did I mention he rules?



There are three ways that I know of to connect to a PPTP VPN from linux.  One is using the pptp-linux programs manually, another is to use pptpconfig gui, and the other is to use the NetworkManger pptp plugin.  I've had no luck with any of these, though with all three I've got most of the way there.

Before I connect to anything, I do a route:

ryan@homet0p:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
1.2.3.4     *               255.255.255.252 U     0      0        0 eth1
default         1-2-3-4.tuk 0.0.0.0         UG    0      0        0 eth1

I then connect to the work VPN via any of the three methods listed above.  route now looks like this:

ryan@homet0p:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
vpn2.domain     1-2-3-4.tuk 255.255.255.255 UGH   0      0        0 eth1
1.2.3.4     *               255.255.255.252 U     0      0        0 eth1
10.0.0.0        *               255.255.255.0   U     0      0        0 ppp0
default         1-2-3-4.tuk 0.0.0.0         UG    0      0        0 eth1

Now comes the fun part where I try to ping something inside the work intranet.

ryan@homet0p:~$ ping 1.2.3.4
PING 1.2.3.4 (1.2.3.4) 56(84) bytes of data.
From 1.2.3.4 icmp_seq=1 Destination Net Unreachable

ryan@homet0p:~$ ping 1.2.3.4 -I ppp0
PING 1.2.3.4 (1.2.3.4) from 1.2.3.4 ppp0: 56(84) bytes of data.
64 bytes from 1.2.3.4: icmp_seq=1 ttl=59 time=86.7 ms

As you see from that example, I'm connected just fine to the VPN because when I specify the ppp0 interface I can ping just fine.  Only when I leave out the interface specification am I unable to reach anything.

I think it has to do with the route specification, because the "From 1.2.3.4" in the failed example is somewhere in my ISP's network.  I feel like I'm 99% of the way there, but I don't know enough about the route command to get to the finish line.  I've tried adding a gateway to the 10.0.0.0 route, and messed around with the route default -- both with no success at all.

Any tips, advice, pointers... thanks!

Full discussion: http://www.hulver.com/scoop/story/2007/1/21/164112/769