hi folks
i tried to add a default route on the wan iface which is not in the same
subnet ... it didn't work, so i checked the code and built a fix for
this ... hope it will be part of further releases!
preface:
to add a default route which is out the subnet of the world iface you
must add a host route to this gw just before you add the default route.
so i think this should be in etc/inc/interfaces.php
--snip
default:
mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " " .
escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']));
/* install default route */
mwexec("/sbin/route delete default");
/* bsd route hack -- for gateway out of the same subnet :: Andreas
Kiessling (14.02.2005)*/
mwexec("/sbin/route add ".escapeshellarg($wancfg['gateway'])."
".escapeshellarg($wancfg['ipaddr']) );
/* hack END */
mwexec("/sbin/route add default " . escapeshellarg($wancfg['gateway']));
--snip
am i right ????
best regards andreas
--
Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
-- spruch des monats >>>
Wenn Du dich klein, beleidigt und depressiv fühlst denke immer
daran:
"Du warst einmal das schnellste und erfolgreichste Spermium Deiner Gruppe!" |