Skip to main content
Home
badllama.com
  • Search
  • Log In

PPTP Server on Ubuntu

bchavet's picture

Fri, 11/09/2012 - 12:47 by bchavet

Install pptpd

aptitude install pptpd

edit /etc/pptpd.conf, and set localip and remoteip (at the bottom)

localip 10.108.98.1
remoteip 10.108.98.2-254

Add the VPN users to /etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client    server  secret          IP addresses
user1       pptpd   password        *

Enable IP forwarding in /etc/sysctl.conf

net.ipv4.ip_forward=1

Make that setting live

sysctl -p

Configure iptables masquerading

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

And, if iptables is blocking traffic, the following rules will open up pptpd

iptables -A INPUT -p tcp -m tcp --dport 1723 -j ACCEPT
iptables -A INPUT -p gre -j ACCEPT
iptables -A FORWARD -j ACCEPT
Powered by Backdrop CMS