Score:0

How to undo an iptables command?

sk flag
skg

I accidently did this iptables command on CentOS7. How to undo it?

sudo iptables -I DOCKER-USER -i src_if -o dst_if -j ACCEPT
Score:1
nc flag

Try one of these:

  • Reload all of your iptables rules using whichever method was used to load them during boot
  • Run the same command but replace -I with -D to delete the matching rule
  • Use iptables -L --line-numbers to list all your rules, and find the offending rule, and delete it with iptables -D chain num where chain is the name of the table (first word in the heading for the section) and num is the number on the left of the rule
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.