{"id":4251,"date":"2023-03-21T17:30:01","date_gmt":"2023-03-21T17:30:01","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=4251"},"modified":"2023-03-21T17:30:03","modified_gmt":"2023-03-21T17:30:03","slug":"firewall-ufw-a-beginners-guide-tutorial","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/","title":{"rendered":"Firewall UFW : A beginner&#8217;s Guide"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1.jpg\" alt=\"UFW essentials: managing Linux firewall \nubuntu debian tutorial\" class=\"wp-image-4286\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>If you&#8217;re new to Linux, you might have heard of UFW or Uncomplicated Firewall. As the name suggests, UFW is a simple and user-friendly tool that allows you to manage your Linux firewall.<\/p>\n\n\n\n<p>In this article, we&#8217;ll go over some UFW essentials and explanations to help you get started.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-is-a-firewall\">What is a Firewall?<\/h3>\n\n\n\n<p>A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between your computer or network and the internet or other networks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-use-ufw\">Why Use UFW?<\/h3>\n\n\n\n<p>UFW is a front-end to the <code>iptables <\/code>firewall that comes pre-installed on most Linux distributions. It simplifies the process of managing the firewall by providing a user-friendly command-line interface.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ufw-essentials\">UFW Essentials<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installation\">Installation<\/h3>\n\n\n\n<p>UFW is pre-installed on most Linux distributions. However, if it&#8217;s not installed on your system, you can install it using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt-get install ufw<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"basic-syntax\">Basic Syntax<\/h3>\n\n\n\n<p>The basic syntax of UFW is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw [option] [allow\/deny] [port\/protocol]<\/code><\/pre>\n\n\n\n<p>Here&#8217;s a breakdown of the syntax:<\/p>\n\n\n\n<ul>\n<li><code>sudo<\/code> &#8211; allows you to run the command with root privileges<\/li>\n\n\n\n<li><code>ufw<\/code> &#8211; the UFW command<\/li>\n\n\n\n<li><code>[option]<\/code> &#8211; additional options such as enable, disable, status, reset, reload<\/li>\n\n\n\n<li><code>[allow\/deny]<\/code> &#8211; whether to allow or deny the traffic<\/li>\n\n\n\n<li><code>[port\/protocol]<\/code> &#8211; the port number and\/or protocol to be allowed or denied<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"checking-the-status\">Checking the Status<\/h3>\n\n\n\n<p>To check the status of UFW, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw status<\/code><\/pre>\n\n\n\n<p>This will show you the current status of UFW and the rules that are currently in effect.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"enabling-and-disabling-ufw\">Enabling and Disabling UFW<\/h3>\n\n\n\n<p>To enable UFW, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw enable<\/code><\/pre>\n\n\n\n<p>To disable UFW, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw disable<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"default-policies\">Default Policies<\/h3>\n\n\n\n<p>When you enable UFW, the default policies are set to deny all incoming traffic and allow all outgoing traffic. You can change the default policies using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw default allow [incoming\/outgoing]\n$ sudo ufw default deny [incoming\/outgoing]<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"allowing-and-denying-traffic\">Allowing and Denying Traffic<\/h3>\n\n\n\n<p>To allow traffic to a specific port, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw allow [port\/protocol]<\/code><\/pre>\n\n\n\n<p>To deny traffic to a specific port, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw deny [port\/protocol]<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"block-an-ip-address\">Block an IP Address<\/h3>\n\n\n\n<p>To block all network connections that originate from a specific IP address, run the following command, replacing the highlighted IP address with the IP address that you want to block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw deny from 192.168.10.224<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputRule added<\/code><\/pre>\n\n\n\n<p>In this example,&nbsp;<code>from 192.168.10.224<\/code>&nbsp;specifies a&nbsp;<strong>source<\/strong>&nbsp;IP address of \u201c192.168.10.224\u201d.<\/p>\n\n\n\n<p>If you run&nbsp;<code>sudo ufw status<\/code>&nbsp;now, you\u2019ll see the specified IP address listed as denied:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputStatus: active\n\nTo                         Action      From\n--                         ------      ----\nAnywhere                   DENY        192.168.10.224<\/code><\/pre>\n\n\n\n<p>All connections, coming in or going out, are blocked for the specified IP address.<\/p>\n\n\n\n<p>You can also Block connections from a whole subnet by providing the corresponding subnet mask for a host, such as&nbsp;<code>192.168.10.0\/24<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"allow-an-ip-address\">Allow an IP Address<\/h3>\n\n\n\n<p>To allow all network connections that originate from a specific IP address, run the following command, replacing the highlighted IP address with the IP address that you want to allow access:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw allow from 192.168.10.224<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputRule added<\/code><\/pre>\n\n\n\n<p>If you run&nbsp;<code>sudo ufw status<\/code>&nbsp;now, you\u2019ll see output similar to this, showing the word&nbsp;<code>ALLOW<\/code>&nbsp;next to the IP address you just added.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputStatus: active\n\nTo                         Action      From\n--                         ------      ----\n...\nAnywhere                   ALLOW       192.168.10.224<\/code><\/pre>\n\n\n\n<p>You can also allow connections from a whole subnet by providing the corresponding subnet mask for a host, such as&nbsp;<code>192.168.10.0\/24<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"delete-ufw-rule\">Delete UFW Rule<\/h3>\n\n\n\n<p>To delete a rule that you previously set up within UFW, use&nbsp;<code>ufw delete<\/code>&nbsp;followed by the rule (<code>allow<\/code>&nbsp;or&nbsp;<code>deny<\/code>) and the target specification. The following example would delete a rule previously set to allow all connections from an IP address of&nbsp;<code>192.168.10.224<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw delete allow from 192.168.10.224<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputRule deleted<\/code><\/pre>\n\n\n\n<p>Another way to specify which rule you want to delete is by providing the rule ID. This information can be obtained with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw status numbered<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputStatus: active\n\n     To                         Action      From\n     --                         ------      ----\n[1] Anywhere                   DENY IN     192.168.10.220\n[2] Anywhere on eth0           ALLOW IN    192.168.10.222<\/code><\/pre>\n\n\n\n<p>From the output, you can see that there are two active rules. The first rule, with highlighted values, denies all connections coming from the IP address&nbsp;<code>192.168.10.220<\/code>. The second rule allows connections on the&nbsp;<code>eth0<\/code>&nbsp;interface coming in from the IP address&nbsp;<code>192.168.10.222<\/code>.<\/p>\n\n\n\n<p>Because by default UFW already blocks all external access unless explicitly allowed, the first rule is redundant, so you can remove it. To delete a rule by its ID, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw delete 1<\/code><\/pre>\n\n\n\n<p>You will be prompted to confirm the operation and to make sure the ID you\u2019re providing refers to the correct rule you want to delete.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputDeleting:\n deny from 192.168.10.220\nProceed with operation (y|n)? y\nRule deleted<\/code><\/pre>\n\n\n\n<p>If you list your rules again with&nbsp;<code>sudo ufw status<\/code>, you\u2019ll see that the rule was removed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"list-available-application-profiles\">List Available Application Profiles<\/h3>\n\n\n\n<p>Upon installation, applications that rely on network communications will typically set up a UFW profile that you can use to allow connection from external addresses. This is often the same as running&nbsp;<code>ufw allow from<\/code>, with the advantage of providing a shortcut that abstracts the specific port numbers a service uses and provides a user-friendly nomenclature to referenced services.<\/p>\n\n\n\n<p>To list which profiles are currently available, run the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw app list<\/code><\/pre>\n\n\n\n<p>If you installed a service such as a web server or other network-dependent software and a profile was not made available within UFW, first make sure the service is enabled. For remote servers, you\u2019ll typically have OpenSSH readily available:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputAvailable applications:\n  OpenSSH<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"allow-all-incoming-httphttps-port-443--80\">Allow All Incoming HTTP\/HTTPS (port&nbsp;<code>443<\/code>&nbsp;\/&nbsp;<code>80<\/code>)<\/h3>\n\n\n\n<p>Web servers, such as Apache and Nginx, typically listen for HTTP requests on port&nbsp;<code>80<\/code>.<\/p>\n\n\n\n<p>HTTPS typically runs on port&nbsp;<code>443<\/code>. If your default policy for incoming traffic is set to drop or deny, you\u2019ll need to create a UFW rule to allow external access on port&nbsp;<code>443<\/code>. You can use either the port number or the service name (<code>https<\/code>) as a parameter to this command.<\/p>\n\n\n\n<p>To allow all incoming HTTPS and HTTP (port&nbsp;<code>443<\/code>&nbsp;\/&nbsp;<code>80<\/code>) connections, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw allow https,http<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">OutputRule added\nRule added (v6)<\/code><\/pre>\n\n\n\n<p>An alternative syntax is to specify the port number of the HTTPS service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo ufw allow 443,80<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>UFW is a powerful and easy-to-use tool that allows you to manage your Linux firewall. With the UFW essentials and explanations provided in this article, you should now have a good understanding of how to get started with UFW.<\/p>\n\n\n\n<p>Remember to always be cautious when configuring your firewall, and only allow traffic that is necessary for your system to function properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re new to Linux, you might have heard of UFW or Uncomplicated Firewall. As the name suggests, UFW is a simple and user-friendly tool that allows you to manage your Linux firewall. In this article, we&#8217;ll go over some UFW essentials and explanations to help you get started. What is a Firewall? A firewall ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[69,3],"tags":[],"yoast_head":"\n<title>Firewall UFW : A beginner&#039;s Guide - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"In this beginner&#039;s guide, learn about UFW firewall and how to manage your Linux firewall with Uncomplicated Firewall. Discover basic syntax, enabling and disabling UFW, default policies, allowing and denying traffic, and more. Start securing your system today!\" \/>\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.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Firewall UFW : A beginner&#039;s Guide - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"In this beginner&#039;s guide, learn about UFW firewall and how to manage your Linux firewall with Uncomplicated Firewall. Discover basic syntax, enabling and disabling UFW, default policies, allowing and denying traffic, and more. Start securing your system today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-21T17:30:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-21T17:30:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"Firewall UFW : A beginner&#8217;s Guide\",\"datePublished\":\"2023-03-21T17:30:01+00:00\",\"dateModified\":\"2023-03-21T17:30:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\"},\"wordCount\":959,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"Linux system administration\",\"Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\",\"name\":\"Firewall UFW : A beginner's Guide - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2023-03-21T17:30:01+00:00\",\"dateModified\":\"2023-03-21T17:30:03+00:00\",\"description\":\"In this beginner's guide, learn about UFW firewall and how to manage your Linux firewall with Uncomplicated Firewall. Discover basic syntax, enabling and disabling UFW, default policies, allowing and denying traffic, and more. Start securing your system today!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Firewall UFW : A beginner&#8217;s Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"Firewall UFW : A beginner's Guide - WebHi Tutorials &amp; Documentations","description":"In this beginner's guide, learn about UFW firewall and how to manage your Linux firewall with Uncomplicated Firewall. Discover basic syntax, enabling and disabling UFW, default policies, allowing and denying traffic, and more. Start securing your system today!","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.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Firewall UFW : A beginner's Guide - WebHi Tutorials &amp; Documentations","og_description":"In this beginner's guide, learn about UFW firewall and how to manage your Linux firewall with Uncomplicated Firewall. Discover basic syntax, enabling and disabling UFW, default policies, allowing and denying traffic, and more. Start securing your system today!","og_url":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2023-03-21T17:30:01+00:00","article_modified_time":"2023-03-21T17:30:03+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/03\/ufw_ubuntu_en-1.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"Firewall UFW : A beginner&#8217;s Guide","datePublished":"2023-03-21T17:30:01+00:00","dateModified":"2023-03-21T17:30:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/"},"wordCount":959,"commentCount":2,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["Linux system administration","Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/","url":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/","name":"Firewall UFW : A beginner's Guide - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2023-03-21T17:30:01+00:00","dateModified":"2023-03-21T17:30:03+00:00","description":"In this beginner's guide, learn about UFW firewall and how to manage your Linux firewall with Uncomplicated Firewall. Discover basic syntax, enabling and disabling UFW, default policies, allowing and denying traffic, and more. Start securing your system today!","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/firewall-ufw-a-beginners-guide-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"Firewall UFW : A beginner&#8217;s Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1782424353","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/4251"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=4251"}],"version-history":[{"count":12,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/4251\/revisions"}],"predecessor-version":[{"id":4304,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/4251\/revisions\/4304"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=4251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=4251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=4251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}