Very fast urgent setup PPTP VPN Server on Debian system
1 2 |
sudo apt–get update sudo apt–get upgrade |
Add to /etc/network/interfaces
1 2 3 4 5 6 7 8 |
# VPN auto eth0:1 iface eth0:1 inet static address 192.168.0.1 netmask 255.255.255.0 post-up /etc/nat sudo service networking restart |
Add to /etc/resolv.conf
1 2 |
nameserver 8.8.8.8 nameserver 8.8.4.4 |
And add to /etc/nat
1 2 3 4 5 6 7 |
#!/bin/sh echo 1 > /proc/sys/net/ipv4/ip_forward # Enable forwarding iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE sudo chmod +x /etc/nat sudo apt-get install pptpd |
Edit /etc/pptpd.conf
1 2 3 |
option /etc/ppp/pptpd-options localip 192.168.0.1 remoteip 192.168.0.100-200 |
And edit /etc/ppp/pptpd-options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
auth name pptpd refuse-pap refuse-chap refuse-mschap require-mschap-v2 require-mppe-128 ms-dns 8.8.8.8 ms-dns 8.8.4.4 proxyarp nodefaultroute debug lock nobsdcomp |
Add accounts to /etc/ppp/chap-secrets
1 2 3 4 |
# client server secret IP addresses user pptpd password “*” sudo service pptpd restart |
That’s all, folks!
But it’s best to spend more time and configure OpenVPN 😉
Enjoy and stay tuned!