{"id":2194,"date":"2018-04-01T06:58:22","date_gmt":"2018-03-31T22:58:22","guid":{"rendered":"https:\/\/www.ookangzheng.com\/?p=2194"},"modified":"2020-05-24T15:58:51","modified_gmt":"2020-05-24T07:58:51","slug":"automatically-loading-iptables-rules-on-debian-ubuntu","status":"publish","type":"post","link":"https:\/\/www.ookangzheng.com\/automatically-loading-iptables-rules-on-debian-ubuntu\/","title":{"rendered":"Automatically loading iptables rules on Debian\/Ubuntu"},"content":{"rendered":"\n

If you want your iptables rules automatically loaded every time your networking comes up on your Debian or Ubuntu server, you can follow these easy steps.<\/p>\n\n\n\n

\/\/ First save your firewall rules\niptables-save > \/etc\/iptables\/iptables.rules\n\n\/\/ Edit startup file at \nnano \/etc\/network\/if-up.d\/iptables\n\n\/\/ Fill in the correct iptables path\n#!\/bin\/sh\niptables-restore < \/etc\/iptables\/iptables.rules<\/code><\/pre>\n\n\n\n

Now, the rules will be restored each time your networking scripts start (or restart).<\/p>\n","protected":false},"excerpt":{"rendered":"

If you want your iptables rules automatically loaded every time your networking comes up on your Debian or Ubuntu server,…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,32],"tags":[],"class_list":["post-2194","post","type-post","status-publish","format-standard","hentry","category-linux","category-technology"],"_links":{"self":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/2194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/comments?post=2194"}],"version-history":[{"count":0,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/2194\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/media?parent=2194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/categories?post=2194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/tags?post=2194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}