----- Bericht van [EMAIL PROTECTED] ---------
Datum: Fri, 04 Aug 2006 22:26:54 +0200
Van: heupink <[EMAIL PROTECTED]>
Antwoorden aan:efw-user@lists.sourceforge.net
Onderwerp: [Efw-user] default gateway outside ip/netmask range
Aan: efw-user@lists.sourceforge.net
> hi all.
>
> I've asked this before in the forums, but received no replies, therefore
> asking again here:
>
> I need to specify a default gateway (192.x.x.x) that is OUTSIDE the
> range of my public ip address/netmask (80.x.x.x/255.255.255.0) for my
> RED interface.
I've found a solution if you use DHCP to get this information. (I've got a SpeedTouch 510(i) in ddhcp_spoof mode).
I've added one line in the following file:
/etc/dhclient/dhclient-enter-hooks.d/enter-hook-write-info-file
The line is on the end:
/usr/sbin/repairroute $interface $routers &
Then I wrote the following script:
#!/bin/sh
interface=$1
routers=$2
#give dhclient some time to setup the
interface
sleep 10
ping -c 1 [EXTERNAL-PINGABLE-IP] > /dev/null
2> /dev/null
ROUTEFAILURE=$?
logger "repairroute $1 $2
($ROUTEFAILURE)"
if [ ${ROUTEFAILURE} != 0 ];then
if [ "${routers}" != "" ];then
route add -host ${routers} ${interface}
route add default gateway ${routers}
${interface}
logger " Repaired
defective route"
fi
fi
Just fill in a trustworthy (one that allwyas works if the link is configured correctly) IP number in place of [EXTERNAL-PINGABLE-IP].
It has worked for 24 hours now (I know that's not long but it looks OK for me) without hickup's.
>
> Endian checks the values entered in the web interface, and it doesn't
> let me. Is there a config file where I can enter these details
manually?
If you've got a static IP you have to check which programs are run (and add the route add lines at the end of the script that is run). I've not looked into this yet.
>
> Regards,
> mourik jan
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys -- and earn
cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Efw-user mailing list
> Efw-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/efw-user
>
----- Einde bericht van [EMAIL PROTECTED] -----
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Efw-user mailing list Efw-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/efw-user