On Friday 07 January 2005 14:13, Oron Peled wrote:
> On Friday 07 January 2005 10:15, Danny Lieberman wrote:
> > 1. Altho I get a PPP address and teh DNS addresses of 013 - I CANT ping
> > anything - get network unreachable
>
> Good. This error means you have problem in *your* routing
> table. You probably don't have a default route.

I had a similar problem with pptp on my new computer. Since no-one on the list 
was able to solve it, I wrote a script to re-set the default route. I still 
have no idea why the default route doesn't get set up automatically (as it 
did on my previous computer). In any case, maybe this script can solve Danny 
Lieberman's problem.

BTW - I'm sure there must be other or better ways to write the script, but it 
works, and I guess that's the important thing. All the commands used are 
standard except for splitpea which is a nice file spliiting utility you can 
get here: http://www.doxxx.net/splitpea.html


Here's the script::

#!/bin/bash
## create route command after running pptp

## get the IP addresses and remove extra text
ifconfig|grep  P-t-P|sed 's/inet addr://; s/Mask:255.255.255.255//; 
s/P-t-P://' > /tmp/tst-IP

## cut out the inet address so only the P-t-P address is left
/home/solomon/bin/splitpea -s --bytes=22 /tmp/tst-IP

## set an ENV variable
MYIP=`cat /tmp/tst-IP.002`

## create executable script
echo "#!/bin/bash"                             > /home/solomon/bin/myroute
echo "route add -net default gw" $MYIP "ppp0" >> /home/solomon/bin/myroute
chmod +x /home/solomon/bin/myroute

## and run it
/home/solomon/bin/myroute



good luck


-- 
Shlomo Solomon
http://come.to/shlomo.solomon
Sent by KMail 1.7.1 (KDE 3.2.3) on LINUX Mandrake 10.1



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to