{"id":2944,"date":"2015-07-23T23:27:27","date_gmt":"2015-07-23T21:27:27","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=2944"},"modified":"2015-07-24T13:12:34","modified_gmt":"2015-07-24T11:12:34","slug":"debian-save-current-active-iptables-rules","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/debian-save-current-active-iptables-rules\/","title":{"rendered":"Debian: Save current active iptables rules"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_2944 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_2944')){$('.twoclick_social_bookmarks_post_2944').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Debian%3A%20Save%20current%20active%20iptables%20rules\",\"the_excerpt\":\"Hello%2C%0D%0A%0D%0Asome%20basic%20commands%20to%20handle%20a%20ruleset%20of%20iptables.%0D%0A%0D%0ATo%20dump%20all%20active%20iptables%20rules%20to%20the%20console%20rules%20use%0D%0A%0D%0A%0D%0Aroot%40debdev%3A~%20%23%20iptables-save%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/debian-save-current-active-iptables-rules\\\/\",\"post_id\":2944,\"post_title_referrer_track\":\"Debian%3A+Save+current+active+iptables+rules\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hello,<\/p>\n<p>some basic commands to handle a ruleset of iptables.<\/p>\n<p>To dump all active iptables rules to the console rules use<\/p>\n<p><code><br \/>\nroot@debdev:~ # iptables-save<br \/>\n<\/code><br \/>\n<!--more--><br \/>\nIf you want to load these rules on demand, save all rules in file of your home<br \/>\n<code><br \/>\nroot@debdev:~ # iptables-save > ~\/firewall.rules<br \/>\n<\/code><br \/>\nTo reload all rules on demand use the following command<br \/>\n<code><br \/>\nroot@debdev:~ # iptables-restore <  ~\/firewall.rules\n<\/code><\/p>\n<p>If your rules should survive a system restart, install the package iptables-persistent and write the output of the save command to a file <strong>\/etc\/iptables\/rules.v4<\/strong><br \/>\n<code><br \/>\nroot@debdev:~ # apt-get install iptables-persistent<br \/>\nroot@debdev:~ # iptables-save > \/etc\/iptables\/rules.v4<br \/>\n<\/code><\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, some basic commands to handle a ruleset of iptables. To dump all active iptables rules to the console rules use root@debdev:~ # iptables-save<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[335,202,719,720,721,722,325,718,717],"class_list":["post-2944","post","type-post","status-publish","format-standard","hentry","category-linux","tag-debian","tag-firewall","tag-iptables","tag-load-at-boot","tag-permament","tag-permanent","tag-persistent","tag-reboot","tag-rules-save"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=2944"}],"version-history":[{"count":6,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2944\/revisions"}],"predecessor-version":[{"id":2953,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/2944\/revisions\/2953"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=2944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=2944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=2944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}