Skip to content

Instantly share code, notes, and snippets.

@Suzhou65
Created September 14, 2020 08:26
Show Gist options
  • Save Suzhou65/f7d994d12b7939c586c78c58e5a2968a to your computer and use it in GitHub Desktop.
Save Suzhou65/f7d994d12b7939c586c78c58e5a2968a to your computer and use it in GitHub Desktop.
Ubuntu 14.04 install PPTP VPN configuration

Network configuration

sudo cd /etc/
sudo vim sysctl.conf

Editing Network configuration

sudo cd /etc
sudo vim pptpd.conf

Editing following configuration

net.ipv4.ip_forward=1

Restart service

sudo sysctl -p

It will echo

net.ipv4.ip_forward=1

Editing Iptables

sudo vim Iptables

Add following configuration

sudo iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j MASQUERADE

Iptables configuration will reset after reboot, so editing rc.local

iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j MASQUERADE

add this before exit 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment