Académique Documents
Professionnel Documents
Culture Documents
F
FORWARD chain.
T
POSTROUTING chain (default).
3. RESTORE[/mask] -- restore the packet's mark from the connection's mark us
ing the supplied mask if any. Your kernel and ip6tables must include CONNMARK su
pport.
As in 1) above, may be followed by :P or :F
4. SAVE[/mask] -- save the packet's mark to the connection's mark using the
supplied mask if any. Your kernel and ip6tables must include CONNMARK support.
As in 1) above, may be followed by :P or :F
5. CONTINUE Don't process any more marking rules in the table.
As in 1) above, may be followed by :P or :F. Currently, CONTINUE may not be
used with exclusion (see the SOURCE and DEST columns below); that restriction wi
ll be removed when ip6tables/Netfilter provides the necessary support.
6. SAME (Added in Shorewall 4.3.5) -- Some websites run applications that re
quire multiple connections from a client browser. Where multiple 'balanced' prov
iders are configured, this can lead to problems when some of the connections are
routed through one provider and some through another. The SAME target allows yo
u to work around that problem. SAME may be used in the PREROUTING and OUTPUT cha
ins. When used in PREROUTING, it causes matching connections from an individual
local system to all use the same provider. For example:
#ACTION
#
SAME:P
SOURCE
DEST
192.168.1.0/24 0.0.0.0/0
PROTO
tcp
DEST
PORT(S)
80,443
SOURCE
DEST
PROTO
$FW
0.0.0.0/0
tcp
DEST
PORT(S)
80,443
If the firewall attempts a connection on TCP port 80 or 443 and it has sent
a packet on either of those ports in the last five minutes to the same remote sy
stem then the new connection will use the same provider as the connection over w
hich that last packet was sent.
7. COMMENT -- the rest of the line will be attached as a comment to the Netf
ilter rule(s) generated by the following entries. The comment will appear delimi
ted by "/* ... */" in the output of shorewall6 show mangle
To stop the comment from being attached to further rules, simply include COM
MENT on a line by itself.
8. DIVERT
Added in Shorewall 4.5.3. Two DIVERT rule should preceed the TPROXY rule and
should select DEST PORT tcp 80 and SOURCE PORT tcp 80 respectively (assuming th
at tcp port 80 is being proxied). DIVERT avoids sending packets to the TPROXY ta
rget once a socket connection to Squid3 has been established by TPROXY. DIVERT m
arks the packet with a unique mark and exempts it from any rules that follow.
9. TPROXY(mark[,[port][,[address]]]) -- FORMAT 1
Transparently redirects a packet without altering the IP header. Requires a
local provider to be defined in shorewall6-providers [5] (5).
There are three parameters to TPROXY - only the first (mark) is required:
mark - the MARK value corresponding to the local provider in shorewall6-provid
ers [5] (5).
port - the port on which the proxy server is listening. If omitted, the origin
al destination port.
address - a local (to the firewall) IP address on which the proxy server is li
stening. If omitted, the IP address of the interface on which the request arrive
s.
10. TPROXY([port][,[address]]]) -- FORMAT 2
Transparently redirects a packet without altering the IP header. Requires a
local provider to be defined in shorewall6-providers [5] (5).
There are three parameters to TPROXY - only the first (mark) is required:
port - the port on which the proxy server is listening. If omitted, the origin
al destination port.
address - a local (to the firewall) IP address on which the proxy server is li
stening. If omitted, the IP address of the interface on which the request arrive
s.
11. HL([-|+]number)
Added in Shorewall 4.4.24. May be option followed by :F but the resulting ru
le is always added to the FORWARD chain. If + is included, packets matching the
rule will have their HL (hop limit) incremented by number. Similarly, if - is in
cluded, matching packets have their HL decremented by number. If neither + nor is given, the HL of matching packets is set to number. The valid range of value
s for number is 1-255.
12. IMQ(number)
Added in Shorewall 4.5.1. Specifies that the packet should be passed to the
IMQ identified by number. Requires IMQ Target support in your kernel and ip6tabl
es.
13. DSCP(dscp)
Added in Shorewall 4.5.1. Sets the Differentiated Services Code Point field
in the IP header. The dscp value may be given as an even number (hex or decimal)
or as the name of a DSCP class. Valid class names and their associated hex nume
ric values are:
CS0
CS1
CS2
CS3
CS4
CS5
CS6
CS7
BE
AF11
AF12
AF13
AF21
AF22
AF23
AF31
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
0x00
0x08
0x10
0x18
0x20
0x28
0x30
0x38
0x00
0x0a
0x0c
0x0e
0x12
0x14
0x16
0x1a
AF32
AF33
AF41
AF42
AF43
EF
=>
=>
=>
=>
=>
=>
0x1c
0x1e
0x22
0x24
0x26
0x2e
May be optionally followed by ':' and a capital letter designating the chain
where classification is to occur.
F
FORWARD chain.
T
POSTROUTING chain.
14. TOS(tos[/mask])
Added in Shorewall 4.5.1. Sets the Type of Service field in the IP header. T
he tos value may be given as an number (hex or decimal) or as the name of a TOS
type. Valid type names and their associated hex numeric values are:
Minimize-Delay
Maximize-Throughput
Maximize-Reliability
Minimize-Cost
Normal-Service
=>
=>
=>
=>
=>
0x10,
0x08,
0x04,
0x02,
0x00
DEST
PROTO
PORT(S)
4
-
::/0
ftp
::/0
TCP
SOURCE
DEST
PROTO
PORT(S)
SOURCE USER
#
1
1
RESTORE
::/0
::/0
::/0
::/0
::/0
::/0
icmp
icmp
all
PORT(S)
echo-request
echo-reply
-
CONTINUE ::/0
::/0
all
4
SAVE
::/0
::/0
ipp2p:all
all
-
TEST
0
!0
::/0
::/0
!0
If a packet hasn't been classifed (packet mark is 0), copy the connection ma
rk to the packet mark. If the packet mark is set, we're done. If the packet is P
2P, set the packet mark to 4. If the packet mark has been set, save it to the co
nnection mark.
Files
/etc/shorewall6/tcrules
See Also
http://shorewall.net/traffic_shaping.htm
http://shorewall.net/MultiISP.html
http://shorewall.net/PacketMarking.html
http://shorewall.net/configuration_file_basics.htm#Pairs
shorewall6(8), shorewall6-accounting(5), shorewall6-actions(5), shorewall6-black
list(5), shorewall6-ecn(5), shorewall6-exclusion(5), shorewall6-hosts(5), shorew
all6-interfaces(5), shorewall6-maclist(5), shoewall6-netmap(5),shorewall6-params
(5), shorewall6-policy(5), shorewall6-providers(5), shorewall6-rtrules(5), shore
wall6-routestopped(5), shorewall6-rules(5), shorewall6.conf(5), shorewall6-secma
rks(5), shorewall6-tcclasses(5), shorewall6-tcdevices(5), shorewall6-tos(5), sho
rewall6-tunnels(5), shorewall6-zones(5)
Notes
1.
shorewall6-rules
http://www.shorewall.net/manpages6/shorewall6-rules.html
2.
shorewall6.conf
http://www.shorewall.net/manpages6/shorewall6.conf.html
3.
shorewall6-tcdevices
http://www.shorewall.net/manpages6/shorewall6-tcdevices.html
4.
shorewall6-tcclasses
http://www.shorewall.net/manpages6/shorewall6-tcclasses.html
5.
shorewall6-providers
http://www.shorewall.net/manpages6/shorewall6-providers.html
6.
shorewall6-exclusion
http://www.shorewall.net/manpages6/shorewall6-exclusion.html