- (Optional) Scrap off all the junk you won't need if it is a new box:
wget -O master.tar.gz http://github.com/maxexcloo/Minimal/tarball/master; tar zxvf *.gz; cd *Minimal*; sh minimal.sh ssh
If you are still using only root (have its benefits when you are just setting up your server), you will probably need to re-enable root login. Edit /etc/ssh/sshd_config and find:PermitRootLogin no
PermitRootLogin yes
/etc/init.d/ssh restart
- Install PPTPD:
apt-get install pptpd
- Enable forwarding by editing /etc/sysctl.conf find:
#net.ipv4.ip_forward=1
net.ipv4.ip_forward=1
sysctl -p
- Towards the end of /etc/pptpd.conf, add, or uncomment these lines:
localip 10.84.1.1 remoteip 10.84.1.101-200
- Create your users by editing your /etc/ppp/chap-secrets file by adding it in the following format:
# Secrets for authentication using CHAP # client server secret IP addresses andy pptpd 1234 * john pptpd abcd *
- Create a new file which will manage the routing with iptables firewall by creating /etc/init.d/vpnforward :
#! /bin/sh case "$1" in start) iptables -A INPUT -p tcp --dport 1723 -j ACCEPT iptables -A INPUT -p 47 -j ACCEPT iptables -A FORWARD -i ppp+ -o vent0 -j ACCEPT iptables -t nat -A POSTROUTING -s 10.84.1.0/24 -j SNAT --to-source 127.0.0.1 echo "iptables entries for VPN forwarding added" ;; stop) echo "nothing to unload" ;; *) echo "Usage: /etc/init.d/vpnforward {start|stop}" exit 1 esac exit 0
chmod a+x /etc/init.d/vpnforward
update-rc.d vpnforward defaults
update-rc.d -f vpnforward remove
- Edit /etc/ppp/pptpd-options with the following options:
name pptpd refuse-pap refuse-chap refuse-mschap require-mschap-v2 require-mppe-128 proxyarp lock nobsdcomp novj novjccomp nologfd ms-dns 8.8.8.8 ms-dns 8.8.4.4
- Everything should be set and good to go now, give it a try!