{"id":166,"date":"2023-12-07T10:40:26","date_gmt":"2022-07-09T08:54:00","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/"},"modified":"2025-07-31T21:19:15","modified_gmt":"2025-07-31T12:19:15","slug":"%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/","title":{"rendered":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d"},"content":{"rendered":"<h3>\u306f\u3058\u3081\u306b<\/h3>\n<p>\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3084\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u30fc\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u91cd\u8981\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002Linux\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001iptables\u304c\u30ab\u30fc\u30cd\u30eb\u306e\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u9023\u643a\u3057\u3066\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u4fe1\u983c\u6027\u306e\u3042\u308b\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30dd\u30ea\u30b7\u30fc\u306e\u4f5c\u6210\u306f\u3001\u8907\u96d1\u306a\u69cb\u6587\u3068\u95a2\u9023\u90e8\u5206\u306e\u6570\u306e\u305f\u3081\u306b\u56f0\u96e3\u3092\u4f34\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001iptables\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u3064\u3044\u3066\u6398\u308a\u4e0b\u3052\u3001\u72ec\u81ea\u306e\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30dd\u30ea\u30b7\u30fc\u3092\u69cb\u7bc9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u306b\u3068\u3063\u3066\u3088\u308a\u7406\u89e3\u3057\u3084\u3059\u304f\u3059\u308b\u3053\u3068\u3092\u76ee\u6307\u3057\u307e\u3059\u3002iptables\u304cnetfilter\u3068\u3069\u306e\u3088\u3046\u306b\u76f8\u4e92\u4f5c\u7528\u3057\u3001\u5404\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u7d44\u307f\u5408\u308f\u3055\u3063\u3066\u5305\u62ec\u7684\u306a\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u63d0\u4f9b\u3059\u308b\u304b\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002<\/p>\n<h2>IP\u30c6\u30fc\u30d6\u30eb\u3068\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u306f\u4f55\u3067\u3059\u304b\uff1f (IP te-buru to nettofirutaa wa nan desu ka?)<\/h2>\n<p>\u9577\u3044\u9593\u3001Linux\u3067\u6700\u3082\u4e00\u822c\u7684\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u305f\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306fiptables\u3068\u547c\u3070\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u4e00\u90e8\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u65b0\u3057\u3044\u30c4\u30fc\u30eb\u3067\u3042\u308bnftables\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u304c\u3001iptables\u306e\u69cb\u6587\u306f\u307e\u3060\u57fa\u6e96\u3068\u3057\u3066\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002iptables\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u3001Linux\u30ab\u30fc\u30cd\u30eb\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u30b9\u30bf\u30c3\u30af\u5185\u306e\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30d5\u30c3\u30af\u3068\u306e\u9023\u643a\u306b\u3088\u3063\u3066\u52d5\u4f5c\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30ab\u30fc\u30cd\u30eb\u30d5\u30c3\u30af\u306f\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066\u77e5\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u30ec\u30a4\u30e4\u30fc\u3092\u901a\u904e\u3059\u308b\u3059\u3079\u3066\u306e\u30d1\u30b1\u30c3\u30c8\uff08\u5165\u529b\u307e\u305f\u306f\u51fa\u529b\uff09\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30c3\u30af\u3092\u30c8\u30ea\u30ac\u30fc\u3068\u3057\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3068\u76f8\u4e92\u4f5c\u7528\u3059\u308b\u305f\u3081\u306e\u30ad\u30fc\u30dd\u30a4\u30f3\u30c8\u3068\u306a\u308a\u307e\u3059\u3002iptables\u306b\u95a2\u9023\u3059\u308b\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30eb\u30fc\u30eb\u306b\u3088\u3063\u3066\u5b9a\u3081\u3089\u308c\u305f\u6761\u4ef6\u306b\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u304c\u9069\u5408\u3059\u308b\u3053\u3068\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306b\u3001\u3053\u308c\u3089\u306e\u30d5\u30c3\u30af\u306b\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d5\u30c3\u30af\u30b9<\/h2>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u767b\u9332\u3067\u304d\u308b\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d5\u30c3\u30af\u304c5\u3064\u3042\u308a\u307e\u3059\u3002\u30d1\u30b1\u30c3\u30c8\u304c\u30b9\u30bf\u30c3\u30af\u3092\u9032\u3080\u306b\u3064\u308c\u3066\u3001\u3053\u308c\u3089\u306e\u30d5\u30c3\u30af\u306b\u767b\u9332\u3055\u308c\u305f\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30c8\u30ea\u30ac\u30fc\u3055\u308c\u307e\u3059\u3002\u30d1\u30b1\u30c3\u30c8\u304c\u30c8\u30ea\u30ac\u30fc\u3059\u308b\u30d5\u30c3\u30af\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u304c\u9001\u4fe1\u5143\u304b\u53d7\u4fe1\u5143\u304b\u3001\u30d1\u30b1\u30c3\u30c8\u306e\u5b9b\u5148\u3001\u307e\u305f\u306f\u4ee5\u524d\u306e\u6bb5\u968e\u3067\u306e\u30d1\u30b1\u30c3\u30c8\u306e\u30c9\u30ed\u30c3\u30d7\u307e\u305f\u306f\u62d2\u5426\u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30d5\u30c3\u30af\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u30b9\u30bf\u30c3\u30af\u5185\u306e\u3053\u308c\u3089\u306e\u660e\u78ba\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u30dd\u30a4\u30f3\u30c8\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>NF_IP_PRE_ROUTING: This hook will be triggered by any incoming traffic very soon after entering the network stack. This hook is processed before any routing decisions have been made regarding where to send the packet.<\/li>\n<li>NF_IP_LOCAL_IN: This hook is triggered after an incoming packet has been routed if the packet is destined for the local system.<\/li>\n<li>NF_IP_FORWARD: This hook is triggered after an incoming packet has been routed if the packet is to be forwarded to another host.<\/li>\n<li>NF_IP_LOCAL_OUT: This hook is triggered by any locally created outbound traffic as soon as it hits the network stack.<\/li>\n<li>NF_IP_POST_ROUTING: This hook is triggered by any outgoing or forwarded traffic after routing has taken place and just before being sent out on the wire.<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u30d5\u30c3\u30af\u306b\u767b\u9332\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001\u30d5\u30c3\u30af\u304c\u30c8\u30ea\u30ac\u30fc\u3055\u308c\u305f\u6642\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u9806\u756a\u3092\u6c7a\u5b9a\u3059\u308b\u305f\u3081\u306b\u3001\u512a\u5148\u9806\u4f4d\u306e\u756a\u53f7\u3082\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u8907\u6570\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u307e\u305f\u306f\u540c\u3058\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8907\u6570\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\uff09\u304c\u5404\u30d5\u30c3\u30af\u306b\u78ba\u5b9a\u7684\u306a\u9806\u5e8f\u3067\u63a5\u7d9a\u3055\u308c\u308b\u624b\u6bb5\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002\u5404\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u9806\u756a\u306b\u547c\u3073\u51fa\u3055\u308c\u3001\u30d1\u30b1\u30c3\u30c8\u306e\u51e6\u7406\u5f8c\u306bnetfilter\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u5bfe\u3057\u3066\u884c\u3046\u3079\u304d\u52d5\u4f5c\u3092\u793a\u3059\u5224\u65ad\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<h2>IPTables\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u30c1\u30a7\u30fc\u30f3<\/h2>\n<p>iptables\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u3001\u30eb\u30fc\u30eb\u3092\u6574\u7406\u3059\u308b\u305f\u3081\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u305d\u308c\u3089\u304c\u884c\u3046\u6c7a\u5b9a\u306e\u7a2e\u985e\u306b\u5fdc\u3058\u3066\u30eb\u30fc\u30eb\u3092\u5206\u985e\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u5909\u63db\u306b\u95a2\u3059\u308b\u30eb\u30fc\u30eb\u306fnat\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002\u30d1\u30b1\u30c3\u30c8\u3092\u305d\u306e\u5b9b\u5148\u306b\u7d9a\u3051\u308b\u304b\u3069\u3046\u304b\u3092\u6c7a\u5b9a\u3059\u308b\u305f\u3081\u306e\u30eb\u30fc\u30eb\u306f\u3001\u304a\u305d\u3089\u304f\u30d5\u30a3\u30eb\u30bf\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u5404iptables\u30c6\u30fc\u30d6\u30eb\u5185\u3067\u306f\u3001\u30eb\u30fc\u30eb\u306f\u500b\u5225\u306e\u300c\u30c1\u30a7\u30fc\u30f3\u300d\u5185\u3067\u3055\u3089\u306b\u6574\u7406\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30c6\u30fc\u30d6\u30eb\u306f\u4fdd\u6301\u3059\u308b\u30eb\u30fc\u30eb\u306e\u4e00\u822c\u7684\u306a\u76ee\u7684\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u304c\u3001\u7d44\u307f\u8fbc\u307f\u306e\u30c1\u30a7\u30fc\u30f3\u306f\u305d\u308c\u3089\u3092\u30c8\u30ea\u30ac\u30fc\u3059\u308bnetfilter\u30d5\u30c3\u30af\u3092\u8868\u3057\u307e\u3059\u3002\u30c1\u30a7\u30fc\u30f3\u306f\u30eb\u30fc\u30eb\u304c\u8a55\u4fa1\u3055\u308c\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u6c7a\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u7d44\u307f\u8fbc\u307f\u30c1\u30a7\u30fc\u30f3\u306e\u540d\u524d\u306f\u3001\u95a2\u9023\u3059\u308bnetfilter\u30d5\u30c3\u30af\u306e\u540d\u524d\u3068\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>PREROUTING: Triggered by the NF_IP_PRE_ROUTING hook.<\/li>\n<li>INPUT: Triggered by the NF_IP_LOCAL_IN hook.<\/li>\n<li>FORWARD: Triggered by the NF_IP_FORWARD hook.<\/li>\n<li>OUTPUT: Triggered by the NF_IP_LOCAL_OUT hook.<\/li>\n<li>POSTROUTING: Triggered by the NF_IP_POST_ROUTING hook.<\/li>\n<\/ul>\n<p>\u30c1\u30a7\u30fc\u30f3\u306f\u3001\u7ba1\u7406\u8005\u304c\u30d1\u30b1\u30c3\u30c8\u306e\u9001\u4fe1\u7d4c\u8def\u3067\u30eb\u30fc\u30eb\u3092\u8a55\u4fa1\u3059\u308b\u5834\u6240\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u5404\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u8907\u6570\u306e\u30c1\u30a7\u30fc\u30f3\u304c\u3042\u308b\u305f\u3081\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u5f71\u97ff\u306f\u51e6\u7406\u306e\u8907\u6570\u306e\u30dd\u30a4\u30f3\u30c8\u3067\u884c\u4f7f\u3055\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30b9\u30bf\u30c3\u30af\u306e\u7279\u5b9a\u306e\u30dd\u30a4\u30f3\u30c8\u3067\u306e\u307f\u610f\u5473\u3092\u6301\u3064\u6c7a\u5b9a\u306e\u7a2e\u985e\u304c\u3042\u308b\u305f\u3081\u3001\u3059\u3079\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u30ab\u30fc\u30cd\u30eb\u30d5\u30c3\u30af\u3054\u3068\u306b\u30c1\u30a7\u30fc\u30f3\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30ab\u30fc\u30cd\u30eb\u306e\u30d5\u30c3\u30af\u306f\u3001\u308f\u305a\u304b5\u3064\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u30c1\u30a7\u30fc\u30f3\u306f\u305d\u308c\u305e\u308c\u306e\u30d5\u30c3\u30af\u306b\u767b\u9332\u3055\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u30013\u3064\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u306fPREROUTING\u30c1\u30a7\u30fc\u30f3\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30c1\u30a7\u30fc\u30f3\u304c\u95a2\u9023\u3059\u308bNF_IP_PRE_ROUTING\u30d5\u30c3\u30af\u306b\u767b\u9332\u3059\u308b\u969b\u3001\u512a\u5148\u5ea6\u304c\u6307\u5b9a\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u512a\u5148\u5ea6\u306b\u3088\u3063\u3066\u3001\u5404\u30c6\u30fc\u30d6\u30eb\u306ePREROUTING\u30c1\u30a7\u30fc\u30f3\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u9806\u5e8f\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002\u6700\u3082\u512a\u5148\u5ea6\u306e\u9ad8\u3044PREROUTING\u30c1\u30a7\u30fc\u30f3\u5185\u306e\u30eb\u30fc\u30eb\u306f\u3001\u6b21\u306ePREROUTING\u30c1\u30a7\u30fc\u30f3\u306b\u79fb\u308b\u524d\u306b\u9806\u6b21\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002\u307e\u3082\u306a\u304f\u5404\u30c1\u30a7\u30fc\u30f3\u306e\u5177\u4f53\u7684\u306a\u9806\u5e8f\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u3069\u306e\u30c6\u30fc\u30d6\u30eb\u304c\u5229\u7528\u53ef\u80fd\u3067\u3059\u304b\uff1f<\/h2>\n<p>\u3072\u3068\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3060\u3051\u304c\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001\u65e5\u672c\u8a9e\u3067\u4ee5\u4e0b\u306e\u6587\u3092\u8a00\u3044\u63db\u3048\u307e\u3059\uff1a<br \/>\n\u300c\u5c11\u3057\u5f8c\u308d\u306b\u4e0b\u304c\u308a\u3001iptables\u304c\u63d0\u4f9b\u3059\u308b\u7570\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3053\u308c\u3089\u306f\u30d1\u30b1\u30c3\u30c8\u306e\u8a55\u4fa1\u306e\u305f\u3081\u306b\u3001\u95a2\u5fc3\u306e\u5bfe\u8c61\u3054\u3068\u306b\u6574\u7406\u3055\u308c\u305f\u7570\u306a\u308b\u30eb\u30fc\u30eb\u306e\u30bb\u30c3\u30c8\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002\u300d<\/p>\n<h3>\u30d5\u30a3\u30eb\u30bf\u30fc\u30c6\u30fc\u30d6\u30eb<\/h3>\n<p>\u30d5\u30a3\u30eb\u30bf\u30fc\u30c6\u30fc\u30d6\u30eb\u306fiptables\u3067\u6700\u3082\u5e83\u304f\u4f7f\u7528\u3055\u308c\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u4e00\u3064\u3067\u3059\u3002\u30d5\u30a3\u30eb\u30bf\u30fc\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u304c\u305d\u306e\u610f\u56f3\u3057\u305f\u5b9b\u5148\u306b\u9032\u3081\u308b\u3079\u304d\u304b\u3001\u307e\u305f\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u62d2\u5426\u3059\u308b\u304b\u306e\u5224\u65ad\u3092\u884c\u3046\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u7528\u8a9e\u3067\u306f\u3001\u3053\u308c\u3092\u300c\u30d1\u30b1\u30c3\u30c8\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u300d\u3068\u547c\u3073\u307e\u3059\u3002\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306b\u95a2\u3059\u308b\u8b70\u8ad6\u306e\u969b\u306b\u4eba\u3005\u304c\u601d\u3044\u6d6e\u304b\u3079\u308b\u307b\u3068\u3093\u3069\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h3>NAT\u30c6\u30fc\u30d6\u30eb<\/h3>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u5909\u63db\u30eb\u30fc\u30eb\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u3001NAT\u30c6\u30fc\u30d6\u30eb\u304c\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u30d1\u30b1\u30c3\u30c8\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308b\u3068\u3001\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u30eb\u30fc\u30eb\u306b\u3088\u3063\u3066\u3001\u30d1\u30b1\u30c3\u30c8\u306e\u9001\u4fe1\u5143\u307e\u305f\u306f\u5b9b\u5148\u30a2\u30c9\u30ec\u30b9\u3092\u3069\u306e\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u304b\u304c\u6c7a\u5b9a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30d1\u30b1\u30c3\u30c8\u3068\u5fdc\u7b54\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7d4c\u8def\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u304c\u4e0d\u53ef\u80fd\u306a\u5834\u5408\u306b\u3001\u30d1\u30b1\u30c3\u30c8\u3092\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u3088\u304f\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>\u30de\u30f3\u30b0\u30eb\u30c6\u30fc\u30d6\u30eb<\/h3>\n<p>\u30de\u30f3\u30b0\u30eb\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u306eIP\u30d8\u30c3\u30c0\u30fc\u3092\u69d8\u3005\u306a\u65b9\u6cd5\u3067\u5909\u66f4\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30d1\u30b1\u30c3\u30c8\u306eTTL\uff08\u751f\u5b58\u6642\u9593\uff09\u5024\u3092\u8abf\u6574\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u30d1\u30b1\u30c3\u30c8\u304c\u6301\u7d9a\u3067\u304d\u308b\u6709\u52b9\u306a\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30db\u30c3\u30d7\u306e\u6570\u3092\u9577\u304f\u3057\u305f\u308a\u77ed\u304f\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ed6\u306eIP\u30d8\u30c3\u30c0\u30fc\u3082\u540c\u69d8\u306e\u65b9\u6cd5\u3067\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3084\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u30c4\u30fc\u30eb\u306b\u3088\u308b\u8ffd\u52a0\u51e6\u7406\u306e\u305f\u3081\u306b\u3001\u30d1\u30b1\u30c3\u30c8\u306b\u5185\u90e8\u306e\u30ab\u30fc\u30cd\u30eb\u300c\u30de\u30fc\u30af\u300d\u3092\u4ed8\u3051\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30de\u30fc\u30af\u306f\u5b9f\u969b\u306e\u30d1\u30b1\u30c3\u30c8\u306b\u89e6\u308c\u305a\u3001\u30ab\u30fc\u30cd\u30eb\u304c\u30d1\u30b1\u30c3\u30c8\u306e\u8868\u73fe\u306b\u30de\u30fc\u30af\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<h3>\u751f\u306e\u30c6\u30fc\u30d6\u30eb<\/h3>\n<p>iptables\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u3067\u3042\u308a\u3001\u30d1\u30b1\u30c3\u30c8\u306f\u4ee5\u524d\u306e\u30d1\u30b1\u30c3\u30c8\u3068\u306e\u95a2\u4fc2\u3092\u8003\u616e\u3057\u3066\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002netfilter\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u63a5\u7d9a\u8ffd\u8de1\u6a5f\u80fd\u306b\u3088\u308a\u3001iptables\u306f\u30d1\u30b1\u30c3\u30c8\u3092\u5358\u72ec\u306e\u30b9\u30c8\u30ea\u30fc\u30e0\u3067\u306f\u306a\u304f\u3001\u9032\u884c\u4e2d\u306e\u63a5\u7d9a\u3084\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u4e00\u90e8\u3068\u3057\u3066\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u63a5\u7d9a\u8ffd\u8de1\u30ed\u30b8\u30c3\u30af\u306f\u901a\u5e38\u3001\u30d1\u30b1\u30c3\u30c8\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u5230\u9054\u3057\u305f\u76f4\u5f8c\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u751f\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u975e\u5e38\u306b\u72ed\u7fa9\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u552f\u4e00\u306e\u76ee\u7684\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u306b\u30de\u30fc\u30ad\u30f3\u30b0\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u8ffd\u8de1\u304b\u3089\u9664\u5916\u3059\u308b\u4ed5\u7d44\u307f\u3092\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<h3>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30c6\u30fc\u30d6\u30eb<\/h3>\n<p>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30c6\u30fc\u30d6\u30eb\u306f\u3001SELinux\u307e\u305f\u306fSELinux\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u89e3\u91c8\u3059\u308b\u4ed6\u306e\u30b7\u30b9\u30c6\u30e0\u304c\u30d1\u30b1\u30c3\u30c8\u3092\u51e6\u7406\u3059\u308b\u65b9\u6cd5\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u3001\u30d1\u30b1\u30c3\u30c8\u4e0a\u306e\u5185\u90e8SELinux\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30de\u30fc\u30af\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30de\u30fc\u30af\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u3054\u3068\u307e\u305f\u306f\u63a5\u7d9a\u3054\u3068\u306b\u9069\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30c1\u30a7\u30fc\u30f3\u3068\u30c6\u30fc\u30d6\u30eb\u306e\u95a2\u4fc2<\/h2>\n<p>\u3082\u30573\u3064\u306e\u30c6\u30fc\u30d6\u30eb\u306bPREROUTING\u30c1\u30a7\u30fc\u30f3\u304c\u3042\u308b\u5834\u5408\u3001\u305d\u308c\u3089\u306f\u3069\u306e\u9806\u5e8f\u3067\u8a55\u4fa1\u3055\u308c\u307e\u3059\u304b\uff1f<\/p>\n<p>\u6b21\u306e\u8868\u306f\u3001\u5de6\u304b\u3089\u53f3\u306b\u8aad\u3093\u3060\u5834\u5408\u306b\u3001\u5404iptables\u30c6\u30fc\u30d6\u30eb\u3067\u4f7f\u7528\u53ef\u80fd\u306a\u30c1\u30a7\u30fc\u30f3\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001raw\u30c6\u30fc\u30d6\u30eb\u306b\u306fPREROUTING\u30c1\u30a7\u30fc\u30f3\u3068OUTPUT\u30c1\u30a7\u30fc\u30f3\u306e\u4e21\u65b9\u304c\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u4e0a\u304b\u3089\u4e0b\u306b\u8aad\u3093\u3060\u5834\u5408\u3001\u305d\u308c\u305e\u308c\u306e\u30c1\u30a7\u30fc\u30f3\u304c\u95a2\u9023\u3059\u308bnetfilter\u30d5\u30c3\u30af\u304c\u30c8\u30ea\u30ac\u30fc\u3055\u308c\u305f\u3068\u304d\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u9806\u5e8f\u3082\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3044\u304f\u3064\u304b\u306e\u70b9\u306b\u3064\u3044\u3066\u6ce8\u610f\u3059\u3079\u304d\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u8868\u73fe\u3067\u306f\u3001nat\u30c6\u30fc\u30d6\u30eb\u304cDNAT\u64cd\u4f5c\uff08\u30d1\u30b1\u30c3\u30c8\u306e\u5b9b\u5148\u30a2\u30c9\u30ec\u30b9\u3092\u5909\u66f4\u3059\u308b\u64cd\u4f5c\uff09\u3068SNAT\u64cd\u4f5c\uff08\u30bd\u30fc\u30b9\u30a2\u30c9\u30ec\u30b9\u3092\u5909\u66f4\u3059\u308b\u64cd\u4f5c\uff09\u306b\u5206\u5272\u3055\u308c\u3001\u305d\u308c\u305e\u308c\u306e\u9806\u5e8f\u304c\u3088\u308a\u660e\u78ba\u306b\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5224\u65ad\u304c\u884c\u308f\u308c\u308b\u30dd\u30a4\u30f3\u30c8\u3084\u63a5\u7d9a\u8ffd\u8de1\u304c\u6709\u52b9\u306b\u306a\u308b\u30dd\u30a4\u30f3\u30c8\u3082\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u884c\u7a0b\u5168\u4f53\u3092\u3088\u308a\u5305\u62ec\u7684\u306b\u628a\u63e1\u3059\u308b\u305f\u3081\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<div>\n<div class=\"post-table\">\n<table>\n<thead>\n<tr>\n<th>Tables\u2193\/Chains\u2192<\/th>\n<th style=\"text-align: center;\">PREROUTING<\/th>\n<th style=\"text-align: center;\">INPUT<\/th>\n<th style=\"text-align: center;\">FORWARD<\/th>\n<th style=\"text-align: center;\">OUTPUT<\/th>\n<th style=\"text-align: center;\">POSTROUTING<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>(routing decision)<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td><strong>raw<\/strong><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td>(connection tracking enabled)<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td><strong>mangle<\/strong><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<\/tr>\n<tr>\n<td><strong>nat<\/strong> (DNAT)<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td>(routing decision)<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td><strong>filter<\/strong><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td><strong>security<\/strong><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td><strong>nat<\/strong> (SNAT)<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\">\u2713<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u30d1\u30b1\u30c3\u30c8\u304c\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d5\u30c3\u30af\u3092\u30c8\u30ea\u30ac\u30fc\u3059\u308b\u3068\u3001\u95a2\u9023\u3059\u308b\u30c1\u30a7\u30fc\u30f3\u306f\u4e0a\u304b\u3089\u4e0b\u306b\u9806\u756a\u306b\u51e6\u7406\u3055\u308c\u307e\u3059\u3002\u30d1\u30b1\u30c3\u30c8\u304c\u53d7\u4fe1\u30d1\u30b1\u30c3\u30c8\u304b\u9001\u4fe1\u30d1\u30b1\u30c3\u30c8\u304b\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u6c7a\u5b9a\u3001\u304a\u3088\u3073\u30d1\u30b1\u30c3\u30c8\u304c\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u57fa\u6e96\u3092\u30af\u30ea\u30a2\u3059\u308b\u304b\u3069\u3046\u304b\u306b\u3088\u3063\u3066\u3001\u30c8\u30ea\u30ac\u30fc\u3055\u308c\u308b\u30d5\u30c3\u30af\uff08\u5217\uff09\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002<\/p>\n<p>\u7279\u5b9a\u306e\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3059\u308b\u3068\u3001\u51e6\u7406\u4e2d\u306b\u30c6\u30fc\u30d6\u30eb\u306e\u30c1\u30a7\u30fc\u30f3\u304c\u30b9\u30ad\u30c3\u30d7\u3055\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u63a5\u7d9a\u306e\u6700\u521d\u306e\u30d1\u30b1\u30c3\u30c8\u306e\u307f\u304cNAT\u306e\u30eb\u30fc\u30eb\u306b\u57fa\u3065\u3044\u3066\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002\u6700\u521d\u306e\u30d1\u30b1\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u884c\u308f\u308c\u305fNAT\u306e\u5224\u65ad\u306f\u3001\u8ffd\u52a0\u306e\u8a55\u4fa1\u306a\u3057\u3067\u63a5\u7d9a\u306e\u3059\u3079\u3066\u306e\u5f8c\u7d9a\u30d1\u30b1\u30c3\u30c8\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002NAT\u3092\u9069\u7528\u3057\u305f\u63a5\u7d9a\u3078\u306e\u5fdc\u7b54\u3067\u306f\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u6b63\u3057\u304f\u884c\u3046\u305f\u3081\u306b\u81ea\u52d5\u7684\u306b\u9006\u306eNAT\u30eb\u30fc\u30eb\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>\u9023\u9396\u8d70\u67fb\u9806<\/h3>\n<p>\u3082\u3057\u30b5\u30fc\u30d0\u30fc\u304c\u30d1\u30b1\u30c3\u30c8\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u65b9\u6cd5\u3092\u77e5\u3063\u3066\u304a\u308a\u3001\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306e\u30eb\u30fc\u30eb\u304c\u305d\u306e\u9001\u4fe1\u3092\u8a31\u53ef\u3057\u3066\u3044\u308b\u3068\u4eee\u5b9a\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u30d5\u30ed\u30fc\u306f\u7570\u306a\u308b\u72b6\u6cc1\u3067\u901a\u904e\u3059\u308b\u7d4c\u8def\u3092\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Incoming packets destined for the local system: PREROUTING -&gt; INPUT<\/li>\n<li>Incoming packets destined to another host: PREROUTING -&gt; FORWARD -&gt; POSTROUTING<\/li>\n<li>Locally generated packets: OUTPUT -&gt; POSTROUTING<\/li>\n<\/ul>\n<p>\u524d\u8ff0\u306e\u60c5\u5831\u3068\u524d\u306e\u8868\u3067\u793a\u3055\u308c\u305f\u9806\u5e8f\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3001\u30ed\u30fc\u30ab\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u884c\u304f\u30d1\u30b1\u30c3\u30c8\u306f\u6700\u521d\u306b raw\u3001mangle\u3001nat\u306ePREROUTING\u30c1\u30a7\u30fc\u30f3\u3067\u8a55\u4fa1\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001mangle\u3001filter\u3001security\u3001nat\u306eINPUT\u30c1\u30a7\u30fc\u30f3\u3092\u901a\u904e\u3057\u3066\u3001\u6700\u7d42\u7684\u306b\u30ed\u30fc\u30ab\u30eb\u30bd\u30b1\u30c3\u30c8\u306b\u914d\u4fe1\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>IPTables\u30eb\u30fc\u30eb<\/h2>\n<p>\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u7279\u5b9a\u306e\u9023\u9396\u5185\u306b\u30eb\u30fc\u30eb\u304c\u914d\u7f6e\u3055\u308c\u307e\u3059\u3002\u5404\u9023\u9396\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3068\u3001\u5bfe\u8c61\u306e\u30d1\u30b1\u30c3\u30c8\u306f\u9023\u9396\u5185\u306e\u5404\u30eb\u30fc\u30eb\u3068\u9806\u756a\u306b\u7167\u5408\u3055\u308c\u307e\u3059\u3002\u5404\u30eb\u30fc\u30eb\u306b\u306f\u7167\u5408\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u30a2\u30af\u30b7\u30e7\u30f3\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30de\u30c3\u30c1\u30f3\u30b0<\/h3>\n<p>\u30eb\u30fc\u30eb\u306e\u30de\u30c3\u30c1\u30f3\u30b0\u90e8\u5206\u306f\u3001\u95a2\u9023\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\uff08\u307e\u305f\u306f\u300c\u30bf\u30fc\u30b2\u30c3\u30c8\u300d\uff09\u304c\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u306b\u30d1\u30b1\u30c3\u30c8\u304c\u6e80\u305f\u3059\u5fc5\u8981\u306e\u3042\u308b\u6761\u4ef6\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u30de\u30c3\u30c1\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306f\u975e\u5e38\u306b\u67d4\u8edf\u3067\u3042\u308a\u3001iptables\u306e\u8ffd\u52a0\u62e1\u5f35\u306b\u3088\u3063\u3066\u5927\u5e45\u306b\u62e1\u5f35\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002\u30d7\u30ed\u30c8\u30b3\u30eb\u30bf\u30a4\u30d7\u3001\u5b9b\u5148\u307e\u305f\u306f\u9001\u4fe1\u5143\u30a2\u30c9\u30ec\u30b9\u3001\u5b9b\u5148\u307e\u305f\u306f\u9001\u4fe1\u5143\u30dd\u30fc\u30c8\u3001\u5b9b\u5148\u307e\u305f\u306f\u9001\u4fe1\u5143\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3001\u5165\u529b\u307e\u305f\u306f\u51fa\u529b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3001\u30d8\u30c3\u30c0\u30fc\u3001\u63a5\u7d9a\u72b6\u614b\u306a\u3069\u306e\u6761\u4ef6\u306b\u3088\u3063\u3066\u30de\u30c3\u30c1\u3059\u308b\u30eb\u30fc\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u7570\u306a\u308b\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u533a\u5225\u3059\u308b\u305f\u3081\u306e\u8907\u96d1\u306a\u30eb\u30fc\u30eb\u30bb\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30bf\u30fc\u30b2\u30c3\u30c8<\/h3>\n<p>\u300c\u30bf\u30fc\u30b2\u30c3\u30c8\u300d\u3068\u306f\u3001\u30d1\u30b1\u30c3\u30c8\u304c\u30eb\u30fc\u30eb\u306e\u4e00\u81f4\u57fa\u6e96\u3092\u6e80\u305f\u3057\u305f\u5834\u5408\u306b\u30c8\u30ea\u30ac\u30fc\u3055\u308c\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u6307\u3057\u307e\u3059\u3002\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u4e00\u822c\u7684\u306b2\u3064\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u306b\u5206\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Terminating targets: Terminating targets perform an action which terminates evaluation within the chain and returns control to the netfilter hook. Depending on the return value provided, the hook might drop the packet or allow the packet to continue to the next stage of processing.<\/li>\n<li>Non-terminating targets: Non-terminating targets perform an action and continue evaluation within the chain. Although each chain must eventually pass back a final terminating decision, any number of non-terminating targets can be executed beforehand.<\/li>\n<\/ul>\n<p>\u5404\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u5229\u7528\u53ef\u80fd\u6027\u306f\u6587\u8108\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30c6\u30fc\u30d6\u30eb\u3084\u30c1\u30a7\u30fc\u30f3\u306e\u7a2e\u985e\u306b\u3088\u3063\u3066\u5229\u7528\u53ef\u80fd\u306a\u30bf\u30fc\u30b2\u30c3\u30c8\u304c\u5236\u7d04\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30eb\u30fc\u30eb\u3067\u6d3b\u6027\u5316\u3055\u308c\u308b\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u3084\u30de\u30c3\u30c1\u30f3\u30b0\u53e5\u3082\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u5229\u7528\u53ef\u80fd\u6027\u306b\u5f71\u97ff\u3092\u53ca\u307c\u3059\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u30c1\u30a7\u30fc\u30f3\u306b\u30b8\u30e3\u30f3\u30d7\u3059\u308b<\/h2>\n<p>\u65e5\u672c\u8a9e\u3067\u306e\u8868\u73fe\u4f8b:<br \/>\n\u300c\u30b8\u30e3\u30f3\u30d7\u30bf\u30fc\u30b2\u30c3\u30c8\u300d\u3068\u3044\u3046\u7279\u5225\u306a\u975e\u7d42\u4e86\u30bf\u30fc\u30b2\u30c3\u30c8\u3082\u5b58\u5728\u3057\u307e\u3059\u3002\u30b8\u30e3\u30f3\u30d7\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u3001\u8a55\u4fa1\u3092\u8ffd\u52a0\u51e6\u7406\u306e\u305f\u3081\u306b\u7570\u306a\u308b\u30c1\u30a7\u30fc\u30f3\u306b\u79fb\u52d5\u3055\u305b\u308b\u884c\u52d5\u3067\u3059\u3002\u79c1\u305f\u3061\u306f\u3001\u305d\u308c\u3089\u3092\u547c\u3073\u51fa\u3059Netfilter\u30d5\u30c3\u30af\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u7d44\u307f\u8fbc\u307f\u30c1\u30a7\u30fc\u30f3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001iptables\u3067\u306f\u7ba1\u7406\u8005\u304c\u81ea\u5206\u81ea\u8eab\u306e\u7d44\u7e54\u7684\u306a\u76ee\u7684\u306e\u305f\u3081\u306b\u72ec\u81ea\u306e\u30c1\u30a7\u30fc\u30f3\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u898f\u5247\u306f\u3001\u7d44\u307f\u8fbc\u307f\u306e\u30c1\u30a7\u30fc\u30f3\u306b\u914d\u7f6e\u3055\u308c\u308b\u306e\u3068\u540c\u3058\u65b9\u6cd5\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u30c1\u30a7\u30fc\u30f3\u306b\u914d\u7f6e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u7570\u306a\u308b\u70b9\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u30c1\u30a7\u30fc\u30f3\u306f\u3001\u30eb\u30fc\u30eb\u304b\u3089\u300c\u30b8\u30e3\u30f3\u30d7\u300d\u3057\u306a\u3051\u308c\u3070\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u3053\u3068\u3067\u3059\uff08\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d5\u30c3\u30af\u306b\u306f\u767b\u9332\u3055\u308c\u307e\u305b\u3093\uff09\u3002<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u30c1\u30a7\u30fc\u30f3\u306f\u3001\u547c\u3073\u51fa\u3057\u305f\u30c1\u30a7\u30fc\u30f3\u306e\u62e1\u5f35\u6a5f\u80fd\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u30c1\u30a7\u30fc\u30f3\u3067\u306f\u3001\u30eb\u30fc\u30eb\u30ea\u30b9\u30c8\u306e\u7d42\u308f\u308a\u306b\u5230\u9054\u3057\u305f\u5834\u5408\u3084\u3001\u30de\u30c3\u30c1\u3059\u308b\u30eb\u30fc\u30eb\u306b\u3088\u3063\u3066\u30a2\u30af\u30c6\u30a3\u30d6\u5316\u3055\u308c\u305fRETURN\u30bf\u30fc\u30b2\u30c3\u30c8\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u8a55\u4fa1\u304c\u547c\u3073\u51fa\u3057\u5143\u306e\u30c1\u30a7\u30fc\u30f3\u306b\u623b\u308a\u307e\u3059\u3002\u8a55\u4fa1\u306f\u3055\u3089\u306b\u3001\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u306e\u30c1\u30a7\u30fc\u30f3\u306b\u30b8\u30e3\u30f3\u30d7\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u69cb\u9020\u306f\u3001\u3088\u308a\u5927\u304d\u306a\u7d44\u7e54\u5316\u3092\u53ef\u80fd\u306b\u3057\u3001\u3088\u308a\u5805\u7262\u306a\u5206\u5c90\u306e\u305f\u3081\u306b\u5fc5\u8981\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h2>IPTables\u3068\u63a5\u7d9a\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0<\/h2>\n<p>\u79c1\u305f\u3061\u306f\u3001RAW\u30c6\u30fc\u30d6\u30eb\u3068\u63a5\u7d9a\u72b6\u614b\u306e\u4e00\u81f4\u57fa\u6e96\u306b\u3064\u3044\u3066\u8b70\u8ad6\u3057\u305f\u969b\u3001netfilter\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u4e0a\u306b\u5b9f\u88c5\u3055\u308c\u305f\u63a5\u7d9a\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u63a5\u7d9a\u8ffd\u8de1\u306b\u3088\u308a\u3001iptables\u306f\u9032\u884c\u4e2d\u306e\u63a5\u7d9a\u306e\u6587\u8108\u3067\u30d1\u30b1\u30c3\u30c8\u306b\u95a2\u3059\u308b\u6c7a\u5b9a\u3092\u4e0b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u63a5\u7d9a\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u306f\u3001iptables\u304c\u300c\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u300d\u306a\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u6a5f\u80fd\u6027\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d1\u30b1\u30c3\u30c8\u304c\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u30b9\u30bf\u30c3\u30af\u306b\u5165\u3063\u305f\u76f4\u5f8c\u306b\u306f\u3001\u63a5\u7d9a\u8ffd\u8de1\u304c\u3059\u3050\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u308b\u524d\u306b\u3001\u30d1\u30b1\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u884c\u308f\u308c\u308b\u306e\u306f\u3001\u751f\u306e\u30c6\u30fc\u30d6\u30eb\u30c1\u30a7\u30fc\u30f3\u3068\u3044\u304f\u3064\u304b\u306e\u30b5\u30cb\u30c6\u30a3\u30c1\u30a7\u30c3\u30af\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u306f\u5404\u30d1\u30b1\u30c3\u30c8\u3092\u65e2\u5b58\u306e\u63a5\u7d9a\u3068\u7167\u5408\u3057\u307e\u3059\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u63a5\u7d9a\u306e\u72b6\u614b\u3092\u66f4\u65b0\u3057\u3001\u65b0\u3057\u3044\u63a5\u7d9a\u3092\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002\u751f\u306e\u30c1\u30a7\u30fc\u30f3\u306e\u3044\u305a\u308c\u304b\u3067NOTRACK\u30bf\u30fc\u30b2\u30c3\u30c8\u304c\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30b1\u30c3\u30c8\u306f\u3001\u63a5\u7d9a\u8ffd\u8de1\u30eb\u30fc\u30c1\u30f3\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u307e\u3059\u3002<\/p>\n<h3>\u5229\u7528\u53ef\u80fd\u306a\u5dde<\/h3>\n<p>\u63a5\u7d9a\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306b\u3088\u3063\u3066\u8ffd\u8de1\u3055\u308c\u305f\u63a5\u7d9a\u306f\u3001\u6b21\u306e\u3044\u305a\u308c\u304b\u306e\u72b6\u614b\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>NEW: When a packet arrives that is not associated with an existing connection, but is not invalid as a first packet, a new connection will be added to the system with this label. This happens for both connection-aware protocols like TCP and for connectionless protocols like UDP.<\/li>\n<li>ESTABLISHED: A connection is changed from NEW to ESTABLISHED when it receives a valid response in the opposite direction. For TCP connections, this means a SYN\/ACK and for UDP and ICMP traffic, this means a response where source and destination of the original packet are switched.<\/li>\n<li>RELATED: Packets that are not part of an existing connection, but are associated with a connection already in the system are labeled RELATED. This could mean a helper connection, as is the case with FTP data transmission connections, or it could be ICMP responses to connection attempts by other protocols.<\/li>\n<li>INVALID: Packets can be marked INVALID if they are not associated with an existing connection and aren\u2019t appropriate for opening a new connection, if they cannot be identified, or if they aren\u2019t routable among other reasons.<\/li>\n<li>UNTRACKED: Packets can be marked as UNTRACKED if they\u2019ve been targeted in a raw table chain to bypass tracking.<\/li>\n<li>SNAT: This is a virtual state set when the source address has been altered by NAT operations. This is used by the connection tracking system so that it knows to change the source addresses back in reply packets.<\/li>\n<li>DNAT: This is a virtual state set when the destination address has been altered by NAT operations. This is used by the connection tracking system so that it knows to change the destination address back when routing reply packets.<\/li>\n<\/ul>\n<p>\u63a5\u7d9a\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u3067\u8ffd\u8de1\u3055\u308c\u308b\u72b6\u614b\u306b\u3088\u308a\u3001\u7ba1\u7406\u8005\u306f\u63a5\u7d9a\u306e\u5bff\u547d\u306b\u304a\u3051\u308b\u7279\u5b9a\u306e\u30dd\u30a4\u30f3\u30c8\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u3088\u308a\u5fb9\u5e95\u7684\u3067\u5b89\u5168\u306a\u30eb\u30fc\u30eb\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u304c\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>Linux\u30b5\u30fc\u30d0\u30fc\u4e0a\u306e\u307b\u3068\u3093\u3069\u306e\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u3001Netfilter\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068iptables\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3092\u57fa\u790e\u3068\u3057\u3066\u3044\u307e\u3059\u3002Netfilter\u30ab\u30fc\u30cd\u30eb\u30d5\u30c3\u30af\u306f\u30cd\u30c3\u30c8\u30ef\u30fc\u30ad\u30f3\u30b0\u30b9\u30bf\u30c3\u30af\u306b\u5341\u5206\u306b\u8fd1\u304f\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u308b\u30d1\u30b1\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u5f37\u529b\u306a\u5236\u5fa1\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002iptables\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u6d3b\u7528\u3057\u3001\u30ab\u30fc\u30cd\u30eb\u306b\u30dd\u30ea\u30b7\u30fc\u8981\u4ef6\u3092\u67d4\u8edf\u304b\u3064\u62e1\u5f35\u53ef\u80fd\u306a\u65b9\u6cd5\u3067\u4f1d\u3048\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8981\u7d20\u304c\u3069\u306e\u3088\u3046\u306b\u7d44\u307f\u5408\u308f\u3055\u308b\u304b\u3092\u5b66\u3076\u3053\u3068\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u3092\u3088\u308a\u52b9\u679c\u7684\u306b\u5236\u5fa1\u3057\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u78ba\u4fdd\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>iptables\u30dd\u30ea\u30b7\u30fc\u306e\u52b9\u679c\u7684\u306a\u9078\u629e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u3063\u3068\u77e5\u308a\u305f\u3044\u5834\u5408\u306f\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u30ac\u30a4\u30c9\u306f\u3001iptables\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u30eb\u30fc\u30eb\u306e\u5b9f\u88c5\u3092\u59cb\u3081\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>How To Set Up a Firewall Using Iptables<\/li>\n<li>Iptables Essentials: Common Firewall Rules and Commands<\/li>\n<li>How To Set Up a Firewall with UFW on Ubuntu 22.04<\/li>\n<li>How To Set Up a Firewall Using firewalld on Rocky Linux 8<\/li>\n<li>How To Set Up an Iptables Firewall to Protect Traffic Between your Servers<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3084\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u30fc\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u91cd\u8981\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002Linux\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001iptables\u304c\u30ab\u30fc\u30cd\u30eb\u306e\u30cd\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u9023\u643a [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/\u300ciptables\u3068netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\" \/>\n<meta property=\"og:description\" content=\"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/\u300ciptables\u3068netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-09T08:54:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T12:19:15+00:00\" \/>\n<meta name=\"author\" content=\"\u590f\u6a39, \u98a8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u590f\u6a39, \u98a8\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"26\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/\",\"name\":\"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-07-09T08:54:00+00:00\",\"dateModified\":\"2025-07-31T12:19:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4e591db2661c4cc425470b461259391d\"},\"description\":\"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4e591db2661c4cc425470b461259391d\",\"name\":\"\u590f\u6a39, \u98a8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/65e0ff40534461b1fa000382dc194e1716f793ab0bcb218ac3c40895551a08c5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/65e0ff40534461b1fa000382dc194e1716f793ab0bcb218ac3c40895551a08c5?s=96&d=mm&r=g\",\"caption\":\"\u590f\u6a39, \u98a8\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/natsukikaze\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d - Blog - Silicon Cloud","description":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/\u300ciptables\u3068netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\/","og_locale":"ja_JP","og_type":"article","og_title":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d","og_description":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/\u300ciptables\u3068netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-07-09T08:54:00+00:00","article_modified_time":"2025-07-31T12:19:15+00:00","author":"\u590f\u6a39, \u98a8","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u590f\u6a39, \u98a8","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"26\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/","name":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-07-09T08:54:00+00:00","dateModified":"2025-07-31T12:19:15+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4e591db2661c4cc425470b461259391d"},"description":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"\u300cIptables\u3068Netfilter\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u8a73\u7d30\u306a\u89e3\u8aac\u300d"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4e591db2661c4cc425470b461259391d","name":"\u590f\u6a39, \u98a8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/65e0ff40534461b1fa000382dc194e1716f793ab0bcb218ac3c40895551a08c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/65e0ff40534461b1fa000382dc194e1716f793ab0bcb218ac3c40895551a08c5?s=96&d=mm&r=g","caption":"\u590f\u6a39, \u98a8"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/natsukikaze\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/%e3%80%8ciptables%e3%81%a8netfilter%e3%82%a2%e3%83%bc%e3%82%ad%e3%83%86%e3%82%af%e3%83%81%e3%83%a3%e3%81%ae%e8%a9%b3%e7%b4%b0%e3%81%aa%e8%a7%a3%e8%aa%ac%e3%80%8d\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":37200,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions\/37200"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}