{"id":521,"date":"2012-12-04T09:33:47","date_gmt":"2012-12-04T08:33:47","guid":{"rendered":"http:\/\/elkano.org\/blog\/?p=521"},"modified":"2012-12-04T09:34:31","modified_gmt":"2012-12-04T08:34:31","slug":"how-to-clear-iptables-rules","status":"publish","type":"post","link":"https:\/\/elkano.org\/blog\/how-to-clear-iptables-rules\/","title":{"rendered":"How to clear iptables rules"},"content":{"rendered":"<p>I am using the following script to clear all iptables rules.  I use the script when I am debugging my iptables rules.<\/p>\n<pre class=\"dontquote prettyprint lang-sh\">\r\n#!\/bin\/bash\r\n\r\n\r\n\/sbin\/iptables -P INPUT   ACCEPT\r\n\/sbin\/iptables -P OUTPUT  ACCEPT\r\n\/sbin\/iptables -P FORWARD ACCEPT\r\n\/sbin\/iptables -F\r\n\/sbin\/iptables -X\r\n\r\nfor table in filter nat mangle; do\r\n    \/sbin\/iptables -t $table -F\r\n    \/sbin\/iptables -t $table -X\r\n    \/sbin\/iptables -t $table -Z\r\ndone\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I am using the following script to clear all iptables rules. I use the script when I am debugging my iptables rules. #!\/bin\/bash \/sbin\/iptables -P INPUT ACCEPT \/sbin\/iptables -P OUTPUT ACCEPT \/sbin\/iptables -P FORWARD ACCEPT \/sbin\/iptables -F \/sbin\/iptables -X for table in filter nat mangle; do \/sbin\/iptables -t $table -F \/sbin\/iptables -t $table -X \/sbin\/iptables [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[71],"_links":{"self":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/521"}],"collection":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":13,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":534,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/posts\/521\/revisions\/534"}],"wp:attachment":[{"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elkano.org\/blog\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}