SHOREWALL-PROVIDERS(5) | Configuration Files | SHOREWALL-PROVIDERS(5) |
NAME¶
providers - Shorewall Providers file
SYNOPSIS¶
/etc/shorewall/providers
DESCRIPTION¶
This file is used to define additional routing tables. You will want to define an additional table if:
Each entry in the file defines a single routing table.
If you wish to omit a column entry but want to include an entry in the next column, use "-" for the omitted entry.
The columns in the file are as follows.
NAME - name
NUMBER - number
MARK (Optional) - value
If PROVIDER_OFFSET is non-zero in shorewall.conf(5)[2], then the value must be a multiple of 2^^PROVIDER_OFFSET. In all cases, the number of significant bits may not exceed PROVIDER_OFFSET + PROVIDER_BITS.
DUPLICATE - routing-table-name
INTERFACE - interface[:address]
Important
For IPv6, if the interface is an Ethernet device and an IP address is supplied, it should be the upstream router's link-level address, not its global address.
GATEWAY - {-|address[,mac]|detect|none}
You can enter detect here and Shorewall will attempt to detect the gateway automatically.
Beginning with Shorewall 5.0.6, you may also enter none. This causes creation of a routing table with no default route in it.
For PPP devices, you may omit this column.
OPTIONS (Optional) - [-|option[,option]...]
autosrc
track
You want to specify track if internet hosts will be connecting to local servers through this provider.
Beginning with Shorewall 4.4.3, track defaults to the setting of the TRACK_PROVIDERS option in shorewall.conf[2] (5). If you set TRACK_PROVIDERS=Yes and want to override that setting for an individual provider, then specify notrack (see below).
balance[=weight]
Prior to Shorewall 5.1.1, when USE_DEFAULT_RT=Yes, balance=1 is assumed unless the fallback, loose, load or tproxy option is specified. Beginning with Shorewall 5.1.1, when BALANCE_PROVIDERS=Yes, balance=1 is assumed unless the fallback, loose, load or tproxy option is specified.I
Caution
In IPV6, the balance option does not cause balanced default routes to be created; it rather causes a sequence of default routes with different metrics to be created.
loose
load=probability
noautosrc
notrack
optional (deprecated for use with providers that do not share an interface)
primary
src=source-address
mtu=number
fallback[=weight]
Prior to Shorewall 4.4.24, the option is ignored with a warning message if USE_DEFAULT_RT=Yes in shorewall.conf.
Caution
In IPV6, specifying the fallback option on multiple providers does not cause balanced fallback routes to be created; it rather causes a sequence of fallback routes with different metrics to be created.
tproxy
hostroute
nohostroute
persistent
Note
The generated script will attempt to reenable a disabled persistent provider during execution of the start, restart and reload commands. When persistent is not specified, only the enable and reenable commands can reenable the provider.
Important
RESTORE_DEFAULT_ROUTE=Yes in shorewall[6].conf is not recommended when the persistent option is used, as restoring default routes to the main routing table can prevent link status monitors such as foolsm from correctly detecting non-working providers.
COPY - [{none|interface[,interface]...}]
Beginning with Shorewall 4.5.17, blackhole, unreachable and prohibit routes are no longer copied by default but may be copied by including blackhole,unreachable and prohibit respectively in the COPY list.
EXAMPLES¶
IPv4 Example 1:
#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS
Squid 1 1 - eth2 192.168.2.99 -
IPv4 Example 2:
eth1 connects to ISP 2. The IP address of eth1 is 130.252.99.27 and the ISP's gateway router has IP address 130.252.99.254.
eth2 connects to a local network.
#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS COPY
ISP1 1 1 main eth0 206.124.146.254 track,balance eth2
ISP2 2 2 main eth1 130.252.99.254 track,balance eth2
IPv6 Example 1:
#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS
Squid 1 1 - eth2 2002:ce7c:92b4:1::2 -
IPv6 Example 2:
eth1 connects to ISP 2. The ISP's gateway router has IP address 2001:d64c:83c9:12::8b.
eth2 connects to a local network.
#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS COPY
ISP1 1 1 main eth0 2001:ce7c:92b4:1::2 track eth2
ISP2 2 2 main eth1 2001:d64c:83c9:12::8b track eth2
FILES¶
/etc/shorewall/providers
/etc/shorewall6/providers
SEE ALSO¶
https://shorewall.org/MultiISP.html[6]
https://shorewall.org/configuration_file_basics.htm#Pairs[7]
NOTES¶
09/24/2020 | Configuration Files |