LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs > neonsignal
User Name
Password

Notices

Rate this Entry

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:
Code:
{username} PPTP {password} *
Then create a PPTP connection file /etc/ppp/peers/{tunnel} (any tunnel name will do):
Code:
pty "pptp {server} --nolaunchpppd"
name {username}
remotename PPTP
file /etc/ppp/options.pptp
ipparam {tunnel}
require-mppe
Then create a PPP routing file /etc/ppp/ip-up.d/{tunnel}:
Code:
#!/bin/sh
if [ "${PPP_IPPARAM}" = "{tunnel}" ]; then
   route add -net 192.168.10.0/24 dev ${IFNAME}
fi
And make it executable:
Code:
chmod +x /etc/ppp/ip-up.d/{tunnel}
Now the tunnel can be opened and closed using pon/poff:
Code:
pon {tunnel}
poff {tunnel}
Posted in Uncategorized
Views 436 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 08:32 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration