{"id":7977,"date":"2020-06-22T15:46:42","date_gmt":"2020-06-22T07:46:42","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=7977"},"modified":"2020-06-22T15:46:43","modified_gmt":"2020-06-22T07:46:43","slug":"ufw","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ufw","title":{"rendered":"ufw\u547d\u4ee4 – \u7ba1\u7406netfilter\u9632\u706b\u5899\u7684\u7a0b\u5e8f"},"content":{"rendered":"\n

ufw\u7a0b\u5e8f\u7528\u4e8e\u7ba1\u7406Linux\u9632\u706b\u5899\uff0c\u65e8\u5728\u4e3a\u7528\u6237\u63d0\u4f9b\u6613\u4e8e\u4f7f\u7528\u7684\u754c\u9762\u3002<\/p>\n\n\n\n

Linux\u539f\u59cb\u7684\u9632\u706b\u5899\u5de5\u5177iptables\u7531\u4e8e\u8fc7\u4e8e\u7e41\u7410\uff0c\u6240\u4ee5ubuntu\u7cfb\u7edf\u9ed8\u8ba4\u63d0\u4f9b\u4e86\u4e00\u4e2a\u57fa\u4e8eiptables\u4e4b\u4e0a\u7684\u9632\u706b\u5899\u5de5\u5177ufw\u3002\u800cUFW\u652f\u6301\u56fe\u5f62\u754c\u9762\u64cd\u4f5c\uff0c\u53ea\u9700\u5728\u547d\u4ee4\u884c\u8fd0\u884cufw\u547d\u4ee4\u5373\u80fd\u770b\u5230\u4e00\u7cfb\u5217\u7684\u64cd\u4f5c\u3002<\/p>\n\n\n\n

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

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

enable<\/td>\u542f\u52a8ufw<\/td><\/tr>
disable<\/td>\u5173\u95edufw<\/td><\/tr>
reload<\/td>\u91cd\u65b0\u52a0\u8f7dufw<\/td><\/tr>
logging on|off|LEVEL<\/td>\u65e5\u5fd7 \u542f\u52a8|\u5173\u95ed|\u7ea7\u522b<\/td><\/tr>
reset<\/td>\u91cd\u7f6e\u914d\u7f6e<\/td><\/tr>
status<\/td>\u67e5\u770b\u72b6\u6001<\/td><\/tr>
show REPORT<\/td>\u663e\u793a\u201c\u62a5\u544a\u201d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8ufw\uff0c\u542f\u52a8ufw\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ufw enable<\/pre>\n\n\n\n

\u7981\u6b62\u5f00\u673a\u542f\u52a8\uff0c\u5173\u95edufw\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ufw disable<\/pre>\n\n\n\n

\u91cd\u542fufw\u9632\u706b\u5899\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ufw reload<\/pre>\n\n\n\n

\u663e\u793a\u9632\u706b\u5899\u72b6\u6001\u53ca\u89c4\u5219\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ufw status<\/pre>\n\n\n\n

\u91cd\u7f6eufw\u9632\u706b\u5899\u914d\u7f6e\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ufw reset<\/pre>\n\n\n\n

\u663e\u793a\u201c\u62a5\u544a\u201d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ufw show raw<\/pre>\n","protected":false},"excerpt":{"rendered":"

ufw\u7a0b\u5e8f\u7528\u4e8e\u7ba1\u7406Linux\u9632\u706b\u5899\uff0c\u65e8\u5728\u4e3a\u7528\u6237\u63d0\u4f9b\u6613\u4e8e\u4f7f\u7528\u7684\u754c\u9762\u3002 Linux\u539f\u59cb\u7684\u9632\u706b\u5899\u5de5\u5177iptables […]<\/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\/7977"}],"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=7977"}],"version-history":[{"count":8,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7977\/revisions"}],"predecessor-version":[{"id":8081,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7977\/revisions\/8081"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=7977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=7977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=7977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}