| SHOREWALL6-SECMARKS(5) | Configuration Files | SHOREWALL6-SECMARKS(5) |
NAME¶
secmarks - Shorewall6 fileSYNOPSIS¶
/etc/shorewall6/secmarks
DESCRIPTION¶
Important
Unlike rules in the shorewall6-rules[1](5) file, evaluation of rules in this file will continue after a match. So the final secmark for each packet will be the one assigned by the LAST rule that matches.
The secmarks file is used to associate an SELinux context with packets. It was added in Shorewall6 version 4.4.13.
The columns in the file are as follows (where the column name is followed by a different name in parentheses, the different name is used in the alternate specification syntax).
SECMARK - {SAVE|RESTORE|context|?COMMENT}
SAVE
RESTORE
context
?COMMENT
CHAIN - {P|I|F|O|T}[:{N|I|U|IU|NI|NU|NIU|NUI:E|ER}]
SOURCE - {-interface|[interface:]address-or-range[,address-or-range]...}[exclusion]
MAC addresses must be prefixed with "~" and use "-" as a separator.
Example: ~00-A0-C9-15-39-78
You may exclude certain hosts from the set already defined through use of an exclusion (see shorewall6-exclusion[2](5)).
DEST - {-|{interface|[interface:]address-or-range[,address-or-range]...}[exclusion]
You may exclude certain hosts from the set already defined through use of an exclusion (see shorewall6-exclusion[2](5)).
PROTO - {-|tcp:syn|ipp2p|ipp2p:udp|ipp2p:all|protocol-number|protocol-name|all}
Beginning with Shorewall 4.5.12, this column can accept a comma-separated list of protocols.
DPORT - [-|port-name-number-or-range[,port-name-number-or-range]...]
If the protocol is ipp2p, this column is interpreted as an ipp2p option without the leading "--" (example bit for bit-torrent). If no PORT is given, ipp2p is assumed.
This column is ignored if PROTO = all but must be entered if any of the following field is supplied. In that case, it is suggested that this field contain "-"
SPORT - [-|port-name-number-or-range[,port-name-number-or-range]...]
Beginning with Shorewall 4.5.15, you may place '=' in this column, provided that the DPORT column is non-empty. This causes the rule to match when either the source port or the destination port in a packet matches one of the ports specified in DPORT. Use of '=' requires multi-port match in your iptables and kernel.
USER - [!][user-name-or-number][:group-name-or-number]
When this column is non-empty, the rule applies only if the program generating the output is running under the effective user and/or group specified (or is NOT running under that id if "!" is given).
Examples:
joe
:kids
!:kids
This column was formerly labelled USER/GROUP.
MARK - [!]value[/mask][:C]
If you don't want to define a test but need to specify anything in the following columns, place a "-" in this field.
!
value
mask
:C
EXAMPLE¶
Mark the first incoming packet of a connection on the loopback interface and destined for address ::1 and tcp port 3306 with context system_u:object_r:mysqld_t:s0 and save that context in the conntrack table. On subsequent input packets in the connection, set the context from the conntrack table./etc/shorewall6/interfaces:
#ZONE INTERFACE BROADCAST OPTIONS - lo - ignore
/etc/shorewall6/secmarks:
#SECMARK CHAIN SOURCE DEST PROTO DPORT SPORT USER MARK system_u:object_r:mysqld_packet_t:s0 I:N lo ::1 tcp 3306 SAVE I:N RESTORE I:ER
FILES¶
/etc/shorewall6/secmarksSEE ALSO¶
http://james-morris.livejournal.com/11010.htmlhttp://www.shorewall.net/configuration_file_basics.htm#Pairs[4]
shorewall6(8), shorewall6-actions(5), shorewall6-blacklist(5), shorewall6-hosts(5), shorewall6-interfaces(5), shorewall6-maclist(5), shorewall6-netmap(5),shorewall6-params(5), shorewall6-policy(5), shorewall6-providers(5), shorewall6-rtrules(5), shorewall6-routestopped(5), shorewall6-rules(5), shorewall6.conf(5), shorewall6-tcclasses(5), shorewall6-tcdevices(5), shorewall6-mangle(5), shorewall6-tos(5), shorewall6-tunnels(5), shorewall6-zones(5)
NOTES¶
- 1.
- shorewall6-rules
- 2.
- shorewall6-exclusion
| 03/16/2017 | Configuration Files |