{"id":3801,"date":"2016-04-18T12:02:21","date_gmt":"2016-04-18T12:02:21","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=3801"},"modified":"2016-04-18T12:02:21","modified_gmt":"2016-04-18T12:02:21","slug":"temporarily-disable-iptables-rule","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/temporarily-disable-iptables-rule\/","title":{"rendered":"How to temporarily disable an iptables rule"},"content":{"rendered":"<p>If you want to temporarily disable an iptables rule, you need to edit it at the right point in the chain, since the rules are enforced in a specific order. Fortunately iptables lets you save and reload a list of rules, so the way to temporarily disable a rule is to save off the rule list, edit it, and then restore it:<\/p>\n<pre lang=\"bash\">\niptables-save > ~\/firewall-v1.rules\niptables-save > ~\/firewall-v2.rules\nvi ~\/firewall.rules\niptables-restore ~\/firewall-v1.rules\n<\/pre>\n<p>You can comment out lines with a &#8220;#&#8221;, then restore them when you&#8217;re finished with your task.<\/p>\n<p>It seems that iptables-restore deletes the file, so having two copies allows you to revert if you wish.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to temporarily disable iptables firewall rules<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[232,297,338],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3801"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=3801"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3801\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=3801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=3801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=3801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}