pptp on Ubuntu server can't ping other machines on the LAN

12,034

Solution 1

What are you using for a pptp client on Ubuntu? Have you enabled the ppp option to set the tunnel as the default gateway in the pptp client? When the VPN is enabled on the Ubuntu server do it still need to be usable from the network that is local to the Ubuntu server? If so you won't want to set the VPN as a default gateway and you will probably want to statically define a route.

However, I cannot ping other machines on the local LAN.

Which local lan are you talking about? Are you talking about the lan local to the Ubuntu server, or the lan local to the VPN server?

If you need clients that are on the same network as the VPN server to be able to access other hosts on the Ubuntu server's lan you will need to add a route on both sides. You will also need to have address space that doesn't conflict between the two networks.

Solution 2

I had success adding a route after connection, where 192.168.10.0 is the machine I'm trying to connect to, and 255.255.255.0 is the submask of the network:

route add -net 192.168.10.0 netmask 255.255.255.0 dev ppp0

See PPTP Client Routing for more details - you can also add scripts to /etc/ppp/ip-up.d/ to set up routes automatically on connection, detailed further down the page here.

Solution 3

What's the output of route on the Ubuntu server? What's some more information about your VPN? Which pptp client are you using on Ubuntu?

Share:
12,034

Related videos on Youtube

shaiss
Author by

shaiss

I’m a small time developer and IT guru. Below are just some of the projects I’m involved with or have been. Those that have talked to me know that I am always willing to help anyone with no obligations so long as I have the time. I have no formal training in web development aside from a few classes I took. Everything else I’ve learned on my own through hard work and the kind guidance of others. I strongly believe that one person can make a difference but it takes many to appreciate that difference.

Updated on September 17, 2022

Comments

  • shaiss
    shaiss over 1 year

    We have a simple pptp setup on our windows 2k3 server. So far all clients can connect just fine, mac and windows.

    However I tried connecting an ubuntu server using pptp and the connection is fine I get an IP. From the 2k3 server I can ping the remote ubuntu server and vice versa. However, I cannot ping other machines on the LAN local to the VPN Server. <--Edited in response to Zoredache

    I'm not sure if I have something misconfigured somewhere. Anyone have any experience with pptp on Ubuntu Server?

    Maybe something I need to set up routing after connecting?

    Under the win2k3 policies we just have a usergroup of users able to access the VPN and other machines on the NET. The user connecting is part of that group.

    Update in response to questions below:
    Output of route before connecting vpn

    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    66.104.92.192   *               255.255.255.224 U     0      0        0 eth0
    default         ip66-104-92-193 0.0.0.0         UG    100    0        0 eth0
    

    Out of route after connecting vpn

    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.1.60    *               255.255.255.255 UH    0      0        0 ppp0
    66.104.92.192   *               255.255.255.224 U     0      0        0 eth0
    default         ip66-104-92-193 0.0.0.0         UG    100    0        0 eth0
    

    I'm using pptp on Ubuntu 8.04 LTS My global config file on the ubuntu server and my connection config file:

    # PPTP Tunnel configuration for tunnel CSTS MotherShip
    # Server IP: xxx.xxx.xxx.xxx #masked for security
    name shai
    file /etc/ppp/options.pptp
    require-mppe
    require-mppe-128
    

    /etc/ppp/options.pptp doesn't exist

    In response to Zoredache: I don't need LAN machines on the VPN servers side to access anything but the remote ubuntu pptp client. On the Ubuntu machine's LAN, other machines don't need to access it.

    Have you enabled the ppp option to set the tunnel as the default gateway in the pptp client?
    I'm looking where to enable that option. I'm using pptp 1.7.0

    Another Update
    After conntecting via VPN, on the Ubuntu server I ran:
    route add default gw 192.168.1.1 and got back SIOCADDRT: No such process. 192.168.1.1 is the router on the LAN local to the VPN server.

  • shaiss
    shaiss over 14 years
    please see my comments above
  • shaiss
    shaiss over 14 years
    please see my comments above
  • shaiss
    shaiss over 14 years
    Thank you for pointing me in the right direction. The key was to add the folowing route add default gw 192.168.1.xxx after the vpn connection was established. xxx being our VPN servers IP. Thank you!
  • Cereal
    Cereal over 7 years
    To add on to this, you have to rerun this every time you connect to the VPN (or I did). You can add that line to your pptp