man iptables
man ip6tables
https://my.oschina.net/chuangpoyao/blog/72655
絶大部份調件來至 Troubleshooting Linux Firewalls SHINN
# Generated by iptables-save v1.4.8 on Mon Jul 9 16:16:57 2012 *raw :PREROUTING ACCEPT [3872:1336157] :OUTPUT ACCEPT [1385:198017] COMMIT # Completed on Mon Jul 9 16:16:57 2012 # Generated by iptables-save v1.4.8 on Mon Jul 9 16:16:57 2012 *nat :PREROUTING ACCEPT [2471:387127] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [206:13023] -A POSTROUTING -o eth0 -j MASQUERADE -A POSTROUTING -o eth+ -j SNAT --to-source 192.168.1.254 COMMIT # Completed on Mon Jul 9 16:16:57 2012 # Generated by iptables-save v1.4.8 on Mon Jul 9 16:16:57 2012 *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT DROP [0:0] :ANTI_SPOOF - [0:0] :BAD_FLAGS - [0:0] :BOGUS - [0:0] :LOGGING - [0:0] :MAC_SPOOF - [0:0] :NOFRAGS - [0:0] :ODDPORTS - [0:0] :OFFENDER - [0:0] :PORTSCAN - [0:0] :SMALL - [0:0] :STRINGS - [0:0] :STRINGS2 - [0:0] :forward_LOGGING - [0:0] :syn-flood - [0:0] -A INPUT -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -i all -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -i all -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -m recent --set --name DEFAULT --rsource -j PORTSCAN -A INPUT -p tcp -m tcp --tcp-option 64 -m recent --set --name DEFAULT --rsource -j BAD_FLAGS -A INPUT -p tcp -m tcp --tcp-option 128 -m recent --set --name DEFAULT --rsource -j BAD_FLAGS -A INPUT -p udp -m length --length 0:27 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p tcp -m length --length 0:39 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p icmp -m length --length 0:27 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p 30 -m length --length 0:31 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p gre -m length --length 0:39 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p esp -m length --length 0:49 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p ah -m length --length 0:35 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -m length --length 0:19 -m recent --set --name DEFAULT --rsource -j SMALL -A INPUT -p tcp -m tcp --dport 22 -m string --string "\"Version_Mapper\"" --algo bm --to 65535 -j STRINGS -A INPUT -p tcp -m tcp --dport 22 -m string --string "\"/bin/sh\"" --algo bm --to 65535 -j STRINGS -A INPUT -p tcp -m tcp --dport 443 -m string --string "TERM=xterm" --algo bm --to 65535 -j STRINGS -A INPUT -p tcp -m tcp --dport 53 -m string --string "<<I .a" --algo bm --to 65535 -j LOG --log-prefix " SID303 " -A INPUT -m conntrack --ctstate INVALID -j BOGUS -A INPUT -f -j NOFRAGS -A INPUT -i eth+ -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j syn-flood -A INPUT -p tcp -m tcp --tcp-flags SYN,ACK SYN,ACK -m conntrack --ctstate NEW -j LOG --log-prefix "reset spoof TWH " -A INPUT -p tcp -m tcp --tcp-flags SYN,ACK SYN,ACK -m conntrack --ctstate NEW -j REJECT --reject-with tcp-reset -A INPUT -p udp -m udp --sport 2:21 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A INPUT -p udp -m udp --dport 2:21 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A INPUT -p tcp -m tcp --dport 0 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A INPUT -p tcp -m tcp --sport 0 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j LOG --log-prefix "New not syn: " -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j DROP -A INPUT -s 192.168.1.223/32 -i eth+ -j ANTI_SPOOF -A INPUT -i eth+ -m mac --mac-source 12:34:56:78:90:EE -j MAC_SPOOF -A INPUT -p tcp -m tcp --dport 113 -j REJECT --reject-with tcp-reset -A INPUT -i eth+ -p tcp -m tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT ! -i eth0 -m state --state NEW -j ACCEPT -A INPUT -m recent --rcheck --seconds 300 --name DEFAULT --rsource -j OFFENDER -A INPUT -j LOGGING -A FORWARD -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -i all -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -i all -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -i all -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -m recent --set --name DEFAULT --rsource -j PORTSCAN -A FORWARD -p tcp -m tcp --dport 22 -m string --string "\"Version_Mapper\"" --algo bm --to 65535 -j STRINGS -A FORWARD -p tcp -m tcp --dport 53 -m string --string "<<I .a" --algo bm --to 65535 -j LOG --log-prefix " SID303 " -A FORWARD -p tcp -m tcp --sport 22 -m string --string "\"*GOBBLE*\"" --algo bm --to 65535 -j STRINGS2 -A FORWARD -p tcp -m tcp --sport 22 -m string --string "\"uname\"" --algo bm --to 65535 -j STRINGS2 -A FORWARD -m conntrack --ctstate INVALID -j BOGUS -A FORWARD -f -j NOFRAGS -A FORWARD -i eth+ -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j syn-flood -A FORWARD -p tcp -m tcp --tcp-flags SYN,ACK SYN,ACK -m conntrack --ctstate NEW -j LOG --log-prefix "reset spoof TWH " -A FORWARD -p tcp -m tcp --tcp-flags SYN,ACK SYN,ACK -m conntrack --ctstate NEW -j REJECT --reject-with tcp-reset -A FORWARD -p udp -m udp --sport 2:21 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A FORWARD -p udp -m udp --sport 2:21 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A FORWARD -p tcp -m tcp --dport 0 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A FORWARD -p tcp -m tcp --sport 0 -m recent --set --name DEFAULT --rsource -j ODDPORTS -A FORWARD -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j LOG --log-prefix "New not syn: " -A FORWARD -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j DROP -A FORWARD -i eth+ -p tcp -m tcp --dport 113 -j REJECT --reject-with tcp-reset -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A FORWARD -m recent --rcheck --seconds 300 --name DEFAULT --rsource -j OFFENDER -A FORWARD -j forward_LOGGING -A OUTPUT -m iprange --dst-range 182.50.0.0-182.50.15.255 -j DROP -A OUTPUT -p tcp -m tcp --sport 22 -m string --string "\"*GOBBLE*\"" --algo bm --to 65535 -j STRINGS2 -A OUTPUT -p tcp -m tcp --sport 22 -m string --string "\"uname\"" --algo bm --to 65535 -j STRINGS2 -A OUTPUT -f -j NOFRAGS -A OUTPUT -o eth+ -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -m state --state INVALID,NEW,RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -o eth0 -p tcp -m multiport --dports 31337,31335,27444,27665,20034,12345,12346,9704,137:139,1433,2049,5432,5999:6063 -j DROP -A OUTPUT -o eth0 -p tcp -m multiport --dports 5900:5910 -j DROP -A OUTPUT -o eth0 -p tcp -m multiport --sports 31337,31335,27444,27665,20034,12345,12346,9704,137:139,1433,2049,5432,5999:6063 -j DROP -A OUTPUT -o eth0 -p tcp -m multiport --sports 5900:5910 -j DROP -A ANTI_SPOOF -m limit --limit 1/sec -j LOG --log-prefix "Spoofing DENY: " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A ANTI_SPOOF -j DROP -A BAD_FLAGS -m limit --limit 1/sec -j LOG --log-prefix "BAD_FLAGs -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A BAD_FLAGS -j DROP -A BOGUS -m limit --limit 1/sec -j LOG --log-prefix "INVALID PACKET -- DROP " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A BOGUS -j DROP -A LOGGING -m limit --limit 9/hour -j LOG --log-prefix "IPTables Packet Dropped: " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A LOGGING -j DROP -A MAC_SPOOF -m limit --limit 1/sec -j LOG --log-prefix "MAC Spoofing DENY: " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A MAC_SPOOF -j DROP -A NOFRAGS -m limit --limit 1/sec -j LOG --log-prefix "Fragment -- DROP " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A NOFRAGS -j DROP -A ODDPORTS -m limit --limit 1/sec -j LOG --log-prefix "ODDPORTS -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A ODDPORTS -j DROP -A OFFENDER -m limit --limit 1/sec -j LOG --log-prefix "OFFENDER -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A OFFENDER -j DROP -A PORTSCAN -m limit --limit 1/sec -j LOG --log-prefix "PORTSCAN -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A PORTSCAN -j DROP -A SMALL -m limit --limit 1/sec -j LOG --log-prefix "SMALL -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A SMALL -j DROP -A STRINGS -m limit --limit 1/sec -j LOG --log-prefix "STRINGS -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A STRINGS -m recent --set --name DEFAULT --rsource -j DROP -A STRINGS2 -m limit --limit 1/sec -j LOG --log-prefix "STRINGS2 -- SHUN " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A STRINGS2 -m recent --set --name DEFAULT --rdest -j DROP -A forward_LOGGING -m limit --limit 9/hour -j LOG --log-prefix "forward LOGGING Dropped: " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A forward_LOGGING -j DROP -A syn-flood -m limit --limit 75/sec --limit-burst 100 -j LOG --log-prefix "SYN FLOOD 0 " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A syn-flood -m limit --limit 1/sec -j LOG --log-prefix "SYN FLOOD " --log-level 7 --log-tcp-sequence --log-tcp-options --log-ip-options -A syn-flood -j DROP COMMIT # Completed on Mon Jul 9 16:16:57 2012 # Generated by iptables-save v1.4.8 on Mon Jul 9 16:16:57 2012 *mangle :PREROUTING ACCEPT [3872:1336157] :INPUT ACCEPT [3140:1183079] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1385:198017] :POSTROUTING ACCEPT [1385:198017] -A PREROUTING -p udp -m udp --dport 33434:33542 -j TTL --ttl-inc 1 COMMIT # Completed on Mon Jul 9 16:16:57 2012
raw(走法 raw-》mangle -》nat -》filter)
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
mangle
Chain PREROUTING (policy ACCEPT 21710 packets, 8757K bytes) pkts bytes target prot opt in out source destination 3 416 TTL udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpts:33434:33542 TTL increment by 1 Chain INPUT (policy ACCEPT 18182 packets, 8040K bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 13770 packets, 1635K bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 13770 packets, 1635K bytes) pkts bytes target prot opt in out source destination
nat(ip6table 還沒有 nat)
Chain PREROUTING (policy ACCEPT 1683 packets, 255K bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 4265 268K MASQUERADE all -- * eth0 0.0.0.0/0 0.0.0.0/0 0 0 SNAT all -- * eth+ 0.0.0.0/0 0.0.0.0/0 to:123.123.1.123 Chain OUTPUT (policy ACCEPT 54 packets, 3275 bytes) pkts bytes target prot opt in out source destination
filter
Chain INPUT (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x29 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x06 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x03/0x03 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x01 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x3F recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x00 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x29 recent: SET name: DEFAULT side: source 0 0 BAD_FLAGS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp option=64 recent: SET name: DEFAULT side: source 0 0 BAD_FLAGS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp option=128 recent: SET name: DEFAULT side: source 0 0 SMALL udp -- * * 0.0.0.0/0 0.0.0.0/0 length 0:27 recent: SET name: DEFAULT side: source 0 0 SMALL tcp -- * * 0.0.0.0/0 0.0.0.0/0 length 0:39 recent: SET name: DEFAULT side: source 0 0 SMALL icmp -- * * 0.0.0.0/0 0.0.0.0/0 length 0:27 recent: SET name: DEFAULT side: source 0 0 SMALL 30 -- * * 0.0.0.0/0 0.0.0.0/0 length 0:31 recent: SET name: DEFAULT side: source 0 0 SMALL 47 -- * * 0.0.0.0/0 0.0.0.0/0 length 0:39 recent: SET name: DEFAULT side: source 0 0 SMALL esp -- * * 0.0.0.0/0 0.0.0.0/0 length 0:49 recent: SET name: DEFAULT side: source 0 0 SMALL ah -- * * 0.0.0.0/0 0.0.0.0/0 length 0:35 recent: SET name: DEFAULT side: source 0 0 SMALL all -- * * 0.0.0.0/0 0.0.0.0/0 length 0:19 recent: SET name: DEFAULT side: source 0 0 STRINGS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 STRING match "\"Version_Mapper\"" ALGO name bm TO 65535 0 0 STRINGS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 STRING match "\"/bin/sh\"" ALGO name bm TO 65535 0 0 STRINGS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 STRING match "TERM=xterm" ALGO name bm TO 65535 0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 STRING match "<<I .a" ALGO name bm TO 65535 LOG flags 0 level 4 prefix ` SID303 ' 2 80 BOGUS all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID 0 0 NOFRAGS all -f * * 0.0.0.0/0 0.0.0.0/0 2 120 syn-flood tcp -- eth+ * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x12/0x12 ctstate NEW LOG flags 0 level 4 prefix `reset spoof TWH ' 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x12/0x12 ctstate NEW reject-with tcp-reset 0 0 ODDPORTS udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spts:2:21 recent: SET name: DEFAULT side: source 0 0 ODDPORTS udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpts:2:21 recent: SET name: DEFAULT side: source 0 0 ODDPORTS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:0 recent: SET name: DEFAULT side: source 0 0 ODDPORTS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:0 recent: SET name: DEFAULT side: source 0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:!0x17/0x02 ctstate NEW LOG flags 0 level 4 prefix `New not syn: ' 0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:!0x17/0x02 ctstate NEW 0 0 ANTI_SPOOF all -- eth+ * 192.168.1.223 0.0.0.0/0 0 0 MAC_SPOOF all -- eth+ * 0.0.0.0/0 0.0.0.0/0 MAC 12:34:56:78:90:EE 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:113 reject-with tcp-reset 0 0 ACCEPT tcp -- eth+ * 0.0.0.0/0 0.0.0.0/0 tcp spt:22 state ESTABLISHED 2079 1652K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED 0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 0 0 ACCEPT all -- !eth0 * 0.0.0.0/0 0.0.0.0/0 state NEW 0 0 OFFENDER all -- * * 0.0.0.0/0 0.0.0.0/0 recent: CHECK seconds: 300 name: DEFAULT side: source 2026 279K LOGGING all -- * * 0.0.0.0/0 0.0.0.0/0 Chain FORWARD (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x29 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x06 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x03/0x03 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x01 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x3F recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x00 recent: SET name: DEFAULT side: source 0 0 PORTSCAN tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x29 recent: SET name: DEFAULT side: source 0 0 STRINGS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 STRING match "\"Version_Mapper\"" ALGO name bm TO 65535 0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 STRING match "<<I .a" ALGO name bm TO 65535 LOG flags 0 level 4 prefix ` SID303 ' 0 0 STRINGS2 tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22 STRING match "\"*GOBBLE*\"" ALGO name bm TO 65535 0 0 STRINGS2 tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22 STRING match "\"uname\"" ALGO name bm TO 65535 0 0 BOGUS all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID 0 0 NOFRAGS all -f * * 0.0.0.0/0 0.0.0.0/0 0 0 syn-flood tcp -- eth+ * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x12/0x12 ctstate NEW LOG flags 0 level 4 prefix `reset spoof TWH ' 0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x12/0x12 ctstate NEW reject-with tcp-reset 0 0 ODDPORTS udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spts:2:21 recent: SET name: DEFAULT side: source 0 0 ODDPORTS udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spts:2:21 recent: SET name: DEFAULT side: source 0 0 ODDPORTS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:0 recent: SET name: DEFAULT side: source 0 0 ODDPORTS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:0 recent: SET name: DEFAULT side: source 0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:!0x17/0x02 ctstate NEW LOG flags 0 level 4 prefix `New not syn: ' 0 0 DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:!0x17/0x02 ctstate NEW 0 0 REJECT tcp -- eth+ * 0.0.0.0/0 0.0.0.0/0 tcp dpt:113 reject-with tcp-reset 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED 0 0 OFFENDER all -- * * 0.0.0.0/0 0.0.0.0/0 recent: CHECK seconds: 300 name: DEFAULT side: source 0 0 forward_LOGGING all -- * * 0.0.0.0/0 0.0.0.0/0 Chain OUTPUT (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 7 420 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 destination IP range 182.50.0.0-182.50.15.255 0 0 STRINGS2 tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22 STRING match "\"*GOBBLE*\"" ALGO name bm TO 65535 0 0 STRINGS2 tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22 STRING match "\"uname\"" ALGO name bm TO 65535 0 0 NOFRAGS all -f * * 0.0.0.0/0 0.0.0.0/0 0 0 ACCEPT tcp -- * eth+ 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 state NEW,ESTABLISHED 1784 320K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED 356 22501 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID,NEW,RELATED,ESTABLISHED 0 0 DROP tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 multiport dports 31337,31335,27444,27665,20034,12345,12346,9704,137:139,1433,2049,5432,5999:6063 0 0 DROP tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 multiport dports 5900:5910 0 0 DROP tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 multiport sports 31337,31335,27444,27665,20034,12345,12346,9704,137:139,1433,2049,5432,5999:6063 0 0 DROP tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 multiport sports 5900:5910 Chain ANTI_SPOOF (1 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `Spoofing DENY: ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain BAD_FLAGS (2 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `BAD_FLAGs -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain BOGUS (2 references) pkts bytes target prot opt in out source destination 2 80 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `INVALID PACKET -- DROP ' 2 80 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain LOGGING (1 references) pkts bytes target prot opt in out source destination 34 5100 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 9/hour burst 5 LOG flags 7 level 7 prefix `IPTables Packet Dropped: ' 2026 279K DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain MAC_SPOOF (1 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `MAC Spoofing DENY: ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain NOFRAGS (3 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `Fragment -- DROP ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain ODDPORTS (8 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `ODDPORTS -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain OFFENDER (2 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `OFFENDER -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain PORTSCAN (14 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `PORTSCAN -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain SMALL (8 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `SMALL -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain STRINGS (4 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `STRINGS -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 recent: SET name: DEFAULT side: source Chain STRINGS2 (4 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `STRINGS2 -- SHUN ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 recent: SET name: DEFAULT side: dest Chain forward_LOGGING (1 references) pkts bytes target prot opt in out source destination 0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 9/hour burst 5 LOG flags 7 level 7 prefix `forward LOGGING Dropped: ' 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 Chain syn-flood (2 references) pkts bytes target prot opt in out source destination 2 120 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 75/sec burst 100 LOG flags 7 level 7 prefix `SYN FLOOD 0 ' 2 120 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 1/sec burst 5 LOG flags 7 level 7 prefix `SYN FLOOD ' 2 120 DROP all -- * * 0.0.0.0/0 0.0.0.0/0