Sunday, 21 June 2009

PPTP client with Slackware 12/13/13.1

This works with my remote router with vpn enabled.

Get necessary info for your connection:
* vpn server name or ip
* vpn account (username & password)
* name for the connection: myvpn (u can name it to whatever you like)

Modified the following files:
* /etc/ppp/chap-secrets

# cat /etc/ppp/chap-secrets
your_username server_name your_pwd *

* /etc/ppp/options.pptp
# cat /etc/ppp/options.pptp
lock
noauth
#refuse-eap
#refuse-chap
#refuse-mschap
nobsdcomp
nodeflate

Created the following file
* /etc/ppp/peers/myvpn
* /etc/ppp/ip-up (also chmod +x /etc/ppp/ip-up)
* create symbol link /bin/ip to /sbin/ip


# cat /etc/ppp/peers/myvpn (this depends on your remote vpn configs)
pty "pptp server_ip --nolaunchpppd"
name your_username
remotename server_name/ip_address
require-mschap
require-mschap-v2
file /etc/ppp/options.pptp
ipparam myvpn


#cat /etc/ppp/ip-up
#!/bin/sh
/sbin/route add -net REMOTE_NET_IP netmask REMOTE_NET_MASK gw DEFAULT_GATEWAY dev ppp0

execute the following command to connect
# pppd call myvpn dump debug logfd 2 nodetach

No comments: