{"id":2624,"date":"2019-01-30T17:58:51","date_gmt":"2019-01-30T09:58:51","guid":{"rendered":"http:\/\/116.196.113.144\/?p=2624"},"modified":"2019-02-02T11:29:50","modified_gmt":"2019-02-02T03:29:50","slug":"firewalld%e9%98%b2%e7%81%ab%e5%a2%99","status":"publish","type":"post","link":"https:\/\/www.liangliang.org.cn\/?p=2624","title":{"rendered":"firewalld\u9632\u706b\u5899"},"content":{"rendered":"<h3>\u9632\u706b\u5899<\/h3>\n<p style=\"background: white;\">\u9632\u706b\u5899\u662f\u4e00\u7ec4\u89c4\u5219\u3002\u5f53\u6570\u636e\u5305\u8fdb\u51fa\u53d7\u4fdd\u62a4\u7684\u7f51\u7edc\u533a\u57df\u65f6\uff0c\u8fdb\u51fa\u5185\u5bb9\uff08\u7279\u522b\u662f\u5173\u4e8e\u5176\u6765\u6e90\u3001\u76ee\u6807\u548c\u4f7f\u7528\u7684\u534f\u8bae\u7b49\u4fe1\u606f\uff09\u4f1a\u6839\u636e\u9632\u706b\u5899\u89c4\u5219\u8fdb\u884c\u68c0\u6d4b\uff0c\u4ee5\u786e\u5b9a\u662f\u5426\u5141\u8bb8\u5176\u901a\u8fc7\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50:<\/p>\n<p style=\"text-align: center; background: white;\"><img decoding=\"async\" src=\"http:\/\/116.196.113.144\/wp-content\/uploads\/2019\/01\/013019_1248_firewalld1-1.jpg\" alt=\"\" \/><span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center; background: white;\"><span style=\"font-family: \u5b8b\u4f53;\"><span style=\"color: #999999; font-size: 10pt;\"><em>\u9632\u706b\u5899\u53ef\u4ee5\u6839\u636e\u534f\u8bae\u6216\u57fa\u4e8e\u76ee\u6807\u7684\u89c4\u5219\u8fc7\u6ee4\u8bf7\u6c42\u3002<\/em><\/span><span style=\"font-size: 12pt;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\">\u4e00\u65b9\u9762\uff0c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Iptables\" target=\"_blank\" rel=\"noopener\">iptables<\/a> \u662f Linux \u673a\u5668\u4e0a\u7ba1\u7406\u9632\u706b\u5899\u89c4\u5219\u7684\u5de5\u5177\u3002<\/p>\n<p style=\"background: white;\">\u53e6\u4e00\u65b9\u9762\uff0c<a href=\"https:\/\/firewalld.org\/\" target=\"_blank\" rel=\"noopener\">firewalld<\/a> \u4e5f\u662f Linux \u673a\u5668\u4e0a\u7ba1\u7406\u9632\u706b\u5899\u89c4\u5219\u7684\u5de5\u5177\u3002<\/p>\n<p style=\"background: white;\">\u4f60\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f\u5982\u679c\u6211\u544a\u8bc9\u4f60\u8fd8\u6709\u53e6\u5916\u4e00\u79cd\u5de5\u5177\uff0c\u53eb\u505a <a href=\"https:\/\/wiki.nftables.org\/wiki-nftables\/index.php\/Main_Page\" target=\"_blank\" rel=\"noopener\">nftables<\/a>\uff0c\u8fd9\u4f1a\u4e0d\u4f1a\u7cdf\u8e4b\u4f60\u7684\u7f8e\u597d\u4e00\u5929\u5462\uff1f<\/p>\n<p style=\"background: white;\">\u597d\u5427\uff0c\u6211\u627f\u8ba4\u6574\u4ef6\u4e8b\u786e\u5b9e\u6709\u70b9\u597d\u7b11\uff0c\u6240\u4ee5\u8ba9\u6211\u6765\u89e3\u91ca\u4e00\u4e0b\u3002\u8fd9\u4e00\u5207\u90fd\u4ece Netfilter \u5f00\u59cb\uff0c\u5b83\u5728 Linux \u5185\u6838\u6a21\u5757\u7ea7\u522b\u63a7\u5236\u8bbf\u95ee\u7f51\u7edc\u6808\u3002\u51e0\u5341\u5e74\u6765\uff0c\u7ba1\u7406 Netfilter \u94a9\u5b50\u7684\u4e3b\u8981\u547d\u4ee4\u884c\u5de5\u5177\u662f iptables \u89c4\u5219\u96c6\u3002<\/p>\n<p style=\"background: white;\">\u56e0\u4e3a\u8c03\u7528\u8fd9\u4e9b\u89c4\u5219\u6240\u9700\u7684\u8bed\u6cd5\u770b\u8d77\u6765\u6709\u70b9\u6666\u6da9\u96be\u61c2\uff0c\u6240\u4ee5\u5404\u79cd\u7528\u6237\u53cb\u597d\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u5982 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Uncomplicated_Firewall\" target=\"_blank\" rel=\"noopener\">ufw<\/a> \u548c firewalld \u88ab\u5f15\u5165\uff0c\u4f5c\u4e3a\u66f4\u9ad8\u7ea7\u522b\u7684 Netfilter \u89e3\u91ca\u5668\u3002\u7136\u800c\uff0cufw \u548c firewalld \u4e3b\u8981\u662f\u4e3a\u89e3\u51b3\u5355\u72ec\u7684\u8ba1\u7b97\u673a\u6240\u9762\u4e34\u7684\u5404\u79cd\u95ee\u9898\u800c\u8bbe\u8ba1\u7684\u3002\u6784\u5efa\u5168\u65b9\u9762\u7684\u7f51\u7edc\u89e3\u51b3\u65b9\u6848\u901a\u5e38\u9700\u8981 iptables\uff0c\u6216\u8005\u4ece 2014 \u5e74\u8d77\uff0c\u5b83\u7684\u66ff\u4ee3\u54c1 nftables (nft \u547d\u4ee4\u884c\u5de5\u5177)\u3002<\/p>\n<p style=\"background: white;\">iptables \u6ca1\u6709\u6d88\u5931\uff0c\u4ecd\u7136\u88ab\u5e7f\u6cdb\u4f7f\u7528\u7740\u3002\u4e8b\u5b9e\u4e0a\uff0c\u5728\u672a\u6765\u7684\u8bb8\u591a\u5e74\u91cc\uff0c\u4f5c\u4e3a\u4e00\u540d\u7ba1\u7406\u5458\uff0c\u4f60\u5e94\u8be5\u4f1a\u4f7f\u7528 iptables \u6765\u4fdd\u62a4\u7684\u7f51\u7edc\u3002\u4f46\u662f nftables \u901a\u8fc7\u64cd\u4f5c\u7ecf\u5178\u7684 Netfilter \u5de5\u5177\u96c6\u5e26\u6765\u4e86\u4e00\u4e9b\u91cd\u8981\u7684\u5d2d\u65b0\u7684\u529f\u80fd\u3002<\/p>\n<p style=\"background: white;\">\u4ece\u73b0\u5728\u5f00\u59cb\uff0c\u6211\u5c06\u901a\u8fc7\u793a\u4f8b\u5c55\u793a firewalld \u548c iptables \u5982\u4f55\u89e3\u51b3\u7b80\u5355\u7684\u8fde\u63a5\u95ee\u9898\u3002<\/p>\n<h3>\u4f7f\u7528 firewalld \u914d\u7f6e HTTP \u8bbf\u95ee<\/h3>\n<p style=\"background: white;\">\u6b63\u5982\u4f60\u80fd\u4ece\u5b83\u7684\u540d\u5b57\u4e2d\u731c\u5230\u7684\uff0cfirewalld \u662f <a href=\"https:\/\/en.wikipedia.org\/wiki\/Systemd\" target=\"_blank\" rel=\"noopener\">systemd<\/a> \u5bb6\u65cf\u7684\u4e00\u90e8\u5206\u3002firewalld \u53ef\u4ee5\u5b89\u88c5\u5728 Debian\/Ubuntu \u673a\u5668\u4e0a\uff0c\u4e0d\u8fc7\uff0c\u5b83\u9ed8\u8ba4\u5b89\u88c5\u5728 RedHat \u548c CentOS \u4e0a\u3002\u5982\u679c\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u7740\u50cf Apache \u8fd9\u6837\u7684 web \u670d\u52a1\u5668\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u670d\u52a1\u5668\u7684 web \u6839\u76ee\u5f55\u6765\u786e\u8ba4\u9632\u706b\u5899\u662f\u5426\u6b63\u5728\u5de5\u4f5c\u3002\u5982\u679c\u7f51\u7ad9\u4e0d\u53ef\u8bbf\u95ee\uff0c\u90a3\u4e48 firewalld \u6b63\u5728\u5de5\u4f5c\u3002<\/p>\n<p style=\"background: white;\">\u4f60\u53ef\u4ee5\u4f7f\u7528 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">firewall-cmd<\/span> \u5de5\u5177\u4ece\u547d\u4ee4\u884c\u7ba1\u7406 firewalld \u8bbe\u7f6e\u3002\u6dfb\u52a0 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">\u2013state<\/span> \u53c2\u6570\u5c06\u8fd4\u56de\u5f53\u524d\u9632\u706b\u5899\u7684\u72b6\u6001:<\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code># firewall-cmd --state\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>running\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cfirewalld \u5904\u4e8e\u8fd0\u884c\u72b6\u6001\uff0c\u5e76\u62d2\u7edd\u6240\u6709\u4f20\u5165\u6d41\u91cf\uff0c\u4f46\u6709\u51e0\u4e2a\u4f8b\u5916\uff0c\u5982 SSH\u3002\u8fd9\u610f\u5473\u7740\u4f60\u7684\u7f51\u7ad9\u4e0d\u4f1a\u6709\u592a\u591a\u7684\u8bbf\u95ee\u8005\uff0c\u8fd9\u65e0\u7591\u4f1a\u4e3a\u4f60\u8282\u7701\u5927\u91cf\u7684\u6570\u636e\u4f20\u8f93\u6210\u672c\u3002\u7136\u800c\uff0c\u8fd9\u4e0d\u662f\u4f60\u5bf9 web \u670d\u52a1\u5668\u7684\u8981\u6c42\uff0c\u4f60\u5e0c\u671b\u6253\u5f00 HTTP \u548c HTTPS \u7aef\u53e3\uff0c\u6309\u7167\u60ef\u4f8b\uff0c\u8fd9\u4e24\u4e2a\u7aef\u53e3\u5206\u522b\u88ab\u6307\u5b9a\u4e3a 80 \u548c 443\u3002firewalld \u63d0\u4f9b\u4e86\u4e24\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002\u4e00\u4e2a\u662f\u901a\u8fc7 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">\u2013add-port<\/span> \u53c2\u6570\uff0c\u8be5\u53c2\u6570\u76f4\u63a5\u5f15\u7528\u7aef\u53e3\u53f7\u53ca\u5176\u5c06\u4f7f\u7528\u7684\u7f51\u7edc\u534f\u8bae\uff08\u5728\u672c\u4f8b\u4e2d\u4e3aTCP\uff09\u3002 \u53e6\u5916\u4e00\u4e2a\u662f\u901a\u8fc7 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">\u2013permanent<\/span> \u53c2\u6570\uff0c\u5b83\u544a\u8bc9 firewalld \u5728\u6bcf\u6b21\u670d\u52a1\u5668\u542f\u52a8\u65f6\u52a0\u8f7d\u6b64\u89c4\u5219\uff1a<\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code># <span style=\"color: red;\">firewall-cmd --permanent --add-port=80\/tcp  (\u5e38\u7528)<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code># firewall-cmd --permanent --add-port=443\/tcp\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\"><span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">\u2013reload<\/span> \u53c2\u6570\u5c06\u8fd9\u4e9b\u89c4\u5219\u5e94\u7528\u4e8e\u5f53\u524d\u4f1a\u8bdd\uff1a<\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code># firewall-cmd --reload\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\u67e5\u770b\u5f53\u524d\u9632\u706b\u5899\u4e0a\u7684\u8bbe\u7f6e\uff0c\u8fd0\u884c <span style=\"font-family: \u5b8b\u4f53;\"><span style=\"font-size: 12pt;\">\u2013list-services<\/span>\uff1a<\/span><\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code># firewall-cmd --list-services\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>dhcpv6-client http https ssh\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\u5047\u8bbe\u60a8\u5df2\u7ecf\u5982\u524d\u6240\u8ff0\u6dfb\u52a0\u4e86\u6d4f\u89c8\u5668\u8bbf\u95ee\uff0c\u90a3\u4e48 HTTP\u3001HTTPS \u548c SSH \u7aef\u53e3\u73b0\u5728\u90fd\u5e94\u8be5\u662f\u548c <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">dhcpv6-client<\/span> \u4e00\u6837\u5f00\u653e\u7684 \u2014\u2014 \u5b83\u5141\u8bb8 Linux \u4ece\u672c\u5730 DHCP \u670d\u52a1\u5668\u8bf7\u6c42 IPv6 IP \u5730\u5740\u3002<\/p>\n<h3>\u4f7f\u7528 iptables \u914d\u7f6e\u9501\u5b9a\u7684\u5ba2\u6237\u4fe1\u606f\u4ead<\/h3>\n<p style=\"background: white;\">\u6211\u76f8\u4fe1\u4f60\u5df2\u7ecf\u770b\u5230\u4e86\u4fe1\u606f\u4ead\u2014\u2014\u5b83\u4eec\u662f\u653e\u5728\u673a\u573a\u3001\u56fe\u4e66\u9986\u548c\u5546\u52a1\u573a\u6240\u7684\u76d2\u5b50\u91cc\u7684\u5e73\u677f\u7535\u8111\u3001\u89e6\u6478\u5c4f\u548c ATM \u7c7b\u7535\u8111\uff0c\u9080\u8bf7\u987e\u5ba2\u548c\u8def\u4eba\u6d4f\u89c8\u5185\u5bb9\u3002\u5927\u591a\u6570\u4fe1\u606f\u4ead\u7684\u95ee\u9898\u662f\uff0c\u4f60\u901a\u5e38\u4e0d\u5e0c\u671b\u7528\u6237\u50cf\u5728\u81ea\u5df1\u5bb6\u4e00\u6837\uff0c\u628a\u4ed6\u4eec\u5f53\u6210\u81ea\u5df1\u7684\u8bbe\u5907\u3002\u5b83\u4eec\u901a\u5e38\u4e0d\u662f\u7528\u6765\u6d4f\u89c8\u3001\u89c2\u770b YouTube \u89c6\u9891\u6216\u5bf9\u4e94\u89d2\u5927\u697c\u53d1\u8d77\u62d2\u7edd\u670d\u52a1\u653b\u51fb\u7684\u3002\u56e0\u6b64\uff0c\u4e3a\u4e86\u786e\u4fdd\u5b83\u4eec\u6ca1\u6709\u88ab\u6ee5\u7528\uff0c\u4f60\u9700\u8981\u9501\u5b9a\u5b83\u4eec\u3002<\/p>\n<p style=\"background: white;\">\u4e00\u79cd\u65b9\u6cd5\u662f\u5e94\u7528\u67d0\u79cd\u4fe1\u606f\u4ead\u6a21\u5f0f\uff0c\u65e0\u8bba\u662f\u901a\u8fc7\u5de7\u5999\u4f7f\u7528 Linux \u663e\u793a\u7ba1\u7406\u5668\u8fd8\u662f\u63a7\u5236\u5728\u6d4f\u89c8\u5668\u7ea7\u522b\u3002\u4f46\u662f\u4e3a\u4e86\u786e\u4fdd\u4f60\u5df2\u7ecf\u5835\u585e\u4e86\u6240\u6709\u7684\u6f0f\u6d1e\uff0c\u4f60\u53ef\u80fd\u8fd8\u60f3\u901a\u8fc7\u9632\u706b\u5899\u6dfb\u52a0\u4e00\u4e9b\u786c\u6027\u7684\u7f51\u7edc\u63a7\u5236\u3002\u5728\u4e0b\u4e00\u8282\u4e2d\uff0c\u6211\u5c06\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528iptables \u6765\u5b8c\u6210\u3002<\/p>\n<p style=\"background: white;\">\u5173\u4e8e\u4f7f\u7528 iptables\uff0c\u6709\u4e24\u4ef6\u91cd\u8981\u7684\u4e8b\u60c5\u9700\u8981\u8bb0\u4f4f\uff1a\u4f60\u7ed9\u51fa\u7684\u89c4\u5219\u7684\u987a\u5e8f\u975e\u5e38\u5173\u952e\uff1biptables \u89c4\u5219\u672c\u8eab\u5728\u91cd\u65b0\u542f\u52a8\u540e\u5c06\u65e0\u6cd5\u4fdd\u6301\u3002\u6211\u4f1a\u4e00\u6b21\u4e00\u4e2a\u5730\u5728\u89e3\u91ca\u8fd9\u4e9b\u3002<\/p>\n<h3>\u4fe1\u606f\u4ead\u9879\u76ee<\/h3>\n<p style=\"background: white;\">\u4e3a\u4e86\u8bf4\u660e\u8fd9\u4e00\u5207\uff0c\u8ba9\u6211\u4eec\u60f3\u8c61\u4e00\u4e0b\uff0c\u6211\u4eec\u4e3a\u4e00\u5bb6\u540d\u4e3a BigMart \u7684\u5927\u578b\u8fde\u9501\u5546\u5e97\u5de5\u4f5c\u3002\u5b83\u4eec\u5df2\u7ecf\u5b58\u5728\u4e86\u51e0\u5341\u5e74\uff1b\u4e8b\u5b9e\u4e0a\uff0c\u6211\u4eec\u60f3\u8c61\u4e2d\u7684\u7956\u7236\u6bcd\u53ef\u80fd\u662f\u5728\u90a3\u91cc\u8d2d\u7269\u5e76\u957f\u5927\u7684\u3002\u4f46\u662f\u5982\u4eca\uff0cBigMart \u516c\u53f8\u603b\u90e8\u7684\u4eba\u53ef\u80fd\u53ea\u662f\u5728\u6570\u7740\u4e9a\u9a6c\u900a\u5c06\u4ed6\u4eec\u6c38\u8fdc\u8d76\u4e0b\u53bb\u7684\u65f6\u95f4\u3002<\/p>\n<p style=\"background: white;\">\u5c3d\u7ba1\u5982\u6b64\uff0cBigMart \u7684 IT \u90e8\u95e8\u6b63\u5728\u5c3d\u4ed6\u4eec\u6700\u5927\u52aa\u529b\u63d0\u4f9b\u89e3\u51b3\u65b9\u6848\uff0c\u4ed6\u4eec\u5411\u4f60\u53d1\u653e\u4e86\u4e00\u4e9b\u5177\u6709 WiFi \u529f\u80fd\u4fe1\u606f\u4ead\u8bbe\u5907\uff0c\u4f60\u5728\u6574\u4e2a\u5546\u5e97\u7684\u6218\u7565\u4f4d\u7f6e\u4f7f\u7528\u8fd9\u4e9b\u8bbe\u5907\u3002\u5176\u60f3\u6cd5\u662f\uff0c\u767b\u5f55\u5230 BigMart.com \u4ea7\u54c1\u9875\u9762\uff0c\u5141\u8bb8\u67e5\u627e\u5546\u54c1\u7279\u5f81\u3001\u8fc7\u9053\u4f4d\u7f6e\u548c\u5e93\u5b58\u6c34\u5e73\u3002\u4fe1\u606f\u4ead\u8fd8\u5141\u8bb8\u8fdb\u5165 bigmart-data.com\uff0c\u90a3\u91cc\u50a8\u5b58\u7740\u8bb8\u591a\u56fe\u50cf\u548c\u89c6\u9891\u5a92\u4f53\u4fe1\u606f\u3002<\/p>\n<p style=\"background: white;\">\u9664\u6b64\u4e4b\u5916\uff0c\u60a8\u8fd8\u9700\u8981\u5141\u8bb8\u4e0b\u8f7d\u8f6f\u4ef6\u5305\u66f4\u65b0\u3002\u6700\u540e\uff0c\u60a8\u8fd8\u5e0c\u671b\u53ea\u5141\u8bb8\u4ece\u672c\u5730\u5de5\u4f5c\u7ad9\u8bbf\u95ee SSH\uff0c\u5e76\u963b\u6b62\u5176\u4ed6\u4eba\u767b\u5f55\u3002\u4e0b\u56fe\u8bf4\u660e\u4e86\u5b83\u5c06\u5982\u4f55\u5de5\u4f5c\uff1a<\/p>\n<p style=\"text-align: center; background: white;\"><img decoding=\"async\" src=\"http:\/\/116.196.113.144\/wp-content\/uploads\/2019\/01\/013019_1248_firewalld2-1.jpg\" alt=\"\" \/><span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\"><br \/>\n<\/span><\/p>\n<p style=\"text-align: center; background: white;\"><span style=\"font-family: \u5b8b\u4f53;\"><span style=\"color: #999999; font-size: 10pt;\"><em>\u4fe1\u606f\u4ead\u6d41\u91cfIP\u8868<\/em><\/span><span style=\"font-size: 12pt;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\">*\u4fe1\u606f\u4ead\u4e1a\u52a1\u6d41\u7531 iptables \u63a7\u5236\u3002 *<\/p>\n<h3>\u811a\u672c<\/h3>\n<p style=\"background: white;\">\u4ee5\u4e0b\u662f Bash \u811a\u672c\u5185\u5bb9\uff1a<\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code>#!\/bin\/bash\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A OUTPUT -p tcp -d bigmart.com -j ACCEPT\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A OUTPUT -p tcp -d bigmart-data.com -j ACCEPT\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A OUTPUT -p tcp -d ubuntu.com -j ACCEPT\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A OUTPUT -p tcp -d ca.archive.ubuntu.com -j ACCEPT\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A OUTPUT -p tcp --dport 80 -j DROP\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A OUTPUT -p tcp --dport 443 -j DROP\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A INPUT -p tcp -s 10.0.3.1 --dport 22 -j ACCEPT\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>iptables -A INPUT -p tcp -s 0.0.0.0\/0 --dport 22 -j DROP\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\u6211\u4eec\u4ece\u57fa\u672c\u89c4\u5219 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">-A<\/span> \u5f00\u59cb\u5206\u6790\uff0c\u5b83\u544a\u8bc9 iptables \u6211\u4eec\u8981\u6dfb\u52a0\u89c4\u5219\u3002<span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">OUTPUT<\/span> \u610f\u5473\u7740\u8fd9\u6761\u89c4\u5219\u5e94\u8be5\u6210\u4e3a\u8f93\u51fa\u94fe\u7684\u4e00\u90e8\u5206\u3002<span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">-p<\/span> \u8868\u793a\u8be5\u89c4\u5219\u4ec5\u4f7f\u7528 TCP \u534f\u8bae\u7684\u6570\u636e\u5305\uff0c\u6b63\u5982 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">-d<\/span> \u544a\u8bc9\u6211\u4eec\u7684\uff0c\u76ee\u7684\u5730\u5740\u662f <a href=\"http:\/\/bigmart.com\/\" target=\"_blank\" rel=\"noopener\">bigmart.com<\/a>\u3002<span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">-j<\/span> \u53c2\u6570\u7684\u4f5c\u7528\u662f\u5f53\u6570\u636e\u5305\u7b26\u5408\u89c4\u5219\u65f6\u8981\u91c7\u53d6\u7684\u64cd\u4f5c\u662f <span style=\"font-family: \u5b8b\u4f53;\"><span style=\"font-size: 12pt;\">ACCEPT<\/span>\u3002\u7b2c\u4e00\u6761\u89c4\u5219\u8868\u793a\u5141\u8bb8\uff08\u6216\u63a5\u53d7\uff09\u8bf7\u6c42\u3002\u4f46\uff0c\u5f80\u4e0b\u7684\u89c4\u5219\u4f60\u80fd\u770b\u5230\u4e22\u5f03\uff08\u6216\u62d2\u7edd\uff09\u7684\u8bf7\u6c42\u3002<\/span><\/p>\n<p style=\"background: white;\">\u89c4\u5219\u987a\u5e8f\u662f\u5f88\u91cd\u8981\u7684\u3002\u56e0\u4e3a iptables \u4f1a\u5bf9\u4e00\u4e2a\u8bf7\u6c42\u904d\u5386\u6bcf\u4e2a\u89c4\u5219\uff0c\u76f4\u5230\u9047\u5230\u5339\u914d\u7684\u89c4\u5219\u3002\u4e00\u4e2a\u5411\u5916\u53d1\u51fa\u7684\u6d4f\u89c8\u5668\u8bf7\u6c42\uff0c\u6bd4\u5982\u8bbf\u95ee bigmart.com \u662f\u4f1a\u901a\u8fc7\u7684\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u8bf7\u6c42\u5339\u914d\u7b2c\u4e00\u6761\u89c4\u5219\uff0c\u4f46\u662f\u5f53\u5b83\u5230\u8fbe <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">dport 80<\/span> \u6216 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">dport 443<\/span> \u89c4\u5219\u65f6\u2014\u2014\u53d6\u51b3\u4e8e\u662f HTTP \u8fd8\u662f HTTPS \u8bf7\u6c42\u2014\u2014\u5b83\u5c06\u88ab\u4e22\u5f03\u3002\u5f53\u9047\u5230\u5339\u914d\u65f6\uff0ciptables \u4e0d\u518d\u7ee7\u7eed\u5f80\u4e0b\u68c0\u67e5\u4e86\u3002\uff08LCTT \u8bd1\u6ce8\uff1a\u6b64\u5904\u539f\u6587\u6709\u8bef\uff0c\u5f84\u6539\u3002\uff09<\/p>\n<p style=\"background: white;\">\u53e6\u4e00\u65b9\u9762\uff0c\u5411 ubuntu.com \u53d1\u51fa\u8f6f\u4ef6\u5347\u7ea7\u7684\u7cfb\u7edf\u8bf7\u6c42\uff0c\u53ea\u8981\u7b26\u5408\u5176\u9002\u5f53\u7684\u89c4\u5219\uff0c\u5c31\u4f1a\u901a\u8fc7\u3002\u663e\u7136\uff0c\u6211\u4eec\u5728\u8fd9\u91cc\u505a\u7684\u662f\uff0c\u53ea\u5141\u8bb8\u5411\u6211\u4eec\u7684 BigMart \u6216 Ubuntu \u53d1\u9001 HTTP \u6216 HTTPS \u8bf7\u6c42\uff0c\u800c\u4e0d\u5141\u8bb8\u5411\u5176\u4ed6\u76ee\u7684\u5730\u53d1\u9001\u3002<\/p>\n<p style=\"background: white;\">\u6700\u540e\u4e24\u6761\u89c4\u5219\u5c06\u5904\u7406 SSH \u8bf7\u6c42\u3002\u56e0\u4e3a\u5b83\u4e0d\u4f7f\u7528\u7aef\u53e3 80 \u6216 443 \u7aef\u53e3\uff0c\u800c\u662f\u4f7f\u7528 22 \u7aef\u53e3\uff0c\u6240\u4ee5\u4e4b\u524d\u7684\u4e24\u4e2a\u4e22\u5f03\u89c4\u5219\u4e0d\u4f1a\u62d2\u7edd\u5b83\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6765\u81ea\u6211\u7684\u5de5\u4f5c\u7ad9\u7684\u767b\u5f55\u8bf7\u6c42\u5c06\u88ab\u63a5\u53d7\uff0c\u4f46\u662f\u5bf9\u5176\u4ed6\u4efb\u4f55\u5730\u65b9\u7684\u8bf7\u6c42\u5c06\u88ab\u62d2\u7edd\u3002\u8fd9\u4e00\u70b9\u5f88\u91cd\u8981\uff1a\u786e\u4fdd\u7528\u4e8e\u7aef\u53e3 22 \u89c4\u5219\u7684 IP \u5730\u5740\u4e0e\u60a8\u7528\u6765\u767b\u5f55\u7684\u673a\u5668\u7684\u5730\u5740\u76f8\u5339\u914d\u2014\u2014\u5982\u679c\u4e0d\u8fd9\u6837\u505a\uff0c\u5c06\u7acb\u5373\u88ab\u9501\u5b9a\u3002\u5f53\u7136\uff0c\u8fd9\u6ca1\u4ec0\u4e48\u5927\u4e0d\u4e86\u7684\uff0c\u56e0\u4e3a\u6309\u7167\u76ee\u524d\u7684\u914d\u7f6e\u65b9\u5f0f\uff0c\u53ea\u9700\u91cd\u542f\u670d\u52a1\u5668\uff0ciptables \u89c4\u5219\u5c31\u4f1a\u5168\u90e8\u4e22\u5931\u3002\u5982\u679c\u4f7f\u7528 LXC \u5bb9\u5668\u4f5c\u4e3a\u670d\u52a1\u5668\u5e76\u4ece LXC \u4e3b\u673a\u767b\u5f55\uff0c\u5219\u4f7f\u7528\u4e3b\u673a IP \u5730\u5740\u8fde\u63a5\u5bb9\u5668\uff0c\u800c\u4e0d\u662f\u5176\u516c\u5171\u5730\u5740\u3002<\/p>\n<p style=\"background: white;\">\u5982\u679c\u673a\u5668\u7684 IP \u53d1\u751f\u53d8\u5316\uff0c\u8bf7\u8bb0\u4f4f\u66f4\u65b0\u8fd9\u4e2a\u89c4\u5219\uff1b\u5426\u5219\uff0c\u4f60\u4f1a\u88ab\u62d2\u7edd\u8bbf\u95ee\u3002<\/p>\n<p style=\"background: white;\">\u5728\u5bb6\u73a9\uff08\u662f\u5728\u67d0\u79cd\u4e00\u6b21\u6027\u865a\u62df\u673a\u4e0a\uff09\uff1f\u592a\u597d\u4e86\u3002\u521b\u5efa\u81ea\u5df1\u7684\u811a\u672c\u3002\u73b0\u5728\u6211\u53ef\u4ee5\u4fdd\u5b58\u811a\u672c\uff0c\u4f7f\u7528 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">chmod<\/span> \u4f7f\u5176\u53ef\u6267\u884c\uff0c\u5e76\u4ee5 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">sudo<\/span> \u7684\u5f62\u5f0f\u8fd0\u884c\u5b83\u3002\u4e0d\u8981\u62c5\u5fc3\"igmart-data.com \u6ca1\u627e\u5230\"\u4e4b\u7c7b\u7684\u9519\u8bef \u2014\u2014 \u5f53\u7136\u6ca1\u627e\u5230\uff1b\u5b83\u4e0d\u5b58\u5728\u3002<\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code>chmod +X scriptname.sh\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>sudo .\/scriptname.sh\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\u4f60\u53ef\u4ee5\u4f7f\u7528 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">cURL<\/span> \u547d\u4ee4\u884c\u6d4b\u8bd5\u9632\u706b\u5899\u3002\u8bf7\u6c42 ubuntu.com \u594f\u6548\uff0c\u4f46\u8bf7\u6c42 <a href=\"http:\/\/manning.com\/\" target=\"_blank\" rel=\"noopener\">manning.com<\/a> \u662f\u5931\u8d25\u7684 \u3002<\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code>curl ubuntu.com\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>curl manning.com\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\n<h3>\u914d\u7f6e iptables \u4ee5\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u52a0\u8f7d<\/h3>\n<p style=\"background: white;\">\u73b0\u5728\uff0c\u6211\u5982\u4f55\u8ba9\u8fd9\u4e9b\u89c4\u5219\u5728\u6bcf\u6b21\u4fe1\u606f\u4ead\u542f\u52a8\u65f6\u81ea\u52a8\u52a0\u8f7d\uff1f\u7b2c\u4e00\u6b65\u662f\u5c06\u5f53\u524d\u89c4\u5219\u4fdd\u5b58\u3002\u4f7f\u7528 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">iptables-save<\/span> \u5de5\u5177\u4fdd\u5b58\u89c4\u5219\u6587\u4ef6\u3002\u8fd9\u5c06\u5728\u6839\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u89c4\u5219\u5217\u8868\u7684\u6587\u4ef6\u3002\u7ba1\u9053\u540e\u9762\u8ddf\u7740 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">tee<\/span> \u547d\u4ee4\uff0c\u662f\u5c06\u6211\u7684<span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">sudo<\/span> \u6743\u9650\u5e94\u7528\u4e8e\u5b57\u7b26\u4e32\u7684\u7b2c\u4e8c\u90e8\u5206\uff1a\u5c06\u6587\u4ef6\u5b9e\u9645\u4fdd\u5b58\u5230\u5426\u5219\u53d7\u9650\u7684\u6839\u76ee\u5f55\u3002<\/p>\n<p style=\"background: white;\">\u7136\u540e\u6211\u53ef\u4ee5\u544a\u8bc9\u7cfb\u7edf\u6bcf\u6b21\u542f\u52a8\u65f6\u8fd0\u884c\u4e00\u4e2a\u76f8\u5173\u7684\u5de5\u5177\uff0c\u53eb\u505a <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">iptables-restore<\/span> \u3002\u6211\u4eec\u5728\u4e0a\u4e00\u7ae0\u8282\uff08LCTT \u8bd1\u6ce8\uff1a\u6307\u4f5c\u8005\u7684\u4e66\uff09\u4e2d\u770b\u5230\u7684\u5e38\u89c4 cron \u4efb\u52a1\u5e76\u4e0d\u9002\u7528\uff0c\u56e0\u4e3a\u5b83\u4eec\u5728\u8bbe\u5b9a\u7684\u65f6\u95f4\u8fd0\u884c\uff0c\u4f46\u662f\u6211\u4eec\u4e0d\u77e5\u9053\u4ec0\u4e48\u65f6\u5019\u6211\u4eec\u7684\u8ba1\u7b97\u673a\u53ef\u80fd\u4f1a\u51b3\u5b9a\u5d29\u6e83\u548c\u91cd\u542f\u3002<\/p>\n<p style=\"background: white;\">\u6709\u8bb8\u591a\u65b9\u6cd5\u6765\u5904\u7406\u8fd9\u4e2a\u95ee\u9898\u3002\u8fd9\u91cc\u6709\u4e00\u4e2a\uff1a<\/p>\n<p style=\"background: white;\">\u5728\u6211\u7684 Linux \u673a\u5668\u4e0a\uff0c\u6211\u5c06\u5b89\u88c5\u4e00\u4e2a\u540d\u4e3a <a href=\"https:\/\/sourceforge.net\/projects\/anacron\/\" target=\"_blank\" rel=\"noopener\">anacron<\/a> \u7684\u7a0b\u5e8f\uff0c\u8be5\u7a0b\u5e8f\u5c06\u5728 <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">\/etc\/<\/span> \u76ee\u5f55\u4e2d\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e00\u4e2a\u540d\u4e3a <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">anacrontab<\/span> \u7684\u6587\u4ef6\u3002\u6211\u5c06\u7f16\u8f91\u8be5\u6587\u4ef6\u5e76\u6dfb\u52a0\u8fd9\u4e2a <span style=\"font-family: \u5b8b\u4f53; font-size: 12pt;\">iptables-restore<\/span> \u547d\u4ee4\uff0c\u544a\u8bc9\u5b83\u52a0\u8f7d\u90a3\u4e2a .rule \u6587\u4ef6\u7684\u5f53\u524d\u5185\u5bb9\u3002\u5f53\u5f15\u5bfc\u540e\uff0c\u89c4\u5219\u6bcf\u5929\uff08\u5fc5\u8981\u65f6\uff0901:01 \u65f6\u52a0\u8f7d\u5230 iptables \u4e2d\uff08LCTT \u8bd1\u6ce8\uff1aanacron \u4f1a\u8865\u5145\u6267\u884c\u7531\u4e8e\u673a\u5668\u6ca1\u6709\u8fd0\u884c\u800c\u9519\u8fc7\u7684 cron \u4efb\u52a1\uff0c\u56e0\u6b64\uff0c\u5373\u4fbf 01:01 \u65f6\u673a\u5668\u6ca1\u6709\u542f\u52a8\uff0c\u4e5f\u4f1a\u5728\u673a\u5668\u542f\u52a8\u4f1a\u5c3d\u5feb\u6267\u884c\u8be5\u4efb\u52a1\uff09\u3002\u6211\u4f1a\u7ed9\u8be5\u4efb\u52a1\u4e00\u4e2a\u6807\u8bc6\u7b26\uff08<span style=\"font-family: \u5b8b\u4f53;\"><span style=\"font-size: 12pt;\">iptables-restore<\/span>\uff09\uff0c\u7136\u540e\u6dfb\u52a0\u547d\u4ee4\u672c\u8eab\u3002\u5982\u679c\u4f60\u5728\u5bb6\u548c\u6211\u4e00\u8d77\u8fd9\u6837\uff0c\u4f60\u5e94\u8be5\u901a\u8fc7\u91cd\u542f\u7cfb\u7edf\u6765\u6d4b\u8bd5\u4e00\u4e0b\u3002<\/span><\/p>\n<ol>\n<li>\n<div style=\"background: white;\">\n<pre><code>sudo iptables-save | sudo tee \/root\/my.active.firewall.rules\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>sudo apt install anacron\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>sudo nano \/etc\/anacrontab\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<div style=\"background: white;\">\n<pre><code>1 1 iptables-restore iptables-restore &lt; \/root\/my.active.firewall.rules\n<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p style=\"background: white;\">\u6211\u5e0c\u671b\u8fd9\u4e9b\u5b9e\u9645\u4f8b\u5b50\u5df2\u7ecf\u8bf4\u660e\u4e86\u5982\u4f55\u4f7f\u7528 iptables \u548c firewalld \u6765\u7ba1\u7406\u57fa\u4e8e Linux \u7684\u9632\u706b\u5899\u4e0a\u7684\u8fde\u63a5\u95ee\u9898\u3002<\/p>\n<p style=\"background: white;\">\u539f\u6587\u51fa\u5904\uff1ahttps:\/\/linux.cn\/article-10075-1.html<\/p>\n<p>\u6269\u5c55\u9605\u8bfb<\/p>\n<pre><span style=\"font-size: 10pt;\"><strong><span style=\"font-family: \u5b8b\u4f53;\">\u4e00\u3001<\/span><span style=\"font-family: Tahoma;\">firewalld <\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5b88\u62a4\u8fdb\u7a0b<\/span><\/strong><\/span>\n\n<span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: Tahoma;\">firewall-cmd<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u547d\u4ee4\u9700\u8981<\/span><span style=\"font-family: Tahoma;\">firewalld<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u8fdb\u7a0b\u5904\u4e8e\u8fd0\u884c\u72b6\u6001\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<\/span><span style=\"font-family: Tahoma;\">systemctl status\/start\/stop\/restart firewalld<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u6765\u63a7\u5236\u8fd9\u4e2a\u5b88\u62a4\u8fdb\u7a0b\u3002<\/span><span style=\"font-family: Tahoma;\">firewalld<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u8fdb\u7a0b\u4e3a\u9632\u706b\u5899\u63d0\u4f9b\u670d\u52a1\u3002<\/span>\n<\/span><span style=\"color: #222222;\"><span style=\"font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\n\u5f53\u6211\u4eec\u4fee\u6539\u4e86\u67d0\u4e9b\u914d\u7f6e\u4e4b\u540e\uff08\u5c24\u5176\u662f\u914d\u7f6e\u6587\u4ef6\u7684\u4fee\u6539\uff09\uff0c<\/span><span style=\"font-family: Tahoma;\">firewall<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5e76\u4e0d\u4f1a\u7acb\u5373\u751f\u6548\u3002\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u6765\u6fc0\u6d3b\u6700\u65b0\u914d\u7f6e<\/span><\/span><span style=\"color: #c7254e;\"><span style=\"font-family: Consolas; font-size: 9pt; background-color: #f9f2f4;\">systemctl restart firewalld<\/span><span style=\"color: #222222;\"><span style=\"font-family: \u5b8b\u4f53; font-size: 10pt;\">\u548c<\/span><span style=\"color: #c7254e;\"><span style=\"font-family: Consolas; font-size: 9pt; background-color: #f9f2f4;\">firewall-cmd --reload<\/span><span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u4e24\u79cd\u65b9\u5f0f\uff0c\u524d\u4e00\u79cd\u662f\u91cd\u542f<\/span><span style=\"font-family: Tahoma;\">firewalld<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u670d\u52a1\uff0c\u5efa\u8bae\u4f7f\u7528\u540e\u4e00\u79cd<\/span><span style=\"font-family: Tahoma;\">\"<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u91cd\u8f7d\u914d\u7f6e\u6587\u4ef6<\/span><span style=\"font-family: Tahoma;\">\"<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u3002\u91cd\u8f7d\u914d\u7f6e\u6587\u4ef6\u4e4b\u540e\u4e0d\u4f1a\u65ad\u6389\u6b63\u5728\u8fde\u63a5\u7684<\/span><span style=\"font-family: Tahoma;\">tcp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u4f1a\u8bdd\uff0c\u800c\u91cd\u542f\u670d\u52a1\u5219\u4f1a\u65ad\u5f00<\/span><span style=\"font-family: Tahoma;\">tcp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u4f1a\u8bdd\u3002<\/span>\n<\/span><\/span><\/span><\/span><\/span>\n<span style=\"font-size: 10pt;\"><strong><span style=\"font-family: \u5b8b\u4f53;\">\u4e8c\u3001<\/span><\/strong><\/span><span style=\"font-size: 10pt;\"><strong><span style=\"font-family: \u5b8b\u4f53;\">\u63a7\u5236\u7aef\u53e3<\/span><\/strong><\/span><span style=\"font-size: 10pt;\"><strong><span style=\"font-family: Tahoma;\">\/<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u670d\u52a1<\/span><\/strong>\n<\/span>\n<span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u63a7\u5236\u7aef\u53e3\u7684\u5f00\u653e\uff0c\u4e00\u79cd\u662f\u6307\u5b9a\u7aef\u53e3\u53f7\u53e6\u4e00\u79cd\u662f\u6307\u5b9a\u670d\u52a1\u540d\u3002\u867d\u7136\u5f00\u653e<\/span><span style=\"font-family: Tahoma;\">http<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u670d\u52a1\u5c31\u662f\u5f00\u653e\u4e86<\/span><span style=\"font-family: Tahoma;\">80<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\uff0c\u4f46\u662f\u8fd8\u662f\u4e0d\u80fd\u901a\u8fc7\u7aef\u53e3\u53f7\u6765\u5173\u95ed\uff0c\u4e5f\u5c31\u662f\u8bf4\u901a\u8fc7\u6307\u5b9a\u670d\u52a1\u540d\u5f00\u653e\u7684\u5c31\u8981\u901a\u8fc7\u6307\u5b9a\u670d\u52a1\u540d\u5173\u95ed\uff1b\u901a\u8fc7\u6307\u5b9a\u7aef\u53e3\u53f7\u5f00\u653e\u7684\u5c31\u8981\u901a\u8fc7\u6307\u5b9a\u7aef\u53e3\u53f7\u5173\u95ed\u3002\u8fd8\u6709\u4e00\u4e2a\u8981\u6ce8\u610f\u7684\u5c31\u662f\u6307\u5b9a\u7aef\u53e3\u7684\u65f6\u5019\u4e00\u5b9a\u8981\u6307\u5b9a\u662f\u4ec0\u4e48\u534f\u8bae\uff0c<\/span><span style=\"font-family: Tahoma;\">tcp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u8fd8\u662f<\/span><span style=\"font-family: Tahoma;\">udp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u3002\u77e5\u9053\u8fd9\u4e2a\u4e4b\u540e\u4ee5\u540e\u5c31\u4e0d\u7528\u6bcf\u6b21\u5148\u5173\u9632\u706b\u5899\u4e86\uff0c\u53ef\u4ee5\u8ba9\u9632\u706b\u5899\u771f\u6b63\u7684\u751f\u6548\u3002<\/span><\/span><\/pre>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 40px;\" \/>\n<col style=\"width: 765px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 135px;\">\n<td style=\"border: none;\" valign=\"bottom\">\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">1<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">2<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">3<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">4<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">5<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">6<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">7<\/span><\/p>\n<\/td>\n<td style=\"border: none;\" valign=\"bottom\">\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --add-service=mysql <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5f00\u653e<\/span><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\">mysql<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --remove-service=http <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u963b\u6b62<\/span><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\">http<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-size: 10pt;\"><span style=\"color: black;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --list-services\u00a0 <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u67e5\u770b\u5f00\u653e\u7684\u670d\u52a1<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-size: 10pt;\"><span style=\"color: black; font-family: Times New Roman;\">firewall-cmd --add-port=3306\/tcp<\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5f00\u653e\u901a\u8fc7<\/span><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\">tcp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u8bbf\u95ee<\/span><span style=\"font-family: Times New Roman;\">3306<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --remove-port=80tcp <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u963b\u6b62\u901a\u8fc7<\/span><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\">tcp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u8bbf\u95ee<\/span><span style=\"font-family: Times New Roman;\">3306<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-size: 10pt;\"><span style=\"color: black; font-family: Times New Roman;\">firewall-cmd --add-port=233\/udp<\/span><span style=\"font-family: Times New Roman;\">\u00a0 <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5f00\u653e\u901a\u8fc7<\/span><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\">udp<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u8bbf\u95ee<\/span><span style=\"font-family: Times New Roman;\">233<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --list-ports\u00a0 <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u67e5\u770b\u5f00\u653e\u7684\u7aef\u53e3<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><span style=\"font-size: 10pt;\"><strong><span style=\"font-family: \u5b8b\u4f53;\">\u4e09\u3001\u4f2a\u88c5<\/span><\/strong><\/span><span style=\"font-size: 10pt;\"><span style=\"font-family: Tahoma;\"><strong>IP<\/strong><\/span><\/span>\n<span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u9632\u706b\u5899\u53ef\u4ee5\u5b9e\u73b0\u4f2a\u88c5<\/span><span style=\"font-family: Tahoma;\">IP<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7684\u529f\u80fd\uff0c\u4e0b\u9762\u7684\u7aef\u53e3\u8f6c\u53d1\u5c31\u4f1a\u7528\u5230\u8fd9\u4e2a\u529f\u80fd\u3002<\/span><\/span><\/pre>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 40px;\" \/>\n<col style=\"width: 785px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 58px;\">\n<td style=\"border: none;\" valign=\"bottom\">\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">1<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">2<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">3<\/span><\/p>\n<\/td>\n<td style=\"border: none;\" valign=\"bottom\">\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --query-masquerade <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u68c0\u67e5\u662f\u5426\u5141\u8bb8\u4f2a\u88c5<\/span><span style=\"font-family: Times New Roman;\"><span style=\"color: #008200;\">IP<\/span><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --add-masquerade <span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5141\u8bb8\u9632\u706b\u5899\u4f2a\u88c5<\/span><span style=\"font-family: Times New Roman;\"><span style=\"color: #008200;\">IP<\/span><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"color: black; font-size: 10pt;\"><span style=\"font-family: Times New Roman;\">firewall-cmd --remove-masquerade<span style=\"color: #008200;\"># <\/span><\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7981\u6b62\u9632\u706b\u5899\u4f2a\u88c5<\/span><span style=\"color: #008200; font-family: Times New Roman;\">IP<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><span style=\"font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\"><strong>\u56db\u3001\u7aef\u53e3\u8f6c\u53d1<\/strong><\/span><\/span>\n<span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u8f6c\u53d1\u53ef\u4ee5\u5c06\u6307\u5b9a\u5730\u5740\u8bbf\u95ee\u6307\u5b9a\u7684\u7aef\u53e3\u65f6\uff0c\u5c06\u6d41\u91cf\u8f6c\u53d1\u81f3\u6307\u5b9a\u5730\u5740\u7684\u6307\u5b9a\u7aef\u53e3\u3002\u8f6c\u53d1\u7684\u76ee\u7684\u5982\u679c\u4e0d\u6307\u5b9a<\/span><span style=\"font-family: Tahoma;\">ip<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7684\u8bdd\u5c31\u9ed8\u8ba4\u4e3a\u672c\u673a\uff0c\u5982\u679c\u6307\u5b9a\u4e86<\/span><span style=\"font-family: Tahoma;\">ip<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5374\u6ca1\u6307\u5b9a\u7aef\u53e3\uff0c\u5219\u9ed8\u8ba4\u4f7f\u7528\u6765\u6e90\u7aef\u53e3\u3002<\/span>\n<\/span><span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u5982\u679c\u914d\u7f6e\u597d\u7aef\u53e3\u8f6c\u53d1\u4e4b\u540e\u4e0d\u80fd\u7528\uff0c\u53ef\u4ee5\u68c0\u67e5\u4e0b\u9762\u4e24\u4e2a\u95ee\u9898\uff1a<\/span>\n<\/span><\/pre>\n<ul>\n<li>\n<pre><span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u6bd4\u5982\u6211\u5c06<\/span><span style=\"font-family: Tahoma;\">80<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u8f6c\u53d1\u81f3<\/span><span style=\"font-family: Tahoma;\">8080<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\uff0c\u9996\u5148\u68c0\u67e5\u672c\u5730\u7684<\/span><span style=\"font-family: Tahoma;\">80<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u548c\u76ee\u6807\u7684<\/span><span style=\"font-family: Tahoma;\">8080<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u662f\u5426\u5f00\u653e\u76d1\u542c\u4e86<\/span>\n<\/span><\/pre>\n<\/li>\n<li>\n<pre><span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u5176\u6b21\u68c0\u67e5\u662f\u5426\u5141\u8bb8\u4f2a\u88c5<\/span><span style=\"font-family: Tahoma;\">IP<\/span><span style=\"font-family: \u5b8b\u4f53;\">\uff0c\u6ca1\u5141\u8bb8\u7684\u8bdd\u8981\u5f00\u542f\u4f2a\u88c5<\/span><span style=\"font-family: Tahoma;\">IP\n<\/span><\/span><\/pre>\n<\/li>\n<\/ul>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 40px;\" \/>\n<col style=\"width: 815px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"height: 116px;\">\n<td style=\"border: none;\" valign=\"bottom\">\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">1<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">2<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">3<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">4<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">5<br \/>\n<\/span><\/p>\n<p style=\"text-align: right; background: white;\"><span style=\"color: #afafaf; font-family: Times New Roman; font-size: 10pt;\">6<\/span><\/p>\n<\/td>\n<td style=\"border: none;\" valign=\"bottom\">\n<p style=\"background: white;\"><span style=\"font-size: 10pt;\"><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\"># <\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5c06<\/span><span style=\"font-family: Times New Roman;\">80<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u7684\u6d41\u91cf\u8f6c\u53d1\u81f3<\/span><span style=\"font-family: Times New Roman;\">8080<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-family: Times New Roman; font-size: 10pt;\"><span style=\"color: black;\">firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080<\/span><br \/>\n<\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-size: 10pt;\"><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\"># <\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5c06<\/span><span style=\"font-family: Times New Roman;\">80<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u7684\u6d41\u91cf\u8f6c\u53d1\u81f3<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-family: Times New Roman; font-size: 10pt;\"><span style=\"color: black;\">firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.1.0.1192.168.0.1<\/span><br \/>\n<\/span><\/p>\n<p style=\"background: white;\"><span style=\"font-size: 10pt;\"><span style=\"color: #008200;\"><span style=\"font-family: Times New Roman;\"># <\/span><span style=\"font-family: \u5b8b\u4f53;\">\u5c06<\/span><span style=\"font-family: Times New Roman;\">80<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u7684\u6d41\u91cf\u8f6c\u53d1\u81f3<\/span><span style=\"font-family: Times New Roman;\">192.168.0.1<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7684<\/span><span style=\"font-family: Times New Roman;\">8080<\/span><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3<\/span><\/span><span style=\"font-family: Times New Roman;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"background: white;\"><span style=\"color: black; font-family: Times New Roman; font-size: 10pt;\">firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.0.1:toport=8080<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u5f53\u6211\u4eec\u60f3\u628a\u67d0\u4e2a\u7aef\u53e3\u9690\u85cf\u8d77\u6765\u7684\u65f6\u5019\uff0c\u5c31\u53ef\u4ee5\u5728\u9632\u706b\u5899\u4e0a\u963b\u6b62\u90a3\u4e2a\u7aef\u53e3\u8bbf\u95ee\uff0c\u7136\u540e\u518d\u5f00\u4e00\u4e2a\u4e0d\u89c4\u5219\u7684\u7aef\u53e3\uff0c\u4e4b\u540e\u914d\u7f6e\u9632\u706b\u5899\u7684\u7aef\u53e3\u8f6c\u53d1\uff0c\u5c06\u6d41\u91cf\u8f6c\u53d1\u8fc7\u53bb\u3002<\/span> <\/span><\/li>\n<li><span style=\"color: #222222; font-size: 10pt;\"><span style=\"font-family: \u5b8b\u4f53;\">\u7aef\u53e3\u8f6c\u53d1\u8fd8\u53ef\u4ee5\u505a\u6d41\u91cf\u5206\u53d1\uff0c\u4e00\u4e2a\u9632\u706b\u5899\u62d6\u7740\u597d\u591a\u53f0\u8fd0\u884c\u7740\u4e0d\u540c\u670d\u52a1\u7684\u673a\u5668\uff0c\u7136\u540e\u7528\u9632\u706b\u5899\u5c06\u4e0d\u540c\u7aef\u53e3\u7684\u6d41\u91cf\u8f6c\u53d1\u81f3\u4e0d\u540c\u673a\u5668\u3002<\/span><span style=\"font-family: Tahoma;\"><br \/>\n<\/span><\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u9632\u706b\u5899 \u9632\u706b\u5899\u662f\u4e00\u7ec4\u89c4\u5219\u3002\u5f53\u6570\u636e\u5305\u8fdb\u51fa\u53d7\u4fdd\u62a4\u7684\u7f51\u7edc\u533a\u57df\u65f6\uff0c\u8fdb\u51fa\u5185\u5bb9\uff08\u7279\u522b\u662f\u5173\u4e8e\u5176\u6765\u6e90\u3001\u76ee\u6807\u548c\u4f7f\u7528\u7684\u534f\u8bae\u7b49\u4fe1\u606f\uff09\u4f1a\u6839\u636e\u9632\u706b\u5899\u89c4\u5219\u8fdb\u884c\u68c0\u6d4b\uff0c\u4ee5\u786e\u5b9a\u662f\u5426\u5141\u8bb8\u5176\u901a\u8fc7\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50: \u9632\u706b\u5899\u53ef\u4ee5\u6839\u636e\u534f\u8bae&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-2624","post","type-post","status-publish","format-standard","hentry","category-iptables"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2624"}],"version-history":[{"count":8,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2624\/revisions"}],"predecessor-version":[{"id":2651,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=\/wp\/v2\/posts\/2624\/revisions\/2651"}],"wp:attachment":[{"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liangliang.org.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}