jabka |
04-29-2007 04:40 PM |
pptp connection script (guide)
Hello,...
few months ago i worked on cstart (a pptp script) to make it work with other ISPs i worte a guide and a small script.
i need help to make it work on BSD.
before you start:
if you don't have network you should get it:
Quote:
deb : google for pptp-linux.deb
urpmi : google fot pptp-linux.rpm
|
what with BSD
get your ISP PNS or DNS alternative use it's IP
after booting/chroting what ever ..
on Debian Based:
Code:
apt-get install pptp-linux
on MDV based (Mandriva,Ehad etc ... )
on BSD:
Code:
cd /usr/ports/net/pptpclient
make install
now edit your /etc/ppp/pap-secrets please mention if the place path is diffrent
Code:
username * password
"username" * "password"
figure out your eth cards:
now create/edit file in /usr/bin/cable_connect:
Code:
#!/bin/bash
USERNAME=username
IF=eth0 you may have edhX ot rtX
/sbin/ifdown $IF
/sbin/ifup $IF
CABLEGW=`/sbin/route -n | grep ^0.0.0.0 | awk '{print $2}'`
/sbin/route add -host pns.barak.net.il gw $CABLEGW #you could use any provider adrs
/sbin/route del default
/usr/sbin/pptp pns.barak.net.il debug user $USERNAME mtu 1460 mru 1460 defaultroute usepeerdns noauth
Errors and what to do :
if for some reason you don't have ppp running run it by
if you have can send packets but can get them:
Quote:
when you ping some adrs you see X sent to the proper IP
your routing table is bad or ppp is has issues
restart pppd.
restart eternet cards (/etc/init.d/networking restart)(will this work on bsd ?)
delete the routing table by : route del default
rerun the script.
|
if you get a strage IP (172.X.X.X) your password or user are incorrect.
Quote:
check /etc/ppp/pap-secrets
|
|