IPTables is running on my web server. I really need SSH dynamic port forwarding, but my IPTables DROP any INPUT/OUPUT connection, only allow some ports.
For FORWARD chain, I wrote these rules:
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcpflags:! 0x17/0x02 state NEW
ACCEPT all -f 0.0.0.0/0 0.0.0.0/0 limit: avg 100/sec burst 100
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 limit: avg 2/sec burst 10
DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID
My rules can block any SSH dynamic port forwarding connection.
What rules I need to write? Don't tell me to "Disable IPTables", I need firewall to anti-cracker.