manually setting up a VPN tunnel (PPTP)
Posted 05-11-2011 at 11:30 PM by neonsignal
Creating a VPN tunnel involves setting up a few configuration files.
First add a line to /etc/ppp/chap-secrets. This has four columns:
Then create a PPTP connection file /etc/ppp/peers/{tunnel} (any tunnel name will do):
Then create a PPP routing file /etc/ppp/ip-up.d/{tunnel}:
And make it executable:
Now the tunnel can be opened and closed using pon/poff:
First add a line to /etc/ppp/chap-secrets. This has four columns:
Code:
{username} PPTP {password} *
Code:
pty "pptp {server} --nolaunchpppd" name {username} remotename PPTP file /etc/ppp/options.pptp ipparam {tunnel} require-mppe
Code:
#!/bin/sh if [ "${PPP_IPPARAM}" = "{tunnel}" ]; then route add -net 192.168.10.0/24 dev ${IFNAME} fi
Code:
chmod +x /etc/ppp/ip-up.d/{tunnel}
Code:
pon {tunnel} poff {tunnel}
Total Comments 0