IP Tables - help
Hi guys, I have added rule to REJECT tcp dport 22 & can you please let me know what rule I have to add to delete that particular "REJECT" rule, so that dport can be allowed. please let me know.
My current rule mentioned below.. Chain INPUT (policy DROP 73 packets, 4764 bytes) pkts bytes target prot opt in out source destination 2 120 REJECT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 reject-with icmp-port-unreachable 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 49 7874 ACCEPT tcp -- eth0 * 172.16.0.0/16 0.0.0.0/0 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 0 0 ACCEPT tcp -- eth0 * 172.16.0.0/16 0.0.0.0/0 |
What is the cmd you use to add the reject?
If you used something like this: Code:
iptables -A INSERT -p tcp --dport 22 -j REJECT Code:
iptables -D INSERT -p tcp --dport 22 -j REJECT |
You can also do a iptables --list --line-numbers
Using this information you can do the following iptables -D <chain> <line-number> When you do, dont forget to save your chains :) |
All times are GMT -5. The time now is 11:23 PM. |