LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 775 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration