Created
February 24, 2013 00:49
-
-
Save kbarber/5022099 to your computer and use it in GitHub Desktop.
All matchers for iptables (or at least as many as I could get working from the docs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by iptables-save v1.4.7 on Sun Feb 24 00:48:11 2013 | |
*mangle | |
:PREROUTING ACCEPT [756:54757] | |
:INPUT ACCEPT [756:54757] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [578:527896] | |
:POSTROUTING ACCEPT [578:527896] | |
-A INPUT -s 1.1.1.2/32 -j CHECKSUM --checksum-fill | |
-A OUTPUT -s 1.1.1.2/32 -j CLASSIFY --set-class 0004:0056 | |
COMMIT | |
# Completed on Sun Feb 24 00:48:11 2013 | |
# Generated by iptables-save v1.4.7 on Sun Feb 24 00:48:11 2013 | |
*filter | |
:INPUT ACCEPT [0:0] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [1096:944096] | |
:foo - [0:0] | |
-A INPUT -p tcp -m comment --comment "000 foo" -j ACCEPT | |
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -p icmp -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT | |
-A INPUT -j REJECT --reject-with icmp-host-prohibited | |
-A INPUT -p tcp | |
-A INPUT -s 1.1.1.1/32 | |
-A INPUT -s 1.1.1.0/24 | |
-A INPUT -d 1.1.1.0/24 | |
-A INPUT -d 1.1.0.0/16 | |
-A INPUT ! -p tcp | |
-A INPUT ! -s 1.1.1.0/24 | |
-A INPUT ! -s 1.1.1.1/32 | |
-A INPUT ! -d 1.1.0.0/16 | |
-A INPUT -s 1.1.1.0/24 | |
-A INPUT -s 1.1.2.1/24 | |
-A INPUT -j ACCEPT | |
-A INPUT -s 1.1.1.1/32 -g foo | |
-A INPUT -i eth0 | |
-A INPUT ! -i eth0 | |
-A INPUT -i eth0:0 | |
-A INPUT ! -i eth0:0 | |
-A INPUT -m addrtype --src-type UNSPEC | |
-A INPUT -m addrtype --src-type LOCAL | |
-A INPUT -m addrtype ! --src-type LOCAL | |
-A INPUT -m addrtype --dst-type UNSPEC | |
-A INPUT -m addrtype --dst-type LOCAL | |
-A INPUT -m addrtype ! --dst-type LOCAL | |
-A INPUT -m addrtype ! --dst-type UNSPEC | |
-A INPUT -m addrtype --src-type UNSPEC --limit-iface-in | |
-A INPUT -m addrtype ! --src-type UNSPEC --limit-iface-in | |
-A INPUT -m addrtype ! --src-type UNSPEC --limit-iface-out | |
-A INPUT -m addrtype --src-type UNSPEC --limit-iface-out | |
-A INPUT -p ah -m ah --ahspi 1 | |
-A INPUT -p ah -m ah --ahspi 1 | |
-A INPUT -p ah -m ah ! --ahspi 1 | |
-A INPUT -s 1.1.1.1/32 -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 1 --cluster-hash-seed 0x00000001 | |
-A INPUT -s 1.1.1.1/32 -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 1 --cluster-hash-seed 0x00000001 | |
-A INPUT -s 1.1.1.1/32 -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 1 --cluster-hash-seed 0x00000001 | |
-A INPUT -s 1.1.1.1/32 -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 1 --cluster-hash-seed 0x00000001 | |
-A INPUT -s 1.1.1.1/32 -m comment --comment "foobar baz fooo foo baz" | |
-A INPUT -s 1.1.1.1/32 -m connbytes --connbytes 10:1000 --connbytes-mode packets --connbytes-dir both | |
-A INPUT -s 1.1.1.1/32 -m connbytes ! --connbytes 10:1000 --connbytes-mode packets --connbytes-dir both | |
-A INPUT -s 1.1.1.1/32 -m connlimit --connlimit-above 1 --connlimit-mask 32 | |
-A INPUT -s 1.1.1.1/32 -m connlimit ! --connlimit-above 1 --connlimit-mask 32 | |
-A INPUT -s 1.1.1.1/32 -m connlimit --connlimit-above 1 --connlimit-mask 24 | |
-A INPUT -s 1.1.1.1/32 -m connlimit ! --connlimit-above 1 --connlimit-mask 24 | |
-A INPUT -s 1.1.1.1/32 -m connmark --mark 0x18/0x1 | |
-A INPUT -s 1.1.1.1/32 -m connmark ! --mark 0x18/0x1 | |
-A INPUT -s 1.1.1.1/32 -m connmark ! --mark 0x18/0x1 -m connmark --mark 0x3/0x1 | |
-A INPUT -p ah -m ah ! --ahspi 1 -m ah --ahspi 3 | |
-A INPUT -p ah -m ah ! --ahspi 1 -m connmark --mark 0x3/0x1 -m ah --ahspi 3 | |
-A INPUT -p ah -m ah ! --ahspi 1 -m connmark --mark 0x3/0x1 -m ah --ahspi 3 -m connmark ! --mark 0x18/0x1 | |
-A INPUT -p ah -m ah ! --ahspi 1 -m ah ! --ahspi 1 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctstate NEW | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctstate NEW | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctproto 3 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctproto 3 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctorigsrc 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctorigsrc 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctorigdst 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctorigdst 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctreplsrc 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctreplsrc 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctrepldst 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctrepldst 1.1.1.0 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctorigsrcport 2 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctorigsrcport 2 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctorigdstport 2 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctorigdstport 2 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctorigsrcport 2 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctorigsrcport 3 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctreplsrcport 3 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctreplsrcport 3 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctstatus NONE | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctstatus NONE | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctexpire 12 | |
-A INPUT -s 1.1.1.1/32 -m conntrack ! --ctexpire 12 | |
-A INPUT -s 1.1.1.1/32 -m conntrack --ctdir ORIGINAL | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp --sport 3 | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp ! --sport 3 | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp --dport 3 | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp ! --dport 3 | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp --dccp-type REQUEST,DATA | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp --dccp-type ! REQUEST,DATA | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp --dccp-option 1 | |
-A INPUT -s 1.1.1.1/32 -p dccp -m dccp --dccp-option 1 | |
-A INPUT -s 1.1.1.1/32 -m dscp --dscp 0x01 | |
-A INPUT -s 1.1.1.1/32 -m dscp ! --dscp 0x01 | |
-A INPUT -s 1.1.1.1/32 -m dscp --dscp 0x00 | |
-A INPUT -s 1.1.1.1/32 -m dscp ! --dscp 0x00 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ecn --ecn-tcp-cwr | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ecn --ecn-tcp-ece | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ecn ! --ecn-tcp-cwr | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ecn ! --ecn-tcp-ece | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ecn --ecn-ip-ect 3 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ecn ! --ecn-ip-ect 3 | |
-A INPUT -s 1.1.1.1/32 -p esp -m esp --espspi 1 | |
-A INPUT -s 1.1.1.1/32 -p esp -m esp --espspi 1:24 | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-upto 1/sec --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-upto 1/sec --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-upto 1/min --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-mode srcip --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo --hashlimit-srcmask 24 | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo --hashlimit-dstmask 24 | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo --hashlimit-htable-size 3 | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo | |
-A INPUT -s 1.1.1.1/32 -m hashlimit --hashlimit-above 4/sec --hashlimit-name foo --hashlimit-htable-gcinterval 10000 | |
-A INPUT -s 1.1.1.1/32 -m helper --helper "foo" | |
-A INPUT -s 1.1.1.1/32 -m helper ! --helper "foo" | |
-A INPUT -s 1.1.1.1/32 -p icmp -m icmp --icmp-type 12/0 | |
-A INPUT -s 1.1.1.1/32 -p icmp -m icmp ! --icmp-type 12/0 | |
-A INPUT -m iprange ! --src-range 1.1.1.1-2.2.2.2 | |
-A INPUT -m iprange --src-range 1.1.1.1-2.2.2.2 | |
-A INPUT -m iprange --dst-range 1.1.1.1-2.2.2.2 | |
-A INPUT -m iprange ! --dst-range 1.1.1.1-2.2.2.2 | |
-A INPUT -m length --length 1:20 | |
-A INPUT -m length ! --length 1:20 | |
-A INPUT -m limit --limit 3/sec | |
-A INPUT -m limit --limit 3/hour --limit-burst 4 | |
-A INPUT -m mac --mac-source AA:AA:AA:AA:AA:AA | |
-A INPUT -m mac ! --mac-source AA:AA:AA:AA:AA:AA | |
-A INPUT -m mark --mark 0x4/0x5 | |
-A INPUT -m mark ! --mark 0x4/0x5 | |
-A INPUT -p dccp -m multiport --sports 1,2,3,4,5:6 | |
-A INPUT -p dccp -m multiport ! --sports 1,2,3,4,5:6 | |
-A INPUT -p dccp -m multiport --dports 3,4,5,6 | |
-A INPUT -p dccp -m multiport ! --dports 3,4,5,6 | |
-A INPUT -p dccp -m multiport ! --ports 3,4,5,6 | |
-A INPUT -p dccp -m multiport --ports 3,4,5,6 | |
-A INPUT -p dccp -m owner --uid-owner root | |
-A INPUT -p dccp -m owner ! --uid-owner root | |
-A INPUT -p dccp -m owner --uid-owner 5000-6000 | |
-A INPUT -p dccp -m owner ! --uid-owner 5000-6000 | |
-A INPUT -p dccp -m owner --gid-owner wheel | |
-A INPUT -p dccp -m owner ! --gid-owner wheel | |
-A INPUT -p dccp -m owner --socket-exists | |
-A INPUT -p dccp -m owner ! --socket-exists | |
-A INPUT -p dccp -m physdev --physdev-in eth0 | |
-A INPUT -p dccp -m physdev --physdev-in eth0:0 | |
-A INPUT -p dccp -m physdev ! --physdev-in eth0:0 | |
-A INPUT -p dccp -m physdev --physdev-out eth0:0 | |
-A INPUT -p dccp -m physdev ! --physdev-out eth0:0 | |
-A INPUT -p dccp -m physdev --physdev-is-in | |
-A INPUT -p dccp -m physdev ! --physdev-is-in | |
-A INPUT -p dccp -m physdev --physdev-is-out | |
-A INPUT -p dccp -m physdev ! --physdev-is-out | |
-A INPUT -p dccp -m physdev --physdev-is-bridged | |
-A INPUT -p dccp -m physdev ! --physdev-is-bridged | |
-A INPUT -p dccp -m pkttype --pkt-type unicast | |
-A INPUT -p dccp -m pkttype ! --pkt-type unicast | |
-A INPUT -p dccp -m policy --dir in --pol ipsec | |
-A INPUT -p dccp -m policy --dir out --pol ipsec | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --strict --reqid 3 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --reqid 3 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec ! --reqid 3 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --spi 0x3 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec ! --spi 0x3 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --proto ah | |
-A INPUT -p dccp -m policy --dir out --pol ipsec ! --proto ah | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --mode tunnel | |
-A INPUT -p dccp -m policy --dir out --pol ipsec ! --mode tunnel | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --mode tunnel --tunnel-src 1.1.1.0/24 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --mode tunnel ! --tunnel-src 1.1.1.0/24 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --mode tunnel --tunnel-dst 1.1.1.0/24 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --mode tunnel ! --tunnel-dst 1.1.1.0/24 | |
-A INPUT -p dccp -m policy --dir out --pol ipsec --strict --mode tunnel | |
-A INPUT -p dccp -m quota --quota 0 | |
-A INPUT -p dccp -m quota --quota 56 | |
-A INPUT -p dccp -m realm --realm 0x22/0x18 | |
-A INPUT -p dccp -m realm ! --realm 0x22/0x18 | |
-A INPUT -p dccp -m recent --set --name foo --rsource | |
-A INPUT -p dccp -m recent ! --set --name foo --rsource | |
-A INPUT -p dccp -m recent --set --name DEFAULT --rsource | |
-A INPUT -p dccp -m recent --set --name DEFAULT --rdest | |
-A INPUT -p dccp -m recent --rcheck --name DEFAULT --rsource | |
-A INPUT -p dccp -m recent ! --rcheck --name DEFAULT --rsource | |
-A INPUT -p dccp -m recent --update --name DEFAULT --rsource | |
-A INPUT -p dccp -m recent ! --update --name DEFAULT --rsource | |
-A INPUT -s 1.1.1.1/32 -p icmp -m recent --remove --name DEFAULT --rsource | |
-A INPUT -s 1.1.1.1/32 -p icmp -m recent --update --rttl --name DEFAULT --rsource | |
-A INPUT -p sctp -m sctp --sport 1 | |
-A INPUT -p sctp -m sctp --sport 1:3 | |
-A INPUT -p sctp -m sctp ! --sport 1:3 | |
-A INPUT -p sctp -m sctp ! --sport 1:3 | |
-A INPUT -p sctp -m sctp --dport 3 | |
-A INPUT -p sctp -m sctp ! --dport 3 | |
-A INPUT -p sctp -m sctp --chunk-types all DATA | |
-A INPUT -p sctp -m sctp --chunk-types all DATA:U | |
-A INPUT -p sctp -m sctp ! --chunk-types all DATA:U | |
-A INPUT -p sctp -m set --match-set foo src | |
-A INPUT -p sctp -m set ! --match-set foo src,dst | |
-A INPUT -p sctp -m socket | |
-A INPUT -p sctp -m socket --transparent | |
-A INPUT -p sctp -m state --state INVALID | |
-A INPUT -p sctp -m state --state NEW,RELATED,ESTABLISHED,UNTRACKED | |
-A INPUT -p sctp -m statistic --mode nth --every 1 | |
-A INPUT -p sctp -m statistic --mode random --probability 0.000000 | |
-A INPUT -p sctp -m statistic --mode random --probability 1.000000 | |
-A INPUT -p sctp -m statistic --mode nth --every 4 | |
-A INPUT -p sctp -m statistic --mode nth --every 4 --packet 2 | |
-A INPUT -p sctp -m string --string "foo" --algo bm --to 65535 | |
-A INPUT -p sctp -m string --string "foo" --algo bm --from 5 --to 65535 | |
-A INPUT -p sctp -m string --string "foo" --algo bm --to 5 | |
-A INPUT -p sctp -m string ! --string "foo" --algo bm --to 65535 | |
-A INPUT -p sctp -m string --string "00BBCC" --algo bm --to 65535 | |
-A INPUT -p sctp -m string ! --string "00BBCC" --algo bm --to 65535 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --sport 5 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --sport 5:66 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp ! --sport 5 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --dport 1 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --dport 1:45 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --tcp-flags SYN,ACK SYN | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp ! --tcp-flags SYN,ACK SYN | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp ! --dport 1:45 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp --tcp-option 4 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tcp ! --tcp-option 4 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --datestart 1979-12-31T23:00:00 --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --datestop 1980-01-01T00:00:00 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --timestart 12:34:11 --timestop 23:59:59 --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --timestart 00:00:00 --timestop 12:23:00 --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --timestart 00:00:00 --timestop 12:23:11 --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --monthdays 4 --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --monthdays 1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --weekdays Fri --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --weekdays Fri,Sun --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --weekdays Mon,Tue,Wed,Thu,Sat --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --datestop 2038-01-19T03:14:07 --utc | |
-A INPUT -s 1.1.1.1/32 -p tcp -m time --datestop 2038-01-19T03:14:07 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tos --tos 0x05/0xff | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tos --tos 0x05/0x06 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tos ! --tos 0x05/0x06 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tos --tos 0x04/0xff | |
-A INPUT -s 1.1.1.1/32 -p tcp -m tos ! --tos 0x04/0xff | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ttl --ttl-eq 5 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ttl --ttl-gt 6 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m ttl --ttl-lt 6 | |
-A INPUT -s 1.1.1.1/32 -p tcp -m u32 --u32 0x0&0xffff=0x100:0xffff | |
-A INPUT -s 1.1.1.1/32 -p udp -m udp --sport 55 | |
-A INPUT -s 1.1.1.1/32 -p udp -m udp ! --sport 55 | |
-A INPUT -s 1.1.1.1/32 -p udp -m udp --dport 66:67 | |
-A INPUT -s 1.1.1.1/32 -p udp -m udp ! --dport 66:67 | |
-A FORWARD -j REJECT --reject-with icmp-host-prohibited | |
-A OUTPUT -o eth0 | |
-A OUTPUT ! -o eth0 | |
-A OUTPUT ! -o eth0:0 | |
COMMIT | |
# Completed on Sun Feb 24 00:48:11 2013 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment