HaltAndCatchFire
Senior Member
try linkname local without the ""
it should just work, lol![]()
cool!
Ok it said international, which is the name of my international link. No idea what to do next!
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
try linkname local without the ""
it should just work, lol![]()
cool!
Ok it said international, which is the name of my international link. No idea what to do next!
lol cool thanx, ok will hack at it a while and shout if it works and if I get totaly stuck!lol, man, I can't help 2 ppl at once!
use the script I wrote, but use case instead of if and linkname instead of IP![]()
196.209.16.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
for i in `cat /etc/ppp/routefile.txt | dos2unix` ; do if [[ $i =~ "/32" ]]; then echo route add -host $i gw 196.209.16.1; route add -host $i gw 196.209.16.1 ; fi ; done
route add -host 160.123.6.72/32 gw 196.209.16.1
route add -host 160.123.100.150/32 gw 196.209.16.1
route add -host 160.123.100.170/32 gw 196.209.16.1
route add -host 160.123.100.173/32 gw 196.209.16.1
route add -host 160.123.100.174/32 gw 196.209.16.1
route add -host 163.195.16.25/32 gw 196.209.16.1
route add -host 163.195.16.155/32 gw 196.209.16.1
route add -host 164.147.241.195/32 gw 196.209.16.1
route add -host 196.14.176.115/32 gw 196.209.16.1
route add -host 196.14.239.59/32 gw 196.209.16.1
route add -host 196.23.48.244/32 gw 196.209.16.1
route add -host 196.23.48.245/32 gw 196.209.16.1
route add -host 196.34.16.71/32 gw 196.209.16.1
route add -host 196.36.40.218/32 gw 196.209.16.1
196.34.0.0 196.209.64.1 255.254.0.0 UG 0 0 0 ppp0
163.202.0.0 196.209.64.1 255.254.0.0 UG 0 0 0 ppp0
164.146.0.0 196.209.64.1 255.254.0.0 UG 0 0 0 ppp0
196.208.0.0 196.209.64.1 255.252.0.0 UG 0 0 0 ppp0
164.148.0.0 196.209.64.1 255.252.0.0 UG 0 0 0 ppp0
41.240.0.0 196.209.64.1 255.248.0.0 UG 0 0 0 ppp0
10.0.0.0 196.209.64.1 255.0.0.0 UG 0 0 0 ppp0
0.0.0.0 196.209.64.1 0.0.0.0 UG 0 0 0 ppp1
0.0.0.0 196.209.64.1 0.0.0.0 UG 0 0 0 ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:196.209.69.147 P-t-P:196.209.64.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:586 errors:0 dropped:0 overruns:0 frame:0
TX packets:655 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:510664 (498.6 KiB) TX bytes:152183 (148.6 KiB)
ppp1 Link encap:Point-to-Point Protocol
inet addr:196.209.66.214 P-t-P:196.209.64.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:83 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:31095 (30.3 KiB) TX bytes:21129 (20.6 KiB)
case $IPLOCAL in
196.*)
echo $IPLOCAL >/etc/ppp/iplocal.txt
# route add route-server.is.co.za gw $IPREMOTE;
echo /32 routes go here > /etc/ppp/routes.log
echo other routes go here > /etc/ppp/routes1.log
echo no / routes go here > /etc/ppp/routes2.log
for i in `cat /etc/ppp/routefile.txt | dos2unix` ;
do if [[ $i =~ "/32" ]]; then echo route add -host $i gw $IPREMOTE >> /etc/ppp/routes.log; route add -host $i gw $IPREMOTE >> /etc/ppp/routes.log 2>&1;
else if [[ $i =~ "/" ]]; then echo route add -net $i gw $IPREMOTE >> /etc/ppp/routes1.log; route add -net $i gw $IPREMOTE >> /etc/ppp/routes1.log 2>&1;
else echo route add -net `echo -n $i | grep -v "/" | awk '{FS="." ; if ($1 >= 1 && $1 <= 127){printf $0"/8"} else if ($1 >= 128 && $1 <= 191){printf $0"/16"}else if ($1 >= 192 && $1 <= 223){printf $0"/24"} }'`gw $IPREMOTE >> /etc/ppp/routes2.log; route add -net `echo -n $i | awk '{FS="." ; if ($1 >= 1 && $1 <= 126){printf $0"/8"} else if ($1 >= 128 && $1 <= 191){printf $0"/16"}else if ($1 >= 192 && $1 <= 223){printf $0"/24"} }'`gw $IPREMOTE >> /etc/ppp/routes2.log 2>&1;
fi;
fi;
done;
;;
41.*)
echo $IPLOCAL >/etc/ppp/ipint.txt
;;
165.*)
echo $IPLOCAL >/etc/ppp/ipint.txt
;;
esac
Ok so i think i made progress!
but i think now the routes get setup and then default route or something overwrites it, so international is trying to access via local?
eremos, is that code in a file and you run that file everytime you run pon??
Ok thanx got it!!!
Now just to make sure it is routing trafic anybody know of a local site to check ip I use whatismyip.com to check international, not sure of local. (btw. it did show my international ip on whatismyip.com)
Thanx a million eremos! after tweaking and hacking and using your script it looks like it worked for me now just to make sure!![]()
Well it worked! Everything is setup and local is donwloading from local connection and international is well downloading from international connection!!
Hehe, that is awesome. I'm glad I could help!
Now we can start work on the South African ADSL multiple pppoe distro.![]()
You know that's really sad.
We have to start writing custom stuff just because of the bandwidth nonsense in this frigging country.![]()
By the way, ASS_SAZiN`, would you be willing to post your whole script for anyone else who'd like to implement same?![]()