Eduardo Ferreira
2005-Jun-20 09:25 UTC
[Shorewall-devel] problems with boot in multiple ISPs
Hi all,
I''ve been trying to set up a shorewall box with 2 ISPs. After a
shorewall
start/restart, shorewall correctly configures and balances the default
main route via both ISPs:
[...]
default
nexthop via 200.173.215.94 dev eth0 weight 10
nexthop via 200.157.40.129 dev eth2 weight 20
but after a boot, that route is not configured. Inspecting the code, I
solved the problem with this patch:
--- shorewall-2.4.0/firewall 2005-06-20 10:58:41.000000000 -0300
+++ shorewall/firewall 2005-06-20 12:03:51.523989888 -0300
@@ -1168,7 +1168,7 @@
if [ -n "$PROVIDERS" ]; then
if [ -n "$DEFAULT_ROUTE" ]; then
- run_ip route replace default scope global $DEFAULT_ROUTE
+ ensure_and_save_command ip route replace default scope
global $DEFAULT_ROUTE
progress_message " Default route $DEFAULT_ROUTE
Added."
fi
in this patch, the ensure_and_save_command could be swapped with
run_and_save_command, depending on the action shorewall should take if
this command returns an error.
Hope this helps,
________________________
Eduardo Ferreira
Icatu Holding S.A.
Supervisor de TI
(5521) 3804-8606
Eduardo Ferreira wrote:> in this patch, the ensure_and_save_command could be swapped with > run_and_save_command, depending on the action shorewall should take if > this command returns an error.I believe that ensure_and_save_command is the proper call. If the ''ip replace route'' command fails, something is seriously wrong. -Tom -- Tom Eastep \ Nothing is foolproof to a sufficiently talented fool Shoreline, \ http://shorewall.net Washington USA \ teastep@shorewall.net PGP Public Key \ https://lists.shorewall.net/teastep.pgp.key