options-most.rules 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. *filter
  2. :INPUT ACCEPT [0:0]
  3. :FORWARD ACCEPT [0:0]
  4. :OUTPUT ACCEPT [0:0]
  5. :matches - -
  6. :ntarg - -
  7. :zmatches - -
  8. -A INPUT -j matches
  9. -A INPUT -m u32 --u32 "0x0=0x0&&0x0=0x1" -j ntarg
  10. -A INPUT -j zmatches
  11. -A INPUT -m conntrack --ctstate INVALID --ctproto 6 --ctorigsrc fe80::/64 --ctorigdst fe80::/64 --ctreplsrc fe80::/64 --ctrepldst fe80::/64 --ctorigsrcport 12 --ctorigdstport 13 --ctreplsrcport 14 --ctrepldstport 15 --ctstatus EXPECTED --ctexpire 1:2 --ctdir REPLY
  12. -A INPUT -p tcp -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 2 --cluster-hash-seed 0x00000001 -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 2 --cluster-hash-seed 0x00000001 -m comment --comment foo -m connbytes --connbytes 1:2 --connbytes-mode packets --connbytes-dir both -m connlimit --connlimit-upto 1 --connlimit-mask 8 --connlimit-saddr -m connlimit --connlimit-above 1 --connlimit-mask 9 --connlimit-daddr -m connmark --mark 0x99 -m conntrack --ctstate INVALID --ctproto 6 --ctorigsrc fe80::/64 --ctorigdst fe80::/64 --ctreplsrc fe80::/64 --ctrepldst fe80::/64 --ctorigsrcport 12 --ctorigdstport 13 --ctreplsrcport 14 --ctrepldstport 15 --ctstatus EXPECTED --ctexpire 1:2 --ctdir REPLY -m cpu --cpu 2 -m dscp --dscp 0x04 -m dscp --dscp 0x00 -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 5 --hashlimit-mode srcip,dstip --hashlimit-name f1 --hashlimit-htable-size 64 --hashlimit-htable-max 128 --hashlimit-htable-gcinterval 60 --hashlimit-htable-expire 120 --hashlimit-srcmask 24 --hashlimit-dstmask 24 -m hashlimit --hashlimit-above 5/sec --hashlimit-burst 5 --hashlimit-name f1 -m helper --helper ftp -m iprange --src-range ::1-::2 --dst-range ::1-::2 -m ipvs --vaddr fe80::/64 --vport 1 --vdir REPLY --vmethod GATE --vportctl 21 -m length --length 1:2 -m limit --limit 1/sec -m mac --mac-source 01:02:03:04:05:06 -m mark --mark 0x1 -m physdev --physdev-in eth0 -m pkttype --pkt-type unicast -m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto esp --mode tunnel --tunnel-dst fe80::/64 --tunnel-src fe80::/64 --next --reqid 2 -m quota --quota 0 -m recent --rcheck --name DEFAULT --rsource -m socket --transparent -m string --string "foobar" --algo kmp --from 1 --to 2 --icase -m time --timestart 01:02:03 --timestop 03:04:05 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05 --utc -m tos --tos 0xff/0x01 -m u32 --u32 "0x0=0x0" -m u32 --u32 "0x0=0x0" -m hbh -m hbh -m hl --hl-eq 1
  13. -A INPUT -m ipv6header --header hop-by-hop --soft
  14. -A INPUT -p tcp -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 2 --cluster-hash-seed 0x00000001
  15. -A INPUT -p tcp -m cluster --cluster-local-nodemask 0x00000001 --cluster-total-nodes 2 --cluster-hash-seed 0x00000001
  16. -A INPUT -p tcp -m comment --comment foo
  17. -A INPUT -p tcp -m connbytes --connbytes 1:2 --connbytes-mode packets --connbytes-dir both
  18. -A INPUT -p tcp -m connlimit --connlimit-upto 1 --connlimit-mask 8 --connlimit-saddr
  19. -A INPUT -p tcp -m connlimit --connlimit-above 1 --connlimit-mask 9 --connlimit-daddr
  20. -A INPUT -p tcp -m connmark --mark 0x99
  21. -A INPUT -p tcp -m conntrack --ctstate INVALID --ctproto 6 --ctorigsrc fe80::/64 --ctorigdst fe80::/64 --ctreplsrc fe80::/64 --ctrepldst fe80::/64 --ctorigsrcport 12 --ctorigdstport 13 --ctreplsrcport 14 --ctrepldstport 15 --ctstatus EXPECTED --ctexpire 1:2 --ctdir REPLY
  22. -A INPUT -p tcp -m cpu --cpu 2
  23. -A INPUT -p tcp -m dscp --dscp 0x04 -m dscp ! --dscp 0x04
  24. -A INPUT -p tcp -m dscp --dscp 0x00 -m dscp ! --dscp 0x00
  25. -A INPUT -p tcp -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 5 --hashlimit-mode srcip,dstip --hashlimit-name f1 --hashlimit-htable-size 64 --hashlimit-htable-max 128 --hashlimit-htable-gcinterval 60 --hashlimit-htable-expire 120 --hashlimit-srcmask 24 --hashlimit-dstmask 24
  26. -A INPUT -p tcp -m hashlimit --hashlimit-above 5/sec --hashlimit-burst 5 --hashlimit-name f1
  27. -A INPUT -p tcp -m helper --helper ftp
  28. -A INPUT -p tcp -m iprange --src-range ::1-::2 --dst-range ::1-::2
  29. -A INPUT -p tcp -m length --length 1:2
  30. -A INPUT -p tcp -m limit --limit 1/sec
  31. -A INPUT -p tcp -m mac --mac-source 01:02:03:04:05:06
  32. -A INPUT -p tcp -m mark --mark 0x1
  33. -A INPUT -p tcp -m physdev --physdev-in eth0
  34. -A INPUT -p tcp -m pkttype --pkt-type unicast
  35. -A INPUT -p tcp -m policy --dir in --pol ipsec --strict --reqid 1 --spi 0x1 --proto esp --mode tunnel --tunnel-dst fe80::/64 --tunnel-src fe80::/64 --next --reqid 2
  36. -A INPUT -p tcp -m quota --quota 0
  37. -A INPUT -p tcp -m recent --rcheck --name DEFAULT --rsource
  38. -A INPUT -p tcp -m socket --transparent
  39. -A INPUT -p tcp -m string --string "foobar" --algo kmp --from 1 --to 2 --icase
  40. -A INPUT -p tcp -m string --hex-string "|00|" --algo kmp --from 1 --to 2 --icase
  41. -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN
  42. -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN
  43. -A INPUT -p tcp -m tos --tos 0xff/0x01
  44. -A INPUT -p tcp -m u32 ! --u32 "0x0=0x0" -m u32 ! --u32 "0x0=0x0"
  45. -A INPUT -p tcp -m hbh -m hbh -m hl --hl-eq 1 -m ipv6header --header hop-by-hop --soft
  46. -A INPUT -m ipv6header --header hop-by-hop --soft -m rt --rt-type 2 --rt-segsleft 2 --rt-len 5 -m rt --rt-type 0 --rt-segsleft 2 --rt-len 5 --rt-0-res --rt-0-addrs ::1 --rt-0-not-strict -m rt --rt-type 0 --rt-segsleft 2 --rt-len 5 --rt-0-res --rt-0-addrs ::1,::2 --rt-0-not-strict
  47. -A INPUT -p tcp -m cpu --cpu 1 -m tcp --sport 1:2 --dport 1:2 --tcp-option 1 --tcp-flags FIN,SYN,RST,ACK SYN -m cpu --cpu 1
  48. -A INPUT -p dccp -m cpu --cpu 1 -m dccp --sport 1:2 --dport 3:4 -m cpu --cpu 1
  49. -A INPUT -p dccp -m dccp ! --sport 1:2 ! --dport 3:4 ! --dccp-types REQUEST,RESPONSE ! --dccp-option 1
  50. -A INPUT -p udp -m cpu --cpu 1 -m udp --sport 1:2 --dport 3:4 -m cpu --cpu 1
  51. -A INPUT -p sctp -m cpu --cpu 1 -m sctp --sport 1:2 --dport 3:4 --chunk-types all INIT,SACK -m cpu --cpu 1
  52. -A INPUT -p esp -m esp --espspi 1:2
  53. -A INPUT -p tcp -m multiport --dports 1,2 -m multiport --dports 1,2
  54. -A INPUT -p tcp -m tcpmss --mss 1:2 -m tcp --tcp-flags FIN,SYN,RST,ACK SYN
  55. -A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type 4/0
  56. -A INPUT
  57. -A INPUT -p ipv6-mh -m mh --mh-type 3
  58. -A OUTPUT -m owner --socket-exists --uid-owner 1-2 --gid-owner 2-3
  59. -A OUTPUT -m owner ! --socket-exists ! --uid-owner 0 ! --gid-owner 0
  60. -A matches -m connbytes --connbytes 1 --connbytes-mode bytes --connbytes-dir both
  61. -A matches
  62. -A matches -m connbytes --connbytes :2 --connbytes-mode bytes --connbytes-dir both
  63. -A matches
  64. -A matches -m connbytes --connbytes 0:3 --connbytes-mode bytes --connbytes-dir both
  65. -A matches
  66. -A matches -m connbytes --connbytes 4: --connbytes-mode bytes --connbytes-dir both
  67. -A matches
  68. -A matches -m connbytes --connbytes 5:18446744073709551615 --connbytes-mode bytes --connbytes-dir both
  69. -A matches
  70. -A matches -m conntrack --ctexpire 1
  71. -A matches
  72. -A matches -m conntrack --ctexpire :2
  73. -A matches
  74. -A matches -m conntrack --ctexpire 0:3
  75. -A matches
  76. -A matches -m conntrack --ctexpire 4:
  77. -A matches
  78. -A matches -m conntrack --ctexpire 5:4294967295
  79. -A matches
  80. -A matches -m conntrack ! --ctstate NEW ! --ctproto tcp ! --ctorigsrc ::1/127 ! --ctorigdst ::2/127 ! --ctreplsrc ::2/127 ! --ctrepldst ::2/127 ! --ctorigsrcport 3 ! --ctorigdstport 4 ! --ctreplsrcport 5 ! --ctrepldstport 6 ! --ctstatus ASSURED ! --ctexpire 8:9
  81. -A matches
  82. -A matches -m dst ! --dst-len 12
  83. -A matches
  84. -A matches -p esp -m esp --espspi 1
  85. -A matches
  86. -A matches -p esp -m esp --espspi :2
  87. -A matches
  88. -A matches -p esp -m esp --espspi 0:3
  89. -A matches
  90. -A matches -p esp -m esp --espspi 4:
  91. -A matches
  92. -A matches -p esp -m esp --espspi 5:4294967295
  93. -A matches
  94. -A matches -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 1 --hashlimit-name mini1 --hashlimit-htable-expire 2000
  95. -A matches -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 1 --hashlimit-name mini1
  96. -A matches -m hashlimit --hashlimit-upto 1/min --hashlimit-burst 1 --hashlimit-name mini2
  97. -A matches -m hashlimit --hashlimit-upto 1/hour --hashlimit-burst 1 --hashlimit-name mini3
  98. -A matches -m hashlimit --hashlimit-upto 1/day --hashlimit-burst 1 --hashlimit-name mini4
  99. -A matches -m hashlimit --hashlimit-upto 4kb/s --hashlimit-burst 400kb --hashlimit-name mini5
  100. -A matches -m hashlimit --hashlimit-upto 10mb/s --hashlimit-name mini6
  101. -A matches -m hashlimit --hashlimit-upto 123456b/s --hashlimit-burst 1mb --hashlimit-name mini7
  102. -A matches
  103. -A matches -m hbh ! --hbh-len 5
  104. -A matches
  105. -A matches -m ipvs --vaddr fe80::/64 --vport 1 --vdir REPLY --vmethod GATE --vportctl 21
  106. -A matches
  107. -A matches -m length --length 1
  108. -A matches
  109. -A matches -m length --length :2
  110. -A matches
  111. -A matches -m length --length 0:3
  112. -A matches
  113. -A matches -m length --length 4:
  114. -A matches
  115. -A matches -m length --length 5:65535
  116. -A matches
  117. -A matches -m physdev ! --physdev-is-in ! --physdev-is-out ! --physdev-is-bridged
  118. -A matches
  119. -A matches -p tcp -m tcpmss --mss 1
  120. -A matches
  121. -A matches -p tcp -m tcpmss --mss :2
  122. -A matches
  123. -A matches -p tcp -m tcpmss --mss 0:3
  124. -A matches
  125. -A matches -p tcp -m tcpmss --mss 4:
  126. -A matches
  127. -A matches -p tcp -m tcpmss --mss 5:65535
  128. -A matches
  129. -A matches -m statistic --mode random ! --probability 0.4
  130. -A matches
  131. -A matches -m statistic --mode nth ! --every 5 --packet 2
  132. -A matches
  133. -A matches -m string --hex-string "action=|5C22|http|3A|" --algo bm
  134. -A matches
  135. -A matches -m string --hex-string "action=|5C|http|3A|" --algo bm
  136. -A matches
  137. -A matches -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05 --localtz
  138. -A matches
  139. -A matches -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05 --kerneltz
  140. -A matches
  141. -A matches -m time --timestart 01:02:03 --timestop 04:05:06 --monthdays 1,2,3,4,5 --weekdays Mon,Fri,Sun --datestart 2001-02-03T04:05:06 --datestop 2012-09-08T09:06:05
  142. -A matches
  143. -A matches -m time --timestart 02:00:00 --timestop 03:00:00 --datestart 1970-01-01T02:00:00 --datestop 1970-01-01T03:00:00
  144. -A matches
  145. -A matches -m ah --ahspi 1
  146. -A matches
  147. -A matches -m ah --ahspi :2
  148. -A matches
  149. -A matches -m ah --ahspi 0:3
  150. -A matches
  151. -A matches -m ah --ahspi 4:
  152. -A matches
  153. -A matches -m ah --ahspi 5:4294967295
  154. -A matches
  155. -A matches -m frag --fragid 1
  156. -A matches
  157. -A matches -m frag --fragid :2
  158. -A matches
  159. -A matches -m frag --fragid 0:3
  160. -A matches
  161. -A matches -m frag --fragid 4:
  162. -A matches
  163. -A matches -m frag --fragid 5:4294967295
  164. -A matches
  165. -A matches -m frag ! --fragid 9:10 ! --fraglen 12
  166. -A matches
  167. -A matches -m rt --rt-segsleft 1
  168. -A matches
  169. -A matches -m rt --rt-segsleft :2
  170. -A matches
  171. -A matches -m rt --rt-segsleft 0:3
  172. -A matches
  173. -A matches -m rt --rt-segsleft 4:
  174. -A matches
  175. -A matches -m rt --rt-segsleft 5:4294967295
  176. -A matches
  177. -A ntarg -j LOG --log-tcp-sequence --log-tcp-options --log-ip-options
  178. -A ntarg
  179. -A ntarg -j NFQUEUE --queue-num 1
  180. -A ntarg
  181. -A ntarg -j NFQUEUE --queue-balance 8:99
  182. -A ntarg
  183. -A ntarg -j NFQUEUE --queue-num 0 --queue-bypass
  184. -A ntarg
  185. -A ntarg -j RATEEST --rateest-name RE1 --rateest-interval 250.0ms --rateest-ewmalog 500.0ms
  186. -A ntarg
  187. -A ntarg -j RATEEST --rateest-name RE2 --rateest-interval 250.0ms --rateest-ewmalog 500.0ms
  188. -A ntarg
  189. -A zmatches -m rateest --rateest RE1 --rateest-lt --rateest-bps 8bit
  190. -A zmatches -m rateest --rateest RE1 --rateest-eq --rateest-pps 5
  191. -A zmatches -m rateest --rateest RE1 --rateest-gt --rateest-bps 5kbit
  192. -A zmatches -m rateest --rateest-delta --rateest RE1 --rateest-bps1 8bit --rateest-lt --rateest-bps2 16bit
  193. -A zmatches -m rateest --rateest1 RE1 --rateest-lt --rateest-bps --rateest2 RE2
  194. -A zmatches -m rateest --rateest-delta --rateest1 RE1 --rateest-lt --rateest2 RE2 --rateest-pps2 42
  195. -A zmatches -m rateest --rateest-delta --rateest RE1 --rateest-bps1 8bit --rateest-eq --rateest-bps2 16bit
  196. -A zmatches -m rateest --rateest-delta --rateest RE1 --rateest-bps1 8bit --rateest-gt --rateest-bps2 16bit
  197. -A zmatches -m rateest --rateest-delta --rateest RE1 --rateest-pps1 8 --rateest-lt --rateest-pps2 9
  198. -A zmatches -m rateest --rateest-delta --rateest RE1 --rateest-pps1 8 --rateest-eq --rateest-pps2 9
  199. -A zmatches -m rateest --rateest-delta --rateest RE1 --rateest-pps1 8 --rateest-gt --rateest-pps2 9
  200. COMMIT
  201. *mangle
  202. :PREROUTING ACCEPT [0:0]
  203. :INPUT ACCEPT [0:0]
  204. :FORWARD ACCEPT [0:0]
  205. :OUTPUT ACCEPT [0:0]
  206. :POSTROUTING ACCEPT [0:0]
  207. :matches - -
  208. :ntarg - -
  209. :zmatches - -
  210. -A INPUT -m u32 --u32 "0x0=0x0&&0x0=0x1" -j ntarg
  211. -A ntarg -j HL --hl-inc 1
  212. -A ntarg -j HL --hl-dec 1
  213. -A ntarg
  214. COMMIT