{"id":2238,"date":"2025-01-15T12:30:00","date_gmt":"2025-01-15T18:30:00","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=2238"},"modified":"2024-12-10T04:57:24","modified_gmt":"2024-12-10T10:57:24","slug":"how-to-install-ufw-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/","title":{"rendered":"How to Install UFW on Ubuntu 24.04"},"content":{"rendered":"\n<div id=\"linux-199723640\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>This post will explain how to install the UFW on Ubuntu 24.04 OS. UFW (Uncomplicated Firewall) is an interface for iptables for configuring a firewall. The UFW firewall is way easier than the iptables for securing the server. It is used daily by system administrators, developers, and other familiar Linux users. The most important thing about the UFW firewall is that it protects the server from unauthorized access.<\/p>\n\n\n\n<p>In the next paragraph, we will cover the installation of the UFW firewall, along with real examples. Let&#8217;s get started!<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <a href=\"https:\/\/www.linuxcloudvps.com\/cloud-vps.html\" target=\"_blank\" rel=\"noreferrer noopener\">server running Ubuntu 24.04<\/a> or any Linux OS<\/li>\n\n\n\n<li>User privileges: root or non-root user with sudo privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1. Update the System<\/h2>\n\n\n\n<p>Before we start with the installation of configuring the UFW Firewall, we will update the system packages to their latest versions available:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update -y &amp;&amp; sudo apt upgrade -y<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2. Install UFW Firewall<\/h2>\n\n\n\n<p>Before we start with installation we can execute the following command to check the status of the UFW service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ufw status<\/pre>\n\n\n\n<p>If there is no UFW service and installation you will get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# ufw status\nCommand 'ufw' not found, but can be installed with:\nsnap install ufw  # version 0.36.2, or\napt  install ufw  # version 0.36.2-1\nSee 'snap info ufw' for additional versions.\n<\/pre>\n\n\n\n<p>To install the UFW Ubuntu-based firewall execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install ufw -y<\/pre>\n\n\n\n<p>Once the installation is complete, start and enable the service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start ufw &amp;&amp; sudo systemctl enable ufw<\/pre>\n\n\n\n<p>To check the status of the service execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl status ufw<\/pre>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo systemctl status ufw\n\u25cf ufw.service - Uncomplicated firewall\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/ufw.service; enabled; preset: enabled)\n     Active: active (exited) since Mon 2024-12-09 15:14:20 CST; 2min 0s ago\n       Docs: man:ufw(8)\n   Main PID: 15314 (code=exited, status=0\/SUCCESS)\n        CPU: 3ms\n\nDec 09 15:14:20 host.test.vps systemd[1]: Starting ufw.service - Uncomplicated firewall...\nDec 09 15:14:20 host.test.vps systemd[1]: Finished ufw.service - Uncomplicated firewall.\n<\/pre>\n\n\n\n<p>Now you can execute the following command again:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ufw status<\/pre>\n\n\n\n<p>By default the UFW is not enabled so you will receive the output below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# ufw status\nStatus: inactive\n<\/pre>\n\n\n\n<p>In the next paragraphs, we will show you how to enable it and add some rules.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3. Configure UFW Firewall<\/h2>\n\n\n\n<p>This is the most important step of this blog post. As we said previously UFW service is disabled by default. If you enable it now, without any rules you will <strong>not be able to connect to your server via SSH<\/strong>. In other words, you will be kicked out of your server and will be locked. So the first step is to allow the SSH connections:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow OpenSSH &amp;&amp; sudo ufw allow ssh<\/pre>\n\n\n\n<p>You will get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw allow OpenSSH &amp;&amp; sudo ufw allow ssh\nRules updated\nRules updated (v6)\nRules updated\nRules updated (v6)\n<\/pre>\n\n\n\n<p>Next is to allow the SSH port number. To do that execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow 22<\/pre>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw allow 22\nRules updated\nRules updated (v6)\n<\/pre>\n\n\n\n<p>Now, when the SSH access is enabled we can proceed with configuring some other important rules. The next is to allow the default UFW incoming policy to deny:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw default deny incoming<\/pre>\n\n\n\n<p>You will get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw default deny incoming\nDefault incoming policy changed to <strong>'deny'<\/strong>\n(be sure to update your rules accordingly\n<\/pre>\n\n\n\n<p>To set the default UFW outgoing policy to allow, run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw default allow outgoing<\/pre>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw default allow outgoing\nDefault outgoing policy changed to <strong>'allow'<\/strong>\n(be sure to update your rules accordingly)\n<\/pre>\n\n\n\n<p>In the next paragraph, we will show you how to Enable UFW.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4. Enable UFW Firewall<\/h2>\n\n\n\n<p>First, we will check the rules we added before to be sure before enabling the UFW:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw show added\n<\/pre>\n\n\n\n<p>You will get output similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw show added\nAdded user rules (see 'ufw status' for running firewall):\nufw allow OpenSSH\nufw allow 22\/tcp\nufw allow 22\n<\/pre>\n\n\n\n<p>After confirming everything is OK, and the SSH connections are opened we can enable the UFW firewall securely:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw enable<\/pre>\n\n\n\n<p>There will be a warning about the SSH connections, but we already configured it to accept those connections. So we can proceed with enabling by hitting the <strong>y<\/strong> button:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw enable\nCommand may disrupt existing ssh connections. Proceed with operation (y|n)? <strong>y<\/strong><\/pre>\n\n\n\n<p>Once, you confirm this you will get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Firewall is active and enabled on system startup\n<\/pre>\n\n\n\n<p>Now, you can check the status of the UFW Firewall again:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ufw status<\/pre>\n\n\n\n<p>If the UFW Firewall is enabled, you will get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# ufw status<br>Status: active<br><br>To                         Action      From<br>--                         ------      ----<br>OpenSSH                    ALLOW       Anywhere                  <br>22\/tcp                     ALLOW       Anywhere                  <br>OpenSSH (v6)               ALLOW       Anywhere (v6)             <br>22\/tcp (v6)                ALLOW       Anywhere (v6)<br><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Allow Specific IP addresses<\/h2>\n\n\n\n<p>These paragraphs are not listed with numbers since it is not necessary to enable these rules ordinarily. The first four steps were important to not get locked out of the server. Even if you are locked out of the server, you can always contact your hosting company to disable the rule. However, let&#8217;s proceed with allowing some specific IP address. To do that execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow from 162.246.254.3<\/pre>\n\n\n\n<p>The output is the same one:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Output\nRule added<\/pre>\n\n\n\n<p>To specify a port that the IP address is allowed to connect to we need to add the following rule:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow from 162.246.254.3 to any port 22<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Allow Specific port ranges<\/h2>\n\n\n\n<p>To specify the range of porst in UFW Firewall execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow 8069:8089\/tcp\n\nsudo ufw allow 8069:8089\/udp\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Allowing Other Connections<\/h2>\n\n\n\n<p>To allow HTTP and HTTPS via Apache or Nginx web servers execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow \u2018Apache Full\u2019\n\nsudo ufw allow \u2018Nginx Full\u2019\n<\/pre>\n\n\n\n<p>If you want to enable only HTTP or HTTPS you can use the following rules respectively:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow http<\/pre>\n\n\n\n<p>And for HTTPS<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw allow https<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Denying Connections<\/h2>\n\n\n\n<p>For example, to deny the newly added rules about HTTP and HTTPS, you can execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">udo ufw deny http<\/pre>\n\n\n\n<p>And to deny the HTTPS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw deny https\n<\/pre>\n\n\n\n<p>To deny from a specific IP address:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw deny from 162.246.254.3<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Deleting Rules<\/h2>\n\n\n\n<p>To delete some rule, we have to know the rule number or to delete the rule by the name. Deleting the rule with a number is easier. First, we need to check the numbers for all the rules we added before:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw status numbered<\/pre>\n\n\n\n<p>With rules, we added before we got this output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw status numbered<br>Status: active<br><br>     To                         Action      From<br>     --                         ------      ----<br>[ 1] OpenSSH                    ALLOW IN    Anywhere                  <br>[ 2] 22\/tcp                     ALLOW IN    Anywhere                  <br>[ 3] 22                       ALLOW IN    Anywhere                  <br>[ 4] 22                       ALLOW IN    162.246.254.3             <br>[ 5] 8069:8089\/tcp              ALLOW IN    Anywhere                  <br>[ 6] 8069:8089\/udp              ALLOW IN    Anywhere                  <br>[ 7] OpenSSH (v6)               ALLOW IN    Anywhere (v6)             <br>[ 8] 22\/tcp (v6)                ALLOW IN    Anywhere (v6)             <br>[ 9] 22 (v6)                  ALLOW IN    Anywhere (v6)<br><\/pre>\n\n\n\n<p>To remove rule number four about the Specific IP address from Anywhere execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw delete 4<\/pre>\n\n\n\n<p>There will be a warning about proceeding with the operation. We should type <strong>y<\/strong> and hit Enter:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@host:~# sudo ufw delete 4\nDeleting:\n allow from 162.246.254.3\nProceed with operation (y|n)? y\nRule deleted\n<\/pre>\n\n\n\n<p>To delete rule number five, by the Rule Name we used before we need to execute the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo ufw delete allow \"8069:8089\/tcp\"<\/pre>\n\n\n\n<p>The final list with the added and deleted rules should look like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[ 1] OpenSSH                    ALLOW IN    Anywhere                  <br>[ 2] 22\/tcp                     ALLOW IN    Anywhere                  <br>[ 3] 22                       ALLOW IN    Anywhere                  <br>[ 4] 22                       ALLOW IN    162.246.254.3             <br>[ 5] 8069:8089\/udp              ALLOW IN    Anywhere                  <br>[ 6] OpenSSH (v6)               ALLOW IN    Anywhere (v6)             <br>[ 7] 22\/tcp (v6)                ALLOW IN    Anywhere (v6)             <br>[ 8] 22 (v6)                  ALLOW IN    Anywhere (v6)<br><\/pre>\n\n\n\n<p>That&#8217;s it! You have learned how to configure and install UFW Ubuntu-based firewalls.<\/p>\n\n\n\n<p>If you have difficulties with the UFW Firewall our Linux admins will help you with any aspect. You must sign up for one of our <a href=\"https:\/\/linuxhostsupport.com\/monthly-server-management.html\" target=\"_blank\" rel=\"noreferrer noopener\">monthly management<\/a> or <a href=\"https:\/\/linuxhostsupport.com\/per-incident-support.html\" target=\"_blank\" rel=\"noreferrer noopener\">per-incident server support<\/a> plans. Do not hesitate to contact us anytime you want. We are available 24\/7.<\/p>\n\n\n\n<p> If you liked this post about installing the UFW Firewall on Ubuntu 24.04 OS, please share it with your friends on social networks using the buttons on the left or leave a reply below. Thanks.<\/p><div id=\"linux-1212209427\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This post will explain how to install the UFW on Ubuntu 24.04 OS. UFW (Uncomplicated Firewall) is an interface for iptables for configuring a firewall. The UFW firewall is way easier than the iptables for securing the server. It is used daily by system administrators, developers, and other familiar Linux users. The most important thing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2245,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182],"tags":[199,270,297],"class_list":["post-2238","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-how-to-install","tag-ubuntu-24-04","tag-ufw-firewall"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install UFW Ubuntu 24.04 | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"Learn how to install UFW Firewall on Ubuntu 24.04, or get one of our support plans and have our Linux sysadmins take care of it for you.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install UFW Ubuntu 24.04 | LinuxHostSupport\" \/>\n<meta property=\"og:description\" content=\"Learn how to install UFW Firewall on Ubuntu 24.04, or get one of our support plans and have our Linux sysadmins take care of it for you.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-15T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"How to Install UFW on Ubuntu 24.04\",\"datePublished\":\"2025-01-15T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\"},\"wordCount\":908,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp\",\"keywords\":[\"how to install\",\"ubuntu 24.04\",\"UFW firewall\"],\"articleSection\":[\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\",\"name\":\"How to Install UFW Ubuntu 24.04 | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp\",\"datePublished\":\"2025-01-15T18:30:00+00:00\",\"author\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"Learn how to install UFW Firewall on Ubuntu 24.04, or get one of our support plans and have our Linux sysadmins take care of it for you.\",\"breadcrumb\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp\",\"contentUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp\",\"width\":742,\"height\":410,\"caption\":\"How to Install UFW Ubuntu 24.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/linuxhostsupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install UFW on Ubuntu 24.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install UFW Ubuntu 24.04 | LinuxHostSupport","description":"Learn how to install UFW Firewall on Ubuntu 24.04, or get one of our support plans and have our Linux sysadmins take care of it for you.","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:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install UFW Ubuntu 24.04 | LinuxHostSupport","og_description":"Learn how to install UFW Firewall on Ubuntu 24.04, or get one of our support plans and have our Linux sysadmins take care of it for you.","og_url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2025-01-15T18:30:00+00:00","og_image":[{"width":742,"height":410,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"How to Install UFW on Ubuntu 24.04","datePublished":"2025-01-15T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/"},"wordCount":908,"commentCount":0,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp","keywords":["how to install","ubuntu 24.04","UFW firewall"],"articleSection":["Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/","url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/","name":"How to Install UFW Ubuntu 24.04 | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp","datePublished":"2025-01-15T18:30:00+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"Learn how to install UFW Firewall on Ubuntu 24.04, or get one of our support plans and have our Linux sysadmins take care of it for you.","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2025\/01\/how-to-install-ufw-ubuntu-24-04.webp","width":742,"height":410,"caption":"How to Install UFW Ubuntu 24.04"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-ufw-ubuntu-24-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install UFW on Ubuntu 24.04"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/2238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2238"}],"version-history":[{"count":5,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/2238\/revisions"}],"predecessor-version":[{"id":2244,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/2238\/revisions\/2244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/2245"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}