Feb 122011
 

Searched online and here comes what I did:

  1. Install pptpd, ufw
  2. change /etc/pptpd.conf to enable localip and remoteip
  3. change /etc/ppp/chap-secrets to add user name and password
  4. change /etc/ppp/pptpd-options to enable ms-dns
  5. change sysctl.conf to set net.ipv4.ip_forward=1
  6. change /etc/default/ufw to set DEFAULT_FORWARD_POLICY=”ACCEPT”
  7. change /etc/ufw/before.rules
    # nat Table rules
    *nat
    :POSTROUTING ACCEPT [0:0]
    
    # Allow forward traffic from eth0:0 to eth0
    -A POSTROUTING -s 172.16.123.0/24 -o eth0 -j MASQUERADE
    
    COMMIT
  8. ufw allow TCP connection on port 47 and 1723 (surely you want to enable others if you run other services like HTTPd on this host as well)

pretty much this is what I have done, restart, and everything should be up and running.

  3 Responses to “Setup PPTP on Ubuntu”

  1. I missed “COMMIT” in my 2nd round setup (just for making sure all instructions here are enough) and it leads to protocol 47 problem.

  2. I’ve been trying to get this going in my VPS, but haven’t had much luck. In the before.rules file, what IP is that you have listed? Is it your server’s IP range? Or your VPN client IP range? On my server, I have a public IP, and an ip rage of 10.1.0.1-20 for vpn clients, which do I put in this file?

  3. IP range listed in before.rules matches the one in /etc/pptpd.conf, mine looks like this:

    # (Recommended)
    localip 172.16.123.1
    remoteip 172.16.123.101-200

    so it’s actually the client IP range.

Sorry, the comment form is closed at this time.