Find the answer to your Linux question:
Results 1 to 5 of 5
There is a VPN server with following parameters ip address of eth0 192.168.18.141 VPN local address 192.168.18.141 (same as eth0's) <- cause of problem here VPN remote address 10.10.1.1-254 There ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3

    pptp with 2.4 kernel


    There is a VPN server with following parameters
    ip address of eth0 192.168.18.141
    VPN local address 192.168.18.141 (same as eth0's) <- cause of problem here
    VPN remote address 10.10.1.1-254

    There is a VPN client which is based on Red Hat (kernel 2.4.20-46.9) with pptp-linux-1.1.0-3mdk.i586.rpm installed. It allows me to connect the VPN server but ping VPN server fails.
    If I change VPN server's local address to another subnet (I can only do it with my server on test purpose) everything works fine. If I use another Linux distro with a new kernel everything is working fine too.

    It seems to me that problem is with routing when the pptp client connects the server it gets a route which says that the network 192.168.18.141 is available via ppp interface and the pptp client sends packets to itself by using the route.

    Have you any idea how to get it working without reconfiguring the server?

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    Would you please provide more information? In general this information is quite helpful when one needs to find routing problems:

    Code:
    tracepath <server>
    route
    ifconfig
    iptables -L
    Shouldn't the VPN local address be in the subnet of the VPN remote address (in your case 10.10.1.0/24)?

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3
    The VPN local address can be in anohter subnet but now I changed it to the same subnet (just to be sure)
    Before I start pptp connection I can ping vpn server address 192.168.18.124.
    iptables is clear and in permissive mode.

    cspgate:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 08:00:27:5C:1E5 <--directly connected to the vpn server
    inet addr:192.168.18.181 Bcast:192.168.18.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:52 errors:0 dropped:0 overruns:0 frame:0
    TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:7080 (6.9 Kb) TX bytes:4052 (3.9 Kb)
    Interrupt:10 Base address:0xd010 Memory:f0000000-f0020000

    eth1 Link encap:Ethernet HWaddr 08:00:27:6B:A0F
    inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)
    Interrupt:9 Base address:0xd240 Memory:f0820000-f0840000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:3 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:386 (386.0 b) TX bytes:386 (386.0 b)

    cspgate:~# route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.3.0 * 255.255.255.0 U 0 0 0 eth1
    192.168.18.0 * 255.255.255.0 U 0 0 0 eth0
    127.0.0.0 * 255.0.0.0 U 0 0 0 lo




    Then I start pptp connetction
    cspgate:~# pppd call vpnptp
    and I got a problem

    cspgate:~# route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.18.124 * 255.255.255.255 UH 0 0 0 ppp0 <---- I suppose trouble here
    192.168.3.0 * 255.255.255.0 U 0 0 0 eth1
    192.168.18.0 * 255.255.255.0 U 0 0 0 eth0
    127.0.0.0 * 255.0.0.0 U 0 0 0 lo
    default 192.168.18.124 0.0.0.0 UG 0 0 0 ppp0


    I suppose that it cannot distinguish which traffic should be directed trough ppp0 and which through eth0

    cspgate:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 08:00:27:5C:1E5
    inet addr:192.168.18.181 Bcast:192.168.18.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:172 errors:0 dropped:0 overruns:0 frame:0
    TX packets:133 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:19427 (18.9 Kb) TX bytes:16241 (15.8 Kb)
    Interrupt:10 Base address:0xd010 Memory:f0000000-f0020000

    eth1 Link encap:Ethernet HWaddr 08:00:27:6B:A0F
    inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)
    Interrupt:9 Base address:0xd240 Memory:f0820000-f0840000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:4 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:541 (541.0 b) TX bytes:541 (541.0 b)

    ppp0 Link encap:Point-to-Point Protocol
    inet addr:192.168.18.205 P-t-P:192.168.18.124 Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
    RX packets:7 errors:0 dropped:0 overruns:0 frame:0
    TX packets:72166 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:3
    RX bytes:84 (84.0 b) TX bytes:26300089 (25.0 Mb)

    cspgate:~# ping 192.168.18.124
    PING 192.168.18.124 (192.168.18.124) 56(84) bytes of data.

    [1]+ Stopped ping 192.168.18.124
    cspgate:~#

  4. #4
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3
    I found the solution
    route add -net 192.168.18.124 netmask 255.255.255.255 gw 192.168.18.124 dev eth0

  5. #5
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    In general the pptp should add the default route when the device comes up. Strange that it doesn't so. In fact I had some strange behaviour of pptp on my openwrt router. Back then, rebooting the router and restarting the iptables firewall, strangely fixed the symptoms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •