Welcome to the most active Linux Forum on the web.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 04-29-2007, 05:40 PM   #1
Registered: Sep 2005
Distribution: Debian unstable && Kazit (reformated knoppix)
Posts: 194

Rep: Reputation: 31
pptp connection script (guide)

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:
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:
apt-get install pptp-linux
on MDV based (Mandriva,Ehad etc ... )
urpmi pptp-linux
on BSD:
cd /usr/ports/net/pptpclient
make install
now edit your /etc/ppp/pap-secrets please mention if the place path is diffrent
username * password
"username" * "password"
figure out your eth cards:
ifconfig as superuser
now create/edit file in /usr/bin/cable_connect:

IF=eth0               you may have edhX ot rtX 
/sbin/ifdown $IF
/sbin/ifup $IF
CABLEGW=`/sbin/route -n | grep ^ | awk '{print $2}'`
/sbin/route add -host gw $CABLEGW #you could use any provider adrs
/sbin/route del default
/usr/sbin/pptp 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:
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.
check /etc/ppp/pap-secrets

Last edited by jabka; 04-30-2007 at 04:25 PM.
Old 05-01-2007, 01:53 PM   #2
Registered: Sep 2005
Distribution: Debian unstable && Kazit (reformated knoppix)
Posts: 194

Original Poster
Rep: Reputation: 31
i can't change the thread name but i gues it should be pptp connection guide ..


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
A better way to make a bash script run on boot helptonewbie Linux - General 6 09-13-2006 07:59 PM
Unusual piece of bash script code raypen Slackware 2 03-18-2006 11:49 PM
make a bash script accesible from anywhere in the system osio Programming 9 09-20-2005 03:33 PM
Bash Script - How do I make sure my program is still running? nro Linux - Newbie 4 08-28-2005 02:57 PM
BASH problems: "configure, make, make install" commands don't work ditch* Linux - General 3 07-19-2005 05:37 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 01:24 AM.

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