{"id":3727,"date":"2026-01-06T15:29:09","date_gmt":"2026-01-06T06:29:09","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=3727"},"modified":"2026-01-06T18:48:13","modified_gmt":"2026-01-06T09:48:13","slug":"linuxufwufw-ufw-howtouseufw","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2026\/01\/06\/linuxufwufw-ufw-howtouseufw\/","title":{"rendered":"[Linux,Xubuntu]UFW\ubc29\ud654\ubcbd \uc0ac\uc6a9\ubc29\ubc95 \/ How to use UFW firewall"},"content":{"rendered":"\n<p>\ud83d\udc49\ud83c\udffb UFW(Uncomplicated Firewall)\ub294 \ub370\ube44\uc548 \ubc0f \uc6b0\ubd84\ud22c \uacc4\uc5f4 \ub9ac\ub205\uc2a4\uc5d0\uc11c \ubc29\ud654\ubcbd\uc744 \uc27d\uac8c \uc124\uc815\ud558\uae30 \uc704\ud574 \uac1c\ubc1c\ub41c \ub3c4\uad6c\uc785\ub2c8\ub2e4.<br>UFW (Uncomplicated Firewall) is a tool developed to easily set up a firewall in Debian and Ubuntu-based Linux distributions.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \uc124\uc815\uc5d0 \ucc38\uace0 \ud558\uc2dc\uba74 \ub429\ub2c8\ub2e4.<br>Please refer to the firewall settings.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \ud65c\uc131\ud654 ,\ube44\ud65c\uc131\ud654<br>Enable,disable firewall<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw enable\nsudo ufw disable<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \uc124\uc815 \uc0c1\ud0dc \ud655\uc778<br>View firewall settings status<\/p>\n\n\n\n<p>\u2714\ufe0f sudo ufw status<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>22\/tcp                     ALLOW       Anywhere                  \n443                        ALLOW       Anywhere                  \n3000                       ALLOW       Anywhere                                   \n80\/tcp                     ALLOW       Anywhere                  \n443\/tcp                    ALLOW       Anywhere   <\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \uae30\ubcf8\uc815\ucc45\uc124\uc815<br>Firewall basic policy settings<\/p>\n\n\n\n<p>\u2714\ufe0f \uae30\ubcf8\uc801\uc73c\ub85c \ub4e4\uc5b4\uc624\ub294 \ubaa8\ub4e0 \uc5f0\uacb0\uc740 \ucc28\ub2e8\ud558\uace0, \ub098\uac00\ub294 \uc5f0\uacb0\uc740 \ud5c8\uc6a9\ud558\uae30<br>Basically, block all incoming connections and allow outgoing connections.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw default deny incoming\n\nsudo ufw default allow outgoing<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb IP\uc8fc\uc18c\uae30\ubc18 \uc81c\uc5b4<br>IP address-based control<\/p>\n\n\n\n<p>\u2714\ufe0f allow\ub294 \ud5c8\uc6a9 deny\ub294 \ucc28\ub2e8<br>Allow allows, deny blocks<\/p>\n\n\n\n<p>\u2714\ufe0f \ud2b9\uc815 \uc544\uc774\ud53c \uc8fc\uc18c \uc811\uadfc \ud5c8\uc6a9\ud558\uae30<br>Allow access from specific IP addresses<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow from 192.168.1.10<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f \ud2b9\uc815 \uc544\uc774\ud53c\uac00 \ud2b9\uc815 \ud3ec\ud2b8\uc5d0 \uc811\uadfc\ud558\ub294 \uac83\uc744 \ud5c8\uc6a9<br>Allow specific IPs to access specific ports<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow from 192.168.1.10 to any port<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ud3ec\ud2b8\ub098 \uc11c\ube44\uc2a4 \ud5c8\uc6a9 \ubc0f \ucc28\ub2e8<br>Allowing and blocking ports and services<\/p>\n\n\n\n<p>\u2714\ufe0f http\ud3ec\ud2b8 \ud5c8\uc6a9 \ubc0f \ucc28\ub2e8<br>Allow and block http ports<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow 80 # allow http\n\nsudo ufw deny 80 # deny http<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \uaddc\uce59 \uc0ad\uc81c \ubc0f \ucd08\uae30\ud654<br>Delete and reset rules<\/p>\n\n\n\n<p>\u2714\ufe0f \ubc29\ud654\ubcbd \uc124\uc815\uc744 \ubc88\ud638\ub85c \ubcf4\uae30<br>View firewall settings by number<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw status numbered<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f \ubc29\ud654\ubcbd \uc124\uc815 \uc0ad\uc81c<br>Delete firewall settings<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw delete &#91;rule number]<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f \ud3ec\ud2b8\ubc88\ud638\ub85c \uc0ad\uc81c<br>Delete by port number<\/p>\n\n\n\n<p>&#8212; \ud5c8\uc6a9 \uc124\uc815\ub41c \uaddc\uce59 \uc0ad\uc81c<br>Delete a rule that is set to allow<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw delete allow &#91;port number]<\/code><\/pre>\n\n\n\n<p>&#8212; \ucc28\ub2e8 \uc124\uc815\ub41c \uaddc\uce59 \uc0ad\uc81c<br>Delete a blocked rule<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw delete deny &#91;port number]<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \ucd08\uae30\ud654<br>Reset firewall<\/p>\n\n\n\n<p>\u2714\ufe0f \ubaa8\ub4e0\uc124\uc815\uc774 \ucd08\uae30\ud654 \ub418\uace0 \ubc29\ud654\ubcbd\uc774 \ube44\ud65c\uc131\ud654 \ub428.<br>All settings will be reset and the firewall will be disabled.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw reset<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udc49\ud83c\udffb UFW(Uncomplicated Firewall)\ub294 \ub370\ube44\uc548 \ubc0f \uc6b0\ubd84\ud22c \uacc4\uc5f4 \ub9ac\ub205\uc2a4\uc5d0\uc11c \ubc29\ud654\ubcbd\uc744 \uc27d\uac8c \uc124\uc815\ud558\uae30 \uc704\ud574 \uac1c\ubc1c\ub41c \ub3c4\uad6c\uc785\ub2c8\ub2e4.UFW (Uncomplicated Firewall) is a tool developed to easily set up a firewall in Debian and Ubuntu-based Linux distributions. \ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \uc124\uc815\uc5d0 \ucc38\uace0 \ud558\uc2dc\uba74 \ub429\ub2c8\ub2e4.Please refer to the firewall settings. \ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \ud65c\uc131\ud654 ,\ube44\ud65c\uc131\ud654Enable,disable firewall \ud83d\udc49\ud83c\udffb \ubc29\ud654\ubcbd \uc124\uc815 \uc0c1\ud0dc \ud655\uc778View firewall settings [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-3727","post","type-post","status-publish","format-standard","hentry","category-linux","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/3727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=3727"}],"version-history":[{"count":31,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/3727\/revisions"}],"predecessor-version":[{"id":3760,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/3727\/revisions\/3760"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=3727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=3727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=3727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}