{"id":140,"date":"2021-07-30T18:17:22","date_gmt":"2021-07-30T09:17:22","guid":{"rendered":"https:\/\/ubuntu.auctionpro.co.kr\/?page_id=140"},"modified":"2021-10-28T10:48:36","modified_gmt":"2021-10-28T01:48:36","slug":"ufw-%eb%b0%a9%ed%99%94%eb%b2%bd-%ed%8a%b9%ec%a0%95-ip-%eb%a7%89%ea%b8%b0","status":"publish","type":"page","link":"https:\/\/ubuntu.auctionpro.co.kr\/?page_id=140","title":{"rendered":"ufw \ubc29\ud654\ubcbd \ud2b9\uc815 IP \ub9c9\uae30"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\ud30c\uc77c \uc704\uce58 <\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" >vi \/etc\/ufw\/before.rules<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">IP Drop \uc904 \ucd94\uac00 <\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \">-A ufw-before-input -s 192.168.123.123 -j DROP<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Sample<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" title=\"vi \/etc\/ufw\/before.rules\"> vi \/etc\/ufw\/before.rules\n#\n# rules.before\n#\n# Rules that should be run before the ufw command line added rules. Custom\n# rules should be added to one of these chains:\n#   ufw-before-input\n#   ufw-before-output\n#   ufw-before-forward\n#\n\n# Don't delete these required lines, otherwise there will be errors\n*filter\n:ufw-before-input - [0:0]\n:ufw-before-output - [0:0]\n:ufw-before-forward - [0:0]\n:ufw-not-local - [0:0]\n# End required lines\n\n#-A ufw-before-input -s 51.89.207.245  -j DROP\n#-A ufw-before-input -s 196.245.149.0\/24  -j DROP\n#-A ufw-before-input -s 50.3.88.0\/24  -j DROP\n#-A ufw-before-input -s 165.231.133.0\/24  -j DROP\n#-A ufw-before-input -s 104.160.17.0\/24  -j DROP\n#-A ufw-before-input -s 5.180.244.0\/24  -j DROP\n#-A ufw-before-input -s 185.96.162.0\/24  -j DROP\n#-A ufw-before-input -s 86.67.107.0\/24  -j DROP\n#-A ufw-before-input -s 20.62.9.0\/24 -j DROP\n#-A ufw-before-input -s 51.195.188.0\/24 -j DROP\n#-A ufw-before-input -s 23.102.134.0\/24 -j DROP\n#-A ufw-before-input -s 35.160.210.0\/24 -j DROP\n#-A ufw-before-input -s 20.73.1.0\/24 -j DROP\n#-A ufw-before-input -s 35.160.210.230 -j DROP\n#-A ufw-before-input -s 40.74.246.0\/24 -j DROP\n#-A ufw-before-input -s 78.96.191.0\/24 -j DROP\n#-A ufw-before-input -s 188.40.240.200 -j DROP\n#-A ufw-before-input -s 181.197.0.0\/16 -j DROP\n#-A ufw-before-input -s 51.81.111.0\/24 -j DROP\n#-A ufw-before-input -s 79.252.15.177 -j DROP\n#-A ufw-before-input -s 142.54.177.3  -j DROP\n#-A ufw-before-input -s 194.163.154.7 -j DROP\n#-A ufw-before-input -s 173.208.244.90 -j DROP\n#-A ufw-before-input -s 69.30.0.0\/16 -j DROP\n#-A ufw-before-input -s 107.150.0.0\/16 -j DROP\n#-A ufw-before-input -s 192.151.145.142 -j DROP\n#-A ufw-before-input -s 198.204.0.0\/16 -j DROP\n#-A ufw-before-input -s 20.185.0.0\/16  -j DROP\n#-A ufw-before-input -s 78.47.0.0\/16  -j DROP\n#-A ufw-before-input -s 45.145.166.0\/24 -j DROP\n-A ufw-before-input -s 20.115.42.0\/24 -j DROP\n-A ufw-before-input -s 194.127.179.0\/24 -j DROP\n\n# allow all on loopback:\n-A ufw-before-input -i lo -j ACCEPT\n-A ufw-before-output -o lo -j ACCEPT\n\n# quickly process packets for which we already have a connection\n-A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n-A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT\n\n# drop INVALID packets (logs these in loglevel medium and higher)\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Save and ufw reload<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" title=\"ufw reload\" >wq!\n\nufw reload<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ud30c\uc77c \uc704\uce58 IP Drop \uc904 \ucd94\uac00 Sample Save and ufw reload<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-140","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=140"}],"version-history":[{"count":5,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/140\/revisions"}],"predecessor-version":[{"id":255,"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/140\/revisions\/255"}],"wp:attachment":[{"href":"https:\/\/ubuntu.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}