LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

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

Rep: Reputation: 31
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 ... )
Code:
urpmi pptp-linux
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:
Quote:
ifconfig as superuser
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
Code:
/usr/sbin/pppd
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

Last edited by jabka; 04-30-2007 at 03:25 PM.
 
Old 05-01-2007, 12:53 PM   #2
jabka
Member
 
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 ..
 
  


Reply


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 06:59 PM
Unusual piece of bash script code raypen Slackware 2 03-18-2006 10:49 PM
make a bash script accesible from anywhere in the system osio Programming 9 09-20-2005 02:33 PM
Bash Script - How do I make sure my program is still running? nro Linux - Newbie 4 08-28-2005 01:57 PM
BASH problems: "configure, make, make install" commands don't work ditch* Linux - General 3 07-19-2005 04:37 PM


All times are GMT -5. The time now is 05:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration