{"id":34,"date":"2013-07-09T21:57:44","date_gmt":"2013-07-09T12:57:44","guid":{"rendered":"http:\/\/gomocool.net\/gomokulog\/?p=34"},"modified":"2013-07-11T01:33:53","modified_gmt":"2013-07-10T16:33:53","slug":"%e3%81%96%e3%81%a3%e3%81%8f%e3%82%8aiptables","status":"publish","type":"post","link":"https:\/\/gomokulog.gomocool.net\/?p=34","title":{"rendered":"\u3056\u3063\u304f\u308aiptables"},"content":{"rendered":"<p>\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u3092\u516c\u958b\u3057\u305f\u3089\u3001\u65e9\u901f\u591a\u304f\u306e\u30a2\u30af\u30bb\u30b9\u304c\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><strong>SSH\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u5927\u91cf\u306e\u30a2\u30bf\u30c3\u30af\u304c\u30fb\u30fb\u30fb\u30fb\u30fb(\uff1b\u00b4\u0434\uff40)<\/strong><\/p>\n<p>\u516c\u958b\u3057\u305f\u6df1\u591c\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u30de\u30b7\u30f3\u304c\u3046\u308b\u3055\u304f\u3066\u76ee\u304c\u51b7\u3081\u307e\u3057\u305f\u3002<br \/>\n\u3069\u3046\u3082\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u7dcf\u5f53\u308a\u306b\u8a66\u3057\u3066\u304f\u308b\u30d6\u30eb\u30fc\u30c8\u30d5\u30a9\u30fc\u30b9\u30a2\u30bf\u30c3\u30af\u3068\u304b\u3044\u3046\u305f\u3050\u3044\u306e\u3082\u306e\u3089\u3057\u304f\u3001<br \/>\n\u3054\u4e01\u5be7\u306b\u6211\u304c\u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30c0\u30e1\u3067\u3059\u3002\u30c0\u30e1\u3067\u3059\u3002\u3068\u5ef6\u3005\u3068\u8fd4\u4e8b\u3057\u3066\u3044\u305f\u6a21\u69d8\u3002<\/p>\n<p><a href=\"http:\/\/gomocool.net\/gomokulog\/wp-content\/uploads\/2013\/07\/20130709-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-36\" alt=\"20130709-1\" src=\"http:\/\/gomocool.net\/gomokulog\/wp-content\/uploads\/2013\/07\/20130709-1.jpg\" width=\"887\" height=\"573\" \/><\/a><\/p>\n<p>\u3044\u3084\u3041\u3001\u3059\u3054\u3044\u3067\u3059\u306d\u3002<br \/>\n\u4e00\u5fdc\u3001SSH\u306e\u8a2d\u5b9a\u3067root\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u306f\u3067\u304d\u306a\u3044\u3057\u3001\u5927\u4e08\u592b\u3060\u3068\u304a\u3082\u3063\u305f\u306e\u3067\u3059\u304c\u3001<br \/>\nroot\u4ee5\u5916\u3082postgres\u3068\u304b\u624b\u5f53\u305f\u308a\u6b21\u7b2c\u3067\u3059\u306d\u3002<br \/>\n\u307e\u3041\u3001\u7279\u5b9a\u306e\u30e6\u30fc\u30b6\u30fc\u4ee5\u5916\u306f\u57fa\u672c\/sbin\/nologin\u30b7\u30a7\u30eb\u306a\u306e\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u7dcf\u5f53\u308a\u30a2\u30bf\u30c3\u30af\u3058\u3083\u7a81\u7834\u3055\u308c\u308b\u53ef\u80fd\u6027\u306f\u4f4e\u3044\u3060\u308d\u3046\u3051\u3069\u3002<br \/>\n(\u9375\u8a8d\u8a3c\u3067\u3082\u4f7f\u3048\u3070\u3055\u3089\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u30a2\u30bf\u30c3\u30af\u610f\u5473\u306a\u304f\u306a\u308b\u3051\u3069\u3001\u56fa\u5b9a\u306e\u30d1\u30bd\u30b3\u30f3\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3060\u3051\u3058\u3083\u306a\u3044\u306e\u3067\u4eca\u56de\u306f\u30d1\u30b9\u3002)<\/p>\n<p>\u307e\u3041\u3001\u306a\u306b\u306f\u3068\u3082\u3042\u308c\u3001\u3068\u306b\u304b\u304f\u30de\u30b7\u30f3\u304c\u3046\u308b\u3055\u3044\u3002<br \/>\n\u30a2\u30bf\u30c3\u30af\u653b\u6483\u306e\u305f\u3081\u306b\u96fb\u6c17\u4ee3\u3092\u6255\u3063\u3066\u3001\u7761\u7720\u306e\u90aa\u9b54\u3092\u3055\u308c\u308b\u306e\u304c\u975e\u5e38\u306b\u5fcc\u3005\u3057\u3044\u306e\u3067\u3001<br \/>\nLinux\u306eFirewall\u6a5f\u80fd\u3001<strong>iptables<\/strong>\u306b\u3064\u3044\u3066\u5c11\u3057\u8abf\u3079\u305f\u3002<\/p>\n<p>\u307e\u3041\u3001\u3056\u3063\u304f\u308a\u3044\u3046\u3068iptables\u3068\u306f\u3001<strong>\u30d1\u30b1\u30c3\u30c8\u306e\u6d41\u308c\u306e\u30eb\u30fc\u30eb\u3092\u6c7a\u3081\u305f\u308a<\/strong>\u3001<strong>\u30d1\u30b1\u30c3\u30c8\u306e\u4e2d\u8eab\u3092\u66f8\u304d\u63db\u3048\u305f\u308a<\/strong>\u3059\u308b\u3002<br \/>\n\u3053\u306eIP\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3055\u305b\u306a\u3044\u3060\u3068\u304b\u3001\u3053\u306e\u30dd\u30fc\u30c8\u304b\u3089\u306f\u30a2\u30af\u30bb\u30b9\u3055\u305b\u308b\u3060\u3068\u304b\u3002\u3053\u306e\u30dd\u30fc\u30c8\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u5909\u66f4\u3059\u308b\u3060\u3068\u304b\u3002<br \/>\n\u3082\u3046\u5c11\u3057\u5177\u4f53\u7684\u306b\u8a00\u3046\u3068\u3001Web\u30b5\u30fc\u30d0\u30fc(apache)\u3092\u7acb\u3066\u305f\u3089\u5916\u304b\u3089\u898b\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001http\u901a\u4fe1\u304c\u4f7f\u304680\u756a\u30dd\u30fc\u30c8\u3092\u901a\u3059\u3002<br \/>\n\u3067\u3082\u3001FTP\u306f\u4f7f\u3063\u3066\u306a\u3044\u304b\u308920\u756a\u30dd\u30fc\u30c8\u306f\u585e\u3044\u3067\u304a\u3053\u3046\u3002<br \/>\n\u3068\u3044\u3063\u305f\u5177\u5408\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u3053\u306e\u300c\u30d1\u30b1\u30c3\u30c8\u306e\u6d41\u308c\u306e\u30eb\u30fc\u30eb\u300d\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3067\u3001\u4e0d\u6b63\u30a2\u30af\u30bb\u30b9\u884c\u70ba\u3092\u5c11\u3057\u9ed9\u3089\u305b\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u3055\u3066\u3001\u3082\u3046\u5c11\u3057\u7a81\u3063\u8fbc\u3093\u3060\u8a71\u3092\u3059\u308b\u3002<\/p>\n<p>iptables\u306f\u3001filter\u30c6\u30fc\u30d6\u30eb\u3001nat\u30c6\u30fc\u30d6\u30eb\u3068\u547c\u3070\u308c\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u30eb\u30fc\u30eb\u3092\u66f8\u304f\u3002<br \/>\n\u4eca\u56de\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u306e\u6d41\u308c\u306e\u30eb\u30fc\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u306e\u3067\u3001filter\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u3046\u3002<br \/>\nfilter\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u3001\u30c1\u30a7\u30a4\u30f3\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u304c\u3042\u308b\u3002<br \/>\n\u307e\u305f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30673\u3064\u306e\u30c1\u30a7\u30a4\u30f3\u304c\u63c3\u3063\u3066\u3044\u308b\u3002<\/p>\n<ul>\n<li>\u30d1\u30b1\u30c3\u30c8\u304c\u5165\u308b\u969b\u306b\u5229\u7528\u3059\u308bINPUT\u30c1\u30a7\u30a4\u30f3<\/li>\n<li>\u30d1\u30b1\u30c3\u30c8\u304c\u51fa\u3066\u3044\u304f\u969b\u306b\u5229\u7528\u3059\u308bOUTPUT\u30c1\u30a7\u30a4\u30f3<\/li>\n<li>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u9593\u3092\u307e\u305f\u3050\u969b\u306b\u5229\u7528\u3059\u308bFORWARD\u30c1\u30a7\u30a4\u30f3<\/li>\n<\/ul>\n<p>\u306a\u3093\u3067\u3001\u30c1\u30a7\u30a4\u30f3\u306a\u306e\u304b\u77e5\u3089\u306a\u3044\u304c\u3001\u307e\u3041\u3001\u4e0a\u304b\u3089\u4e0b\u306b\u30eb\u30fc\u30eb\u3092\u9396\u307f\u305f\u3044\u306b\u7e4b\u3044\u3067\u884c\u304f\u304b\u3089\u30c1\u30a7\u30a4\u30f3\u306a\u306e\u304b\u306a\u3068\u3001\u3056\u3063\u304f\u308a\u7406\u89e3\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3084\u304b\u307e\u3057\u3044SSH\u306e\u30a2\u30af\u30bb\u30b9\u3092\u3069\u3046\u306b\u304b\u3059\u308b\u3079\u304d\u306a\u306e\u3067\u3001INPUT\u30c1\u30a7\u30a4\u30f3\u306b\u30eb\u30fc\u30eb\u3092\u66f8\u304f\u3002<\/p>\n<p>\u3055\u3066iptables\u306b\u30eb\u30fc\u30eb\u3092\u66f8\u304f\u65b9\u6cd5\u306f\u4e8c\u3064\u3042\u308b\u3002<\/p>\n<ul>\n<li>\u30b3\u30de\u30f3\u30c9\u3092\u53e9\u304d\u306a\u304c\u3089\u4e00\u884c\u305a\u3064\u53cd\u6620\u3055\u305b\u308b\u65b9\u6cd5<\/li>\n<li>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u30eb\u30fc\u30eb\u3092\u66f8\u3044\u3066\u8aad\u307f\u8fbc\u307e\u305b\u308b\u65b9\u6cd5<\/li>\n<\/ul>\n<p>\u81ea\u5206\u306f\u524d\u8005\u3067\u5b9f\u884c\u3057\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u6b63\u76f4\u5f8c\u8005\u306e\u307b\u3046\u304c\u697d\u304b\u3082\u3002<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u5f8c\u8005\u306e\u3084\u308a\u304b\u305f\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<p>\u307e\u305a\u3001root\u306b\u306a\u3063\u305f\u5f8c\u3001\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3059\u308b\u3002<br \/>\n<code>#cd ~\/<\/code><br \/>\n\u5225\u306b\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u3082\u3069\u3053\u3067\u3082\u3044\u3044\u306e\u3060\u304c\u3001\u7de8\u96c6\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u3069\u3053\u306b\u7f6e\u3044\u305f\u304b\u5fd8\u308c\u305d\u3046\u306a\u306e\u3067\u30db\u30fc\u30e0\u306b\u3059\u308b\u3002<br \/>\n\u6b21\u306b\u3001iptables.txt\u3068\u3044\u3046\u540d\u524d\u3067\u73fe\u5728\u306e\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u8a2d\u5b9a\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\u3002<br \/>\n<code>#\/sbin\/iptables-save &gt; iptables.txt<\/code><br \/>\nroot\u30e6\u30fc\u30b6\u30fc\u4ee5\u5916\u304b\u3089\u4e00\u5207\u306e\u5909\u66f4\u3084\u8aad\u307f\u8fbc\u307f\u3092\u8a31\u53ef\u3057\u305f\u304f\u306a\u3044\u306e\u3067\u3001<br \/>\n<code>#chmod 600 iptables.txt<\/code><br \/>\n\u305d\u3057\u3066\u3001\u4e2d\u8eab\u3092\u898b\u3066\u307f\u3088\u3046\u3002<br \/>\n\u307e\u3041\u3001\u8272\u3005\u66f8\u3044\u3066\u3042\u308b\u3068\u601d\u3046\u304c\u3001\u81ea\u5206\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u66f8\u3044\u305f\u3002<\/p>\n<pre><code>*filter\r\n:INPUT ACCEPT [0:0]\r\n:FORWARD ACCEPT [0:0]\r\n:OUTPUT ACCEPT [42525:19874252]\r\n-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT\r\n-A INPUT -p icmp -j ACCEPT\r\n-A INPUT -i lo -j ACCEPT\r\n-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT\r\n-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -m hashlimit --hashlimit-burst 5 --hashlimit-upto 1\/min --hashlimit-mode srcip --hashlimit-name ssh_limit --hashlimit-htable-expire 300000 -j ACCEPT\r\n-A INPUT -j LOG --log-prefix \"IPTABLES_REJECT \"\r\n-A INPUT -j REJECT --reject-with icmp-port-unreachable\r\n-A FORWARD -j REJECT --reject-with icmp-host-prohibited\r\nCOMMIT\r\n<\/code><\/pre>\n<p>\u4e0a\u90e8\u306e\u65b9\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u5b9a\u7fa9\u306f\u3068\u308a\u3042\u3048\u305a\u89e6\u308c\u305a\u306b\u3001\u30eb\u30fc\u30eb\u306e\u90e8\u5206\u3092\u8aac\u660e\u3059\u308b\u3002<br \/>\n-A\u306f\u672b\u5c3e\u306b\u8a18\u8ff0<br \/>\nINPUT\u306fINPUT\u30c1\u30a7\u30a4\u30f3\u3092\u6307\u3059<br \/>\n-j \u306f\u52d5\u8a5e\u306b\u306a\u308b\u3002(\u3092\uff5e\u3059\u308b) ACCEPT(\u8a31\u53ef) DROP(\u6368\u3066) REJECT(\u4e0d\u8981\u3060\u3068\u9001\u308a\u8fd4\u3059) LOG(\u30ed\u30b0\u308b)<\/p>\n<p>\u30eb\u30fc\u30eb1\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u306e\u72b6\u614b\u304cRELATED,ESTABLISHED\u306e\u3082\u306e\u3092\u8a31\u53ef\u3002<br \/>\n\u3064\u307e\u308a\u3001\u65e2\u306b\u4e00\u5ea6OK\u304c\u51fa\u305f\u3082\u306e\u306f\u518d\u5ea6\u898b\u308b\u5fc5\u8981\u304c\u306a\u3044\u306e\u3067\u8a31\u53ef\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3002\u30b3\u30ec\u3092\u30c1\u30a7\u30a4\u30f3\u982d\u306b\u6301\u3063\u3066\u304f\u308b\u3053\u3068\u3067\u3001\u4f59\u8a08\u306a\u30d1\u30b1\u30c3\u30c8\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u624b\u9593\u304c\u6e1b\u308b\u3002<\/p>\n<p>\u30eb\u30fc\u30eb2\u306f\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u304cicmp\u306a\u3089\u8a31\u53ef\u3002ping\u3060\u3063\u305f\u308a\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3060\u3063\u305f\u308a\u8272\u3005\u3042\u308b\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u8a31\u53ef\u3002<\/p>\n<p>\u30eb\u30fc\u30eb3\u306f\u3001\u30eb\u30fc\u30d7\u30d0\u30c3\u30af\u3001\u3064\u307e\u308a\u81ea\u5206\u304b\u3089\u81ea\u5206\u3078\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u306f\u5168\u90e8\u8a31\u53ef\u3063\u3066\u3053\u3068\u3002<\/p>\n<p>\u30eb\u30fc\u30eb4\u306f\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u304ctcp\u3067\u3001\u30dd\u30fc\u30c8\u756a\u53f7\u304c80\u756a\u306e\u3082\u306e\u3092\u8a31\u53ef\u3002\u3064\u307e\u308aHTTP\u3067\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3082\u306e\u306f\u8a31\u53ef\u3063\u3066\u3053\u3068\u3060\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u308c\u304c\u91cd\u8981\u3002<br \/>\n\u30eb\u30fc\u30eb5\u306f\u3001\u3048\u3089\u304f\u9577\u3044\u306e\u3060\u304c\u3001\u8981\u306f\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u304ctcp\u3067\u30dd\u30fc\u30c8\u756a\u53f722\u756a\u3001\u3064\u307e\u308aSSH\u306b\u3064\u3044\u3066\u306e\u30eb\u30fc\u30eb\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u3044\u308b\u3002<br \/>\n\u3056\u3063\u304f\u308a\u3001\u8aac\u660e\u3059\u308b\u3068\u3001\u65b0\u898f\u63a5\u7d9a\u30675\u56de\u304d\u305f\u3089(\u3064\u307e\u308a5\u56de\u5931\u6557\u3057\u3066\u3044\u308b)\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e00\u5206\u306b\u4e00\u56de\u3057\u304b\u63a5\u7d9a\u3067\u304d\u306a\u304f\u3059\u308b\u3002\u305f\u3060\u3001\u305d\u306e\u307e\u307e\u3060\u3068\u6c38\u9060\u306b\u4e00\u5206\u306b\u4e00\u56de\u306b\u306a\u3063\u3061\u3083\u3046\u306e\u3067\u3001300\u79d2(5\u5206)\u3057\u305f\u3089\u5236\u9650\u306f\u5916\u3059\u3088\u3002\u3063\u3066\u3053\u3068\u3060\u3002<br \/>\n\u3053\u308c\u3067\u3001\u99ac\u9e7f\u307f\u305f\u3044\u306b\u30a2\u30bf\u30c3\u30af\u3057\u3066\u304d\u305f\u6570\u3082\u5236\u9650\u3055\u308c\u308b\u3002<\/p>\n<p>\u30eb\u30fc\u30eb6\u306f\u4eca\u307e\u3067\u306e\u30eb\u30fc\u30eb\u3067\u8a31\u53ef\u3055\u308c\u306a\u304b\u3063\u305f\u3082\u306e\u3092\u6368\u3066\u308b\u524d\u306b\u30ed\u30ae\u30f3\u30b0\u3059\u308b\u3088\uff5e\u3063\u3066\u3053\u3068\u3002\u3061\u306a\u307f\u306b\u30ed\u30b0\u306e\u8b58\u5225\u5b50\u306b&#8221;IPTABLES_REJECT &#8220;\u3063\u3066\u3064\u3051\u3066\u308b\u306e\u306f\u3001\u3053\u306e\u30ed\u30b0\u306frsyslog\u3067\u5f8c\u3067\u898b\u3064\u3051\u3084\u3059\u3044\u3088\u3046\u306b\u76ee\u5370\u3064\u3051\u3066\u308b\u3060\u3051\u3002<\/p>\n<p>\u30eb\u30fc\u30eb7\u306f\u30dd\u30fc\u30c8\u756a\u53f7\u306b\u5c4a\u304b\u3093\u304b\u3063\u305f\u308f\uff5e\u3063\u3066\u9001\u4fe1\u30d1\u30b1\u30c3\u30c8\u306b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8fd4\u3057\u3066\u30d1\u30b1\u30c3\u30c8\u3092\u7834\u68c4\u3059\u308b\u3002<\/p>\n<p>\u30eb\u30fc\u30eb8\u306fFoward\u306b\u95a2\u3059\u308b\u30eb\u30fc\u30eb\u3002<br \/>\n\u3053\u308c\u306f\u3001\u8907\u6570\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3063\u305f\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u30fc\u306b\u4f7f\u3063\u305f\u308a\u3068\u304b\u8272\u3005\u3059\u308b\u3068\u304d\u306b\u4f7f\u3046\u3063\u307d\u3044\uff1f\u3068\u306b\u304b\u304f\u3001\u3053\u306e\u30de\u30b7\u30f3\u3058\u3083Foward\u306f\u3057\u306a\u3044\u3088\uff01\u3063\u3066\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u3066\u7d42\u4e86\u3059\u308b\u3002<\/p>\n<p>\u3055\u3066\u3001\u3053\u3053\u307e\u3067\u66f8\u3044\u305f\u3089<br \/>\n<code>#\/sbin\/iptalbes-restore iptables.txt<\/code><br \/>\n\u3092\u5b9f\u884c\u3057\u3066\u53cd\u6620\u3055\u305b\u308b\u3002<br \/>\n\u305d\u306e\u5f8c\u3001<br \/>\n<code>#iptables -L<\/code><br \/>\n\u3067\u78ba\u8a8d\u3002<br \/>\n\u304d\u3061\u3093\u3068\u53cd\u6620\u3055\u308c\u3066\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3002<br \/>\n\u3053\u308c\u3067\u554f\u984c\u306a\u3051\u308c\u3070\u5927\u4e08\u592b\u3060\u308d\u3046\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u5b9f\u306f\u30b5\u30fc\u30d0\u30fc\u304c\u30ea\u30b9\u30bf\u30fc\u30c8\u3057\u305f\u3089\u8a2d\u5b9a\u304c\u6d88\u3048\u308b\u30fb\u30fb\u30fb\u3002<br \/>\n\u305d\u3053\u3067\u3001\u30bb\u30fc\u30d6\u3092\u3059\u308b\u3002<br \/>\n<code>#service iptables save<\/code><br \/>\n\u3053\u308c\u3067\u30bb\u30fc\u30d6\u3055\u308c\u305f\u3089\u3001<br \/>\n<code>#service iptables restart<\/code><br \/>\n\u3067iptables\u3092\u30ea\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u307f\u3088\u3046\u3002<br \/>\n\u305d\u306e\u5f8c\u3001\u3082\u3046\u4e00\u5ea6\u3001<br \/>\n<code>#iptables -L<\/code><br \/>\n\u3067\u78ba\u8a8d\u3057\u3066\u554f\u984c\u306a\u304b\u3063\u305f\u3089\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u307e\u3041\u3001\u5b9f\u306e\u3068\u3053\u308d\u3001\u30eb\u30fc\u30bf\u30fc\u306780\u756a\u306822\u756a\u4ee5\u5916\u306f\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u3055\u306a\u3044\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u306e\u4ed6\u306eicmp\u3068\u304b\u306f\u8a2d\u5b9a\u3057\u305f\u3051\u3069\u5c4a\u3044\u3066\u306a\u3044\u3093\u3060\u3051\u3069\u306d\u3001\u4e00\u5fdc\u5ff5\u306e\u70ba\u8272\u3005\u3068\u8a2d\u5b9a\u3057\u3066\u307f\u305f\u3002<br \/>\n\u307e\u3060\u307e\u3060\u3001\u5965\u304c\u6df1\u3044iptables\u3060\u304c\u3001\u3056\u3063\u304f\u308a\u306a\u79c1\u306f\u4eca\u56de\u306f\u3053\u308c\u307e\u3067\u3002<br \/>\n\u307e\u305f\u3001\u6a5f\u4f1a\u304c\u3042\u308c\u3070\u8abf\u3079\u3066\u307f\u3088\u3046\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u305d\u306e\u5f8c\u306e\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u904e\u5ea6\u306a\u30a2\u30af\u30bb\u30b9\u306f\u6e1b\u3063\u305f\u3093\u3060\u3051\u3069\u3001\u30d0\u30fc\u30b9\u30c8\u3057\u305f\u5f8c\u3082\u30011\u5206\u306b1\u56de\u306e\u30a2\u30af\u30bb\u30b9\u304c\u7d50\u69cb\u304f\u308b\u3082\u3093\u3060\u304b\u3089\u30ed\u30b0\u304c\u3046\u3056\u3063\u305f\u304f\u3066\u4ed5\u65b9\u304c\u306a\u3044\u30fb\u30fb\u30fb\u3002<br \/>\n\u4ed6\u306b\u3001\u4e0d\u6b63\u30a2\u30af\u30bb\u30b9\u3068\u601d\u308f\u308c\u308bIP\u30a2\u30c9\u30ec\u30b9\u3092\u81ea\u52d5\u7684\u306b\u30a2\u30af\u30bb\u30b9\u62d2\u5426\u30ea\u30b9\u30c8\u306b\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3068\u304b\u3042\u308b\u306e\u3060\u3051\u3069\u3001\u3069\u3046\u305b\u81ea\u524d\u306e\u30b5\u30fc\u30d0\u30fc\u3060\u3057\u3001\u624b\u3063\u53d6\u308a\u65e9\u304fssh\u306e\u30dd\u30fc\u30c8\u756a\u53f7\u3054\u3068\u5909\u3048\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u3088\u3046\u3068\u601d\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u3092\u516c\u958b\u3057\u305f\u3089\u3001\u65e9\u901f\u591a\u304f\u306e\u30a2\u30af\u30bb\u30b9\u304c\u304d\u307e\u3057\u305f\u3002 SSH\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u5927\u91cf\u306e\u30a2\u30bf\u30c3\u30af\u304c\u30fb\u30fb\u30fb\u30fb\u30fb(\uff1b\u00b4\u0434\uff40) \u516c\u958b\u3057\u305f\u6df1\u591c\u306b\u3001\u30b5\u30fc\u30d0\u30fc\u30de\u30b7\u30f3\u304c\u3046\u308b\u3055\u304f\u3066\u76ee\u304c\u51b7\u3081\u307e\u3057\u305f\u3002 \u3069\u3046\u3082\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u7dcf\u5f53\u308a\u306b\u8a66\u3057\u3066\u304f\u308b\u30d6\u30eb\u30fc&hellip;  <a href=\"https:\/\/gomokulog.gomocool.net\/?p=34\" class=\"more-link\">more <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3,6,5,7],"class_list":["post-34","post","type-post","status-publish","format-standard","hentry","category-server","tag-centos","tag-iptables","tag-5","tag-7"],"_links":{"self":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34"}],"version-history":[{"count":6,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gomokulog.gomocool.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}