LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] PPP Config

[ILUG] PPP Config

Conor Daly conor.daly at oceanfree.net
Sat Jun 15 18:27:01 IST 2002


On Sat, Jun 15, 2002 at 10:35:06AM +0100 or so it is rumoured hereabouts, 
Patrick Kiernan thought:
> I've setup my dial-up connection with pppconfig so to get online I type 
> "pon iol". I've given my
> normal user account access to do this also but everytime I connect I 
> still have to change to root and
> add the default gw otherwise I can't ping anywhere. The default gw being:
> 
> ppp0      Link encap:Point-to-Point Protocol
>           *inet addr:194.165.160.102*  P-t-P:194.145.128.243  
> Mask:255.255.255.255         
> UP POINTOPOINT RUNNING     NOARP MULTICAST  MTU:1500  Metric:1
>           RX packets:136 errors:2 dropped:0 overruns:0 frame:2
>           TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:10
>           RX bytes:70775 (69.1 Kb)  TX bytes:6201 (6.0 Kb)
> 
> The bit in bold there and since this changes everytime I connect, I have 
> to change it manually.

Yup.  If you do:

INET_ADDR=`/sbin/ifconfig ppp0 | grep "P-t-P" | cut -f 1 -d'P' | cut -f 2 -d ':'`
route add default gw $INET_ADDR

Stick those two lines in your pon script (assuming it's suid root already)
and away you go.  If the pon script isn't suid root, you'll need to
put these lines in a dedicated "setroute" script that _is_ suid root.

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  1:23pm  up 22 days, 22:41,  0 users,  load average: 0.08, 0.02, 0.01
Hobbiton.cod.ie
  1:30pm  up 22 days, 22:51,  2 users,  load average: 0.00, 0.06, 0.03




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell