{"id":4706,"date":"2019-08-24T00:59:51","date_gmt":"2019-08-23T16:59:51","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4706"},"modified":"2019-08-24T00:59:53","modified_gmt":"2019-08-23T16:59:53","slug":"iptables-restore","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/iptables-restore","title":{"rendered":"iptables-restore\u547d\u4ee4 – \u8fd8\u539fiptables\u8868\u7684\u914d\u7f6e"},"content":{"rendered":"\n

iptables-restore\u547d\u4ee4\u7528\u6765\u8fd8\u539fiptables-save\u547d\u4ee4\u6240\u5907\u4efd\u7684iptables\u914d\u7f6e\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>iptables-restore [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-c<\/td>\u6307\u5b9a\u5728\u8fd8\u539fiptables\u8868\u65f6\u5019\uff0c\u8fd8\u539f\u5f53\u524d\u7684\u6570\u636e\u5305\u8ba1\u6570\u5668\u548c\u5b57\u8282\u8ba1\u6570\u5668\u7684\u503c<\/td><\/tr>
-t<\/td>\u6307\u5b9a\u8981\u8fd8\u539f\u8868\u7684\u540d\u79f0<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u8fd8\u539fiptables\u914d\u7f6e\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# iptables-restore < iptables.bak<\/pre>\n\n\n\n

\u6307\u5b9a\u5728\u8fd8\u539fiptables\u8868\u65f6\u5019\uff0c\u8fd8\u539f\u5f53\u524d\u7684\u6570\u636e\u5305\u8ba1\u6570\u5668\u548c\u5b57\u8282\u8ba1\u6570\u5668\u7684\u503c\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# iptables-restore -c < iptables.bak<\/pre>\n\n\n\n

\u6307\u5b9a\u8981\u8fd8\u539f\u8868\u7684\u540d\u79f0\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# iptables-restore -t filter.bak<\/pre>\n","protected":false},"excerpt":{"rendered":"

iptables-restore\u547d\u4ee4\u7528\u6765\u8fd8\u539fiptables-save\u547d\u4ee4\u6240\u5907\u4efd\u7684iptables\u914d\u7f6e\u3002 \u8bed\u6cd5 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4706"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4706"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4706\/revisions"}],"predecessor-version":[{"id":4745,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4706\/revisions\/4745"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}