LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to delete the one of iptables chains? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-delete-the-one-of-iptables-chains-394788/)

80mail 12-20-2005 02:27 AM

How to delete the one of iptables chains?
 
Dear all,
My nat Chain PREROUTING is following. How to delete the one of chains? Thanks for any ideas.



Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT udp -- anywhere anywhere udp dpt:telnet to:192.168.1.218:23
DNAT udp -- anywhere anywhere udp dpt:telnet to:192.168.1.218:23
DNAT tcp -- anywhere anywhere tcp dpt:telnet to:192.168.1.218:23
DNAT tcp -- anywhere anywhere tcp dpt:telnet to:192.168.1.218:23
DNAT tcp -- anywhere anywhere tcp dpt:telnet to:192.168.1.218:23
DNAT udp -- anywhere anywhere udp dpt:telnet to:192.168.1.218:23


Tommy

bathory 12-21-2005 02:16 AM

If you want to delete of of the rules under the chain PREROUTING, run:
Code:

iptables -D PREROUTING rulenum
where rulenum is the number of the rule you want to delete. For more details
Code:

man iptables


All times are GMT -5. The time now is 05:48 AM.