Total Pageviews

Friday 28 December 2012

VNP client In Debian/ubuntu

In Debian, you can connect to VNP server by using PPTP or PPPoE.
apt-get install pptp-linux ppp pppconfig
How to config ?
A . PPTP :
You can look over my files config.
1. /etc/ppp/peers/pptp
————————————
persist
pty “/usr/sbin/pptp 172.16.32.126 –nolaunchpppd”
name username
ipparam pptp
remotename pptp
file /etc/ppp/options.pptp
————————————
whereis 172.16.32.126 is my VNP server.
username is register usernames VPN server.
2. /etc/ppp/options.pptp
———————————
lock
noauth
nobsdcomp
nodeflate
———————————
3. /etc/ppp/chap-secrets
———————————
username    *       password    *
———————————
B. PPPoE
My config files :
1. /etc/ppp/pppoe
———————————–
persist
pty “/usr/sbin/pppoe -I eth0 -T 80 -C 172.16.0.11″
name pocolomos
ipparam pppoe
file /etc/ppp/options.pppoe
———————————–
2. /etc/ppp/options.pppoe
——————————–
lock
noauth
noproxyarp
nodefaultroute
nobsdcomp
nodeflate
nopredictor1
mru 1500
mtu 1492
maxfail 1024
——————————–
3. /etc/ppp/chap-secrets (same as above).
How to run ?
First add auto run scripts in /etc/ppp/ip-up.d/ when ever you connect to VNP server and /etc/ppp/ip-down.d/ when you disconnect from server. Simple i add route default to active PPP device (ppp0,ppp1,….).
/etc/ppp/ip-up.d/route
——————–
#!/bin/sh
route add default ppp0
——————–
ppp0 is my [first/default] VPN interface.
/etc/ppp/ip-down.d/route
———————————
#!/bin/sh
route add default eth0
———————————
eth0 is my ethernet interfaces.
Don’t forget chmod +x to its.
It’s time to test your connection. With root privilege type
#pon pptp /* using pptp */
#pon pppoe /* using pppoe */
To disconnect :
#poff pptp or # poff pppoe
pptp and pppoe is name files in dir …/peers/
see routes : netstat -rn