diff --git a/docs/MultiISP.xml b/docs/MultiISP.xml index 208b7f8f6..9a89839f5 100644 --- a/docs/MultiISP.xml +++ b/docs/MultiISP.xml @@ -710,7 +710,7 @@ up. -
+
./etc/shorewall/masq and Multi-ISP If you masquerade a local network, you will need to add masquerade @@ -976,51 +976,6 @@ eth1 0.0.0.0/0 130.252.99.27 eth3 0.0.0.0/0 16.105.78.4
-
- Applications running on the Firewall -making them use a - particular provider - - As noted above, separate - entries in /etc/shorewall/mangle are required for - traffic originating from the firewall. - - Experience has shown that in some cases, problems occur with - applications running on the firewall itself. This is especially true - when you have specified routefilter on - your external interfaces in /etc/shorewall/interfaces (see above). When this happens, it is suggested - that you have the application use specific local IP addresses rather - than 0. - - Examples: - - - - Squid: In squid.conf, set tcp_outgoing_address to the IP address of the - interface that you want Squid to use. - - - - In OpenVPN, set local - (--local on the command - line) to the IP address that you want the server to receive - connections on. - - - - Note that some traffic originating on the firewall doesn't have a - SOURCE IP address before routing. At least one Shorewall user reports - that an entry in /etc/shorewall/rtrules with 'lo' - in the SOURCE column seems to be the most reliable way to direct such - traffic to a particular ISP. - - Example: - - #SOURCE DEST PROVIDER PRIORITY -lo - shorewall 1000 -
-
/etc/shorewall/rtrules (formerly /etc/shorewall/route_rules) @@ -1186,6 +1141,108 @@ gateway:~ #Note that because we used a priority of 1000, the
+
+ Applications running on the Firewall - making them use a + particular provider + + As noted above, separate + entries in /etc/shorewall/mangle are required for + traffic originating from the firewall. + + Experience has shown that in some cases, problems occur with + applications running on the firewall itself. This is especially true + when you have specified routefilter on + your external interfaces in /etc/shorewall/interfaces (see above). When this happens, it is suggested + that you have the application use specific local IP addresses rather + than 0. + + Examples: + + + + Squid: In squid.conf, set tcp_outgoing_address to the IP address of the + interface that you want Squid to use. + + + + In OpenVPN, set local + (--local on the command + line) to the IP address that you want the server to receive + connections on. + + + + Note that some traffic originating on the firewall doesn't have a + SOURCE IP address before routing. At least one Shorewall user reports + that an entry in /etc/shorewall/rtrules with 'lo' + in the SOURCE column seems to be the most reliable way to direct such + traffic to a particular ISP. + + Example: + + #SOURCE DEST PROVIDER PRIORITY +lo - shorewall 1000 + + Another option is to re-arrange the routing rules. Here is an + example of the routing rules produced with USE_DEFAULT_RT=Yes and + without the option being specified on the + providers: + + 0: from all lookup local +1: from all fwmark 0x80000/0x80000 lookup TProxy +999: from all lookup main +1000: from 70.90.191.121 lookup ComcastB +1000: from 70.90.191.123 lookup ComcastB +1000: from 10.0.0.4 lookup ComcastC +10000: from all fwmark 0x10000/0x30000 lookup ComcastB +10001: from all fwmark 0x20000/0x30000 lookup ComcastC +32765: from all lookup balance +32767: from all lookup default + + + Note the rules with priority 1000 -- these rules are configured by + Shorewall when the providers do not have the + option. If that option is specified, the rules become: + + 0: from all lookup local +1: from all fwmark 0x80000/0x80000 lookup TProxy +999: from all lookup main +10000: from all fwmark 0x10000/0x30000 lookup ComcastB +10001: from all fwmark 0x20000/0x30000 lookup ComcastC +32765: from all lookup balance +32767: from all lookup default + + + Now, if we configure the following rtrules: + + #SOURCE DEST PROVIDER PRIORITY +70.90.191.121 - ComcastB 20000 +70.90.191.123 - ComcastB 20000 +10.0.0.4 - ComcastC 20000 + + Then the routing rules become: + + 0: from all lookup local +1: from all fwmark 0x80000/0x80000 lookup TProxy +999: from all lookup main +10000: from all fwmark 0x10000/0x30000 lookup ComcastB +10001: from all fwmark 0x20000/0x30000 lookup ComcastC +20000: from 70.90.191.121 lookup ComcastB +20000: from 70.90.191.123 lookup ComcastB +20000: from 10.0.0.4 lookup ComcastC +32765: from all lookup balance +32767: from all lookup default + + + These change give marks priority over the source IP address, so + marking a packet will send it to the proscribed provider, regardless of + its source IP address. If you take this approach, be sure to include + the proper rules in /etc/shorewall/masq to + insure that the correct source IP address is used. +
+
/etc/shorewall/routes File