{"id":53693,"date":"2020-04-07T02:14:22","date_gmt":"2020-04-06T18:14:22","guid":{"rendered":"http:\/\/4563.org\/?p=53693"},"modified":"2020-04-07T02:14:22","modified_gmt":"2020-04-06T18:14:22","slug":"%e4%bd%bf%e7%94%a8iptables%e7%ab%af%e5%8f%a3%e8%bd%ac%e5%8f%91","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=53693","title":{"rendered":"\u4f7f\u7528IPTABLES\u7aef\u53e3\u8f6c\u53d1"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>NoF<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u4f7f\u7528IPTABLES\u7aef\u53e3\u8f6c\u53d1<\/h3>\n<p>  \t\t\u4f7f\u7528IPTABLES\u7aef\u53e3\u8f6c\u53d1\u4f1a\u5bfc\u81f4SS UDP\u8f6c\u53d1\u5931\u8d25\uff0c\u6c42\u89e3yc014t <br \/>  yc002t \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ddo<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fd9\u662f\u8f6c\u53d1tcp\u554a\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>kzklot<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tiptables -t nat -A PREROUTING -p udp &#8211;dport port -j DNAT &#8211;to-destination ip<br \/>  iptables -t nat -A POSTROUTING -p udp -d ip &#8211;dport port-j SNAT &#8211;to-source ip<\/p>\n<p>   &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.yc022t\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>NoF<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tkzklot \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-4-6 22:59<br \/>  iptables -t nat -A PREROUTING -p udp &#8211;dport port -j DNAT &#8211;to-destination ip<br \/>  iptables -t nat -A POS &#8230;<\/p>\n<p> \u6211\u662f\u7528\u7684\u9017\u6bd4\u7684\u4e00\u952e\u811a\u672cyc013t\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>envoy<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tkzklot \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-4-6 22:59<br \/>  iptables -t nat -A PREROUTING -p udp &#8211;dport port -j DNAT &#8211;to-destination ip<br \/>  iptables -t nat -A POS &#8230;<\/p>\n<p> \u53c8\u770b\u5230\u5927\u4f6c\u6280\u672f\u5e16\u4e86yc010t\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Drbo<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5927\u4f6c\u4eec\u4f60\u4eec\u597d\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u642c\u74e6\u5de5<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tFirewall \u5c31\u51e0\u884c\u547d\u4ee4\uff0c\u4e0d\u9999\u5417\uff1f<br \/>  echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<\/p>\n<p>  systemctl start firewalld.service<br \/>  systemctl enable firewalld.service<\/p>\n<p>  firewall-cmd &#8211;permanent &#8211;add-masquerade<\/p>\n<p>  firewall-cmd &#8211;permanent &#8211;add-port=8080\/tcp<br \/>  firewall-cmd &#8211;permanent &#8211;add-port=8080\/udp<br \/>  firewall-cmd &#8211;permanent &#8211;add-forward-port=port=8080:proto=tcp:toport=8080:toaddr=44.44.44.44<br \/>  firewall-cmd &#8211;permanent &#8211;add-forward-port=port=8080:proto=udp:toport=8080:toaddr=44.44.44.44<br \/>  firewall-cmd &#8211;reload\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>llyang<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8f6c\u53d1\uff0c\u53d1\u6e90\u4e8eiptable\uff0cfirewalld\u7528\u8d77\u6765\u4e5f\u8fd8\u65b9\u4fbf\u3002<\/p>\n<p>  \u5982\u679c\u4f60\u8981\u8f6c\u6362\u6210ufw\uff0c\u6700\u8d39\u52b2:lol\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>llyang<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tNoF \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-4-6 23:02<br \/>  \u6211\u662f\u7528\u7684\u9017\u6bd4\u7684\u4e00\u952e\u811a\u672c<\/p>\n<p> \u5feb10\u5e74\u524d\u7684\u811a\u672c,\u7cfb\u7edf\u53d8\u5316\u592a\u591a\u4e86\u3002\u786e\u5b9e\u8be5\u8f6c\u6362\u6210 firewalld, ufw\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>NoF \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u4f7f\u7528IPT&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/53693"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=53693"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/53693\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=53693"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=53693"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=53693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}