You are not logged in.

#1 2008-08-27 04:49:35

n.paya
Member
Registered: 2008-06-10
Posts: 3

Problem with routing while using a pptp connection using KVPNC

Hi
I know there are a couple of questions regarding this matter and I read them all but couldn't make it work. In my work place, we use vpn connections for bandwidth usage monitoring. The server uses pptp so I decided to go with kvpnc with the pptp-client backend. The first time I configured the app, it worked like a charm but the day after that it just stopped working. I figured out there was a routing problem so I tried to manipulate the routing table but no luck. So here's the scenario. I have a LAN connection with 192.168.0.151 (255.255.255.0). In order to connect to the Internet I have to use a VPN connection, where my IP is 172.16.0.110. The problem is my computer doesn't realize I have connected to the VPN server so it still sends all requests through the LAN interface. This is my routing table after I connect to the Internet:

[navid@localhost ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask              Flags  Metric    Ref    Use    Iface
172.22.0.1      0.0.0.0             255.255.255.255   UH         0          0        0       ppp0
192.168.0.0    0.0.0.0             255.255.255.0        U           0          0        0       eth0
169.254.0.0    0.0.0.0             255.255.0.0            U           0          0        0       eth0
0.0.0.0            192.168.0.1     0.0.0.0                   UG         0          0        0       eth0

And here's a Windows client's route table after it connects to the VPN connection:

===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 16 e6 4a 35 58 ...... Broadcom NetLink (TM) Gigabit Ethernet - Packet Scheduler Miniport
0x60004 ...00 53 45 00 00 00 ...... WAN (PPP/SLIP) Interface
===========================================================================
===========================================================================
Active Routes:
Destination        Netmask            Gateway            Interface        Metric
0.0.0.0            0.0.0.0            172.16.0.100        172.16.0.100        1
0.0.0.0            0.0.0.0            192.168.0.1        192.168.0.11        21
80.191.243.25        255.255.255.255    192.168.0.1        192.168.0.11        20
127.0.0.0                255.0.0.0                127.0.0.1                127.0.0.1                1
72.16.0.100        255.255.255.255    127.0.0.1                127.0.0.1                50
172.16.255.255    255.255.255.255    172.16.0.100        172.16.0.100        50
192.168.0.0        255.255.255.0        192.168.0.11        192.168.0.11        20
192.168.0.11        255.255.255.255    127.0.0.1                127.0.0.1                20
192.168.0.255        255.255.255.255    192.168.0.11        192.168.0.11        20
224.0.0.0                240.0.0.0                192.168.0.11        192.168.0.11        20
224.0.0.0                240.0.0.0                172.16.0.100        172.16.0.100        1
255.255.255.255    255.255.255.255    172.16.0.100        172.16.0.100        1
255.255.255.255    255.255.255.255    192.168.0.11        192.168.0.11        1
Default Gateway:    172.16.0.100
===========================================================================
Persistent Routes:
None

I know the question has been asked before but I have really limited network knowledge, so PLEASE help.

Last edited by n.paya (2008-08-27 05:01:21)

Offline

#2 2008-08-27 05:06:44

n.paya
Member
Registered: 2008-06-10
Posts: 3

Re: Problem with routing while using a pptp connection using KVPNC

Another thing, when I traceroute 4.2.2.4 this is what I get:

1  192.168.0.1 (192.168.0.1)  1.667 ms  1.902 ms  1.509 ms
2  172.22.0.1 (172.22.0.1)  2.036 ms  1.639 ms  1.657 ms
3  80.191.243.10 (80.191.243.10)  1.849 ms  1.670 ms  2.045 ms

This is what the Windows client gets:

1   171 ms   199 ms   177 ms  172.22.0.1
2    75 ms     96 ms    102 ms  80.191.243.10

Offline

#3 2008-10-18 04:05:57

n.paya
Member
Registered: 2008-06-10
Posts: 3

Re: Problem with routing while using a pptp connection using KVPNC

Hi
I started this thread but got no response so I guess it has something to do with the way I asked my question. So here it goes once again. I need to connect using a VPN connection at my work. The problem is when I connect using KVPNC it doesn't add the right route so I still can't get to the Internet. Can you give me some guidance what route to add for the new connection? Pleasssssseeee help. I'm really going insane.

Offline

#4 2008-10-18 06:31:43

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: Problem with routing while using a pptp connection using KVPNC

Yes, your routing is wrong. The first route in your initial post (the only one referring to ppp0) and your default route are faulty. You need to remove both of them, and then add a new default route.

From an empty routing table, it should be enough to do:

route add -net 192.168.0.0/24 eth0
route add default ppp0

I don't know how to empty the routing table in one go, but you remove the exising ones with various invocations of route del <route>.

You should be able to do all this route fixing in /etc/ppp/ip-up (and when taking the tunnel down, in /etc/ppp/ip-down) if kvpnc is only a frontend for pptp/ppp.

Offline

Board footer

Powered by FluxBB