<\/span><\/h2>\n\n\n\n\u914d\u7f6eUFW\u9632\u706b\u5899\uff0c\u53ea\u653e\u884ccloudflare\u7684IP\u3002\u5176\u4f59\u7684\u4e00\u5f8b\u7981\u6b62\u3002<\/p>\n\n\n\n
\u4f7f\u7528\u4e0b\u9762\u7684\u811a\u672c\u53ef\u4ee5\u65b9\u4fbf\u7684\u5c06cloudflare IP\u52a0\u5165手机版\u7684\u9632\u706b\u5899\u767d\u540d\u5355\u4e2d\u3002<\/p>\n\n\n\n
github\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/raw.githubusercontent.com\/okoklai\/studes\/master\/cfip.sh<\/p>\n\n\n\n
#!\/bin\/bash\nif !command -v ufw >\/dev\/null 2>&1; then\necho \"UFW not found! please install it from your package manager!\"\necho \"For RHEL\/CentOS\/Fedora, use yum install ufw.\"\necho \"For Ubuntu\/Debian\/Proxmox VE, use apt install ufw.\"\necho \"Don't forgot to allow your ssh port before enable UFW!\"\necho \"When you finished it, just use command ufw enable to enable it!\"\nexit 1\nfi\nfor line in `curl http:\/\/www.cloudflare.com\/ips-v4`\ndo\n echo \"Reading $line from CloudFlare's offical ip list.\"\n ufw allow from $line to any port 80\n ufw allow from $line to any port 443\ndone\nfor line in `curl http:\/\/www.cloudflare.com\/ips-v6`\ndo\n echo \"Reading $line from CloudFlare's offical ip list.\"\n ufw allow from $line to any port 80\n ufw allow from $line to any port 443\ndone<\/code><\/pre>\n\n\n\n\u6b64\u811a\u672c\u53ea\u4f1a\u8bbe\u7f6e\u56fa\u5b9aip\u5141\u8bb8\u8bbf\u95ee80\u3001443\u7aef\u53e3\uff0c\u5176\u4ed6\u7684ufw\u8bbe\u7f6e\u4e0d\u4f1a\u4fee\u6539\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u80cc\u666f \u6700\u8fd1\u7f51\u7ad9\u88ab\u75af\u72c2CC\uff0c\u5f88\u4e0d\u5e78\u7684\u6e90\u7ad9IP\u88ab\u66b4\u9732\u3002\u5728\u4f7f\u7528\u4e86cloudflare\u9632\u62a4\u76fe\u7684\u60c5\u51b5\u4e0b\uff0c\u653b\u51fb\u8005\u76f4\u63a5\u6253IP […]<\/p>\n","protected":false},"author":1,"featured_media":43294,"comment_status":"open","ping_status":"closed","sticky":false,"template":"single-with-sidebar","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[21,34,41,17,207,462],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/50427"}],"collection":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/comments?post=50427"}],"version-history":[{"count":2,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/50427\/revisions"}],"predecessor-version":[{"id":50430,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/posts\/50427\/revisions\/50430"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/media\/43294"}],"wp:attachment":[{"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/media?parent=50427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/categories?post=50427"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xyryd.com\/wp-json\/wp\/v2\/tags?post=50427"}],"curies":[{"name":"wp","href":"http:\/\/api.w.org\/{rel}","templated":true}]}}