{"id":7955,"date":"2021-08-10T07:07:08","date_gmt":"2021-08-10T07:07:08","guid":{"rendered":"https:\/\/green.cloud\/docs\/docly-documentation\/content\/using-ufw-on-ubuntu-18-04\/"},"modified":"2026-01-19T00:45:43","modified_gmt":"2026-01-19T00:45:43","slug":"using-ufw-on-ubuntu-18-04","status":"publish","type":"docs","link":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/","title":{"rendered":"How to set up a Firewall with UFW on Ubuntu 20.04"},"content":{"rendered":"<p>UFW, or Uncomplicated Firewall, is a simplified firewall management interface that hides the complexity of lower-level packet filtering technologies such as iptables and nftables. If you\u2019re looking to get started securing your network, and you\u2019re not sure which tool to use, UFW may be the right choice for you.<\/p>\n<p><iframe title=\"How to set up a Firewall with UFW on Ubuntu 20.04 | VPS Tutorial\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/lOcWMdr6uaM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h2 id=\"Install_UFW\">Install UFW<\/h2>\n<p>UFW is installed by default in Ubuntu 20.04, but you can verify this:<\/p>\n<pre><code>which ufw<\/code><\/pre>\n<p>You should receive the following output:<\/p>\n<pre><code>\/usr\/sbin\/ufw<\/code><\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-22885 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png\" alt=\"\" width=\"564\" height=\"59\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png 564w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43-300x31.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43-20x2.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43-32x3.png 32w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/p>\n<p>If you don&#8217;t receive output, that means that UFW is not installed. You can install it yourself if this is the case:<\/p>\n<pre><code>apt-get install ufw<\/code><\/pre>\n<h2 id=\"Allow_connections\">Allow connections<\/h2>\n<p>Type the following command to allow port connections to your server (in this case, the port is 80)<\/p>\n<pre><code>ufw allow 80\/tcp<\/code><\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-22887 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_44.png\" alt=\"\" width=\"573\" height=\"80\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_44.png 573w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_44-300x42.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_44-20x3.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_44-32x4.png 32w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/p>\n<p>In general, you can allow any port you need by using the following format:<\/p>\n<pre><code>ufw allow &lt;port&gt;\/&lt;optional: protocol&gt;<\/code><\/pre>\n<h2 id=\"Deny_connections\">Deny connections<\/h2>\n<p>If you need to deny access to a certain port, use the\u00a0<code>deny<\/code> command:<\/p>\n<pre><code>ufw deny &lt;port&gt;\/&lt;optional: protocol&gt;<\/code><\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-22889 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_46.png\" alt=\"\" width=\"623\" height=\"80\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_46.png 623w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_46-300x39.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_46-20x3.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_46-32x4.png 32w\" sizes=\"(max-width: 623px) 100vw, 623px\" \/><\/p>\n<h2 id=\"allow-port-ranges\">Allow Port Ranges<\/h2>\n<p>Instead of allowing access to single ports UFW allows us to allow access to port ranges. When allowing port ranges with UFW, you must specify the protocol, either\u00a0<code>tcp<\/code>\u00a0or\u00a0<code>udp<\/code>. For example, if you want to allow ports from\u00a0<code>7100<\/code>\u00a0to\u00a0<code>7200<\/code>\u00a0on both\u00a0<code>tcp<\/code>\u00a0and\u00a0<code>udp<\/code>\u00a0then run the following command:<\/p>\n<pre><code>ufw allow 7100:7200\/tcp\r\n<\/code><code>ufw allow 7100:7200\/udp<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22893 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_45.png\" alt=\"\" width=\"587\" height=\"135\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_45.png 587w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_45-300x69.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_45-20x5.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_45-32x7.png 32w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/p>\n<h2 id=\"allow-specific-ip-addresses\">Allow Specific IP Addresses<\/h2>\n<p>To allow access on all ports from your home machine with IP address of 64.63.62.61, specify\u00a0<code>from<\/code>\u00a0followed by the IP address you want to whitelist:<\/p>\n<pre>ufw allow from 64.63.62.61<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22895 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_47.png\" alt=\"\" width=\"590\" height=\"60\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_47.png 590w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_47-300x31.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_47-20x2.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_47-32x3.png 32w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/p>\n<h2 id=\"allow-specific-ip-addresses-on-specific-port\">Allow Specific IP Addresses on Specific port<\/h2>\n<p>To allow access on a specific port let\u2019s say port 22 from your work machine with IP address of 64.63.62.61, use\u00a0<code>to any port<\/code> followed by the port number:<\/p>\n<pre>ufw allow from 64.63.62.61 to any port 22<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22897 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_48.png\" alt=\"\" width=\"679\" height=\"59\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_48.png 679w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_48-300x26.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_48-20x2.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_48-32x3.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_48-670x59.png 670w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/p>\n<h2 id=\"allow-connections-to-a-specific-network-interface\">Allow Connections to a Specific Network Interface<\/h2>\n<p>To allow access on a specific port let\u2019s say port 3360 only to specific network interface\u00a0<code>eth2<\/code>, then you need to specify\u00a0<code>allow in on<\/code>\u00a0and the name of the network interface:<\/p>\n<pre>ufw allow in on eth2 to any port 3306<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22899 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_49.png\" alt=\"\" width=\"608\" height=\"78\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_49.png 608w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_49-300x38.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_49-20x3.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_49-32x4.png 32w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/p>\n<h2 id=\"delete-ufw-rules\">Delete UFW Rules<\/h2>\n<p>There are two different ways to delete UFW rules, by rule number and by specifying the actual rule.\u00a0 Deleting UFW rules by rule number is easier especially if you are new to UFW. To delete a rule by a rule number first you need to find the number of the rule you want to delete, you can do that with the following command:<\/p>\n<pre>ufw status numbered<\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22901 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_50.png\" alt=\"\" width=\"716\" height=\"369\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_50.png 716w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_50-300x155.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_50-20x10.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_50-32x16.png 32w\" sizes=\"(max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>To delete rule number 3, the rule that allows connections to port 8080, use the following command:<\/p>\n<pre>ufw delete 3<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22903 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_51.png\" alt=\"\" width=\"550\" height=\"118\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_51.png 550w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_51-300x64.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_51-20x4.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_51-32x7.png 32w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>The second method is to delete a rule by specifying the actual rule, for example if you added a rule to open port\u00a0<code>8069<\/code>\u00a0you can delete it with:<\/p>\n<pre>ufw delete allow 80<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-22905 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_52.png\" alt=\"\" width=\"504\" height=\"81\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_52.png 504w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_52-300x48.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_52-20x3.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_52-32x5.png 32w\" sizes=\"(max-width: 504px) 100vw, 504px\" \/><\/p>\n<h2 id=\"disable-ufw\">Disable UFW<\/h2>\n<p>If for any reason you want to stop UFW and deactivate all the rules you can use:<\/p>\n<pre>ufw disable<\/pre>\n<h2 id=\"reset-ufw\">Reset UFW<\/h2>\n<p>Resetting UFW will disable UFW, and delete all active rules. This is helpful if you want to revert all of your changes and start fresh.<\/p>\n<p>To reset UFW simply type in the following command:<\/p>\n<pre>ufw reset<\/pre>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>You have learned how to install and configure UFW firewall on your Ubuntu 20.04 server. Be sure to allow all incoming connections that are necessary for proper functioning of your system, while limiting all unnecessary connections.<\/p>\n<p><a href=\"https:\/\/green.cloud\/9zcf\"><br \/>\n<img decoding=\"async\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/03\/2-2.png\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/03\/2-2.png 640w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/03\/2-2-300x50.png 300w\" alt=\"\" \/> <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>UFW, or Uncomplicated Firewall, is a simplified firewall management interface that hides the complexity of lower-level packet filtering technologies such as iptables and nftables. If you\u2019re looking to get started securing your network, and you\u2019re not sure which tool to use, UFW may be the right choice for you. Install UFW UFW is installed by [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":17817,"menu_order":247,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-7955","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to set up a Firewall with UFW on Ubuntu 20.04 - GreenCloud Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set up a Firewall with UFW on Ubuntu 20.04 - GreenCloud Documentation\" \/>\n<meta property=\"og:description\" content=\"UFW, or Uncomplicated Firewall, is a simplified firewall management interface that hides the complexity of lower-level packet filtering technologies such as iptables and nftables. If you\u2019re looking to get started securing your network, and you\u2019re not sure which tool to use, UFW may be the right choice for you. Install UFW UFW is installed by [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/\" \/>\n<meta property=\"og:site_name\" content=\"GreenCloud Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-19T00:45:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png\" \/>\n\t<meta property=\"og:image:width\" content=\"564\" \/>\n\t<meta property=\"og:image:height\" content=\"59\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/\",\"name\":\"How to set up a Firewall with UFW on Ubuntu 20.04 - GreenCloud Documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Screenshot_43.png\",\"datePublished\":\"2021-08-10T07:07:08+00:00\",\"dateModified\":\"2026-01-19T00:45:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/#primaryimage\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Screenshot_43.png\",\"contentUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Screenshot_43.png\",\"width\":564,\"height\":59},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GreenCloud Documents\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/docs\\\/greencloud-documents\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Linux Operating Systems\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/linux-operating-systems\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to set up a Firewall with UFW on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\",\"name\":\"GreenCloud Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/green.cloud\\\/docs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set up a Firewall with UFW on Ubuntu 20.04 - GreenCloud Documentation","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:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/","og_locale":"en_US","og_type":"article","og_title":"How to set up a Firewall with UFW on Ubuntu 20.04 - GreenCloud Documentation","og_description":"UFW, or Uncomplicated Firewall, is a simplified firewall management interface that hides the complexity of lower-level packet filtering technologies such as iptables and nftables. If you\u2019re looking to get started securing your network, and you\u2019re not sure which tool to use, UFW may be the right choice for you. Install UFW UFW is installed by [&hellip;]","og_url":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/","og_site_name":"GreenCloud Documentation","article_modified_time":"2026-01-19T00:45:43+00:00","og_image":[{"width":564,"height":59,"url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/","url":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/","name":"How to set up a Firewall with UFW on Ubuntu 20.04 - GreenCloud Documentation","isPartOf":{"@id":"https:\/\/green.cloud\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/#primaryimage"},"image":{"@id":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/#primaryimage"},"thumbnailUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png","datePublished":"2021-08-10T07:07:08+00:00","dateModified":"2026-01-19T00:45:43+00:00","breadcrumb":{"@id":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/#primaryimage","url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png","contentUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2021\/08\/Screenshot_43.png","width":564,"height":59},{"@type":"BreadcrumbList","@id":"https:\/\/green.cloud\/docs\/how-to-set-up-a-firewall-with-ufw-on-ubuntu-2004\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/green.cloud\/docs\/"},{"@type":"ListItem","position":2,"name":"GreenCloud Documents","item":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/"},{"@type":"ListItem","position":3,"name":"Linux Operating Systems","item":"https:\/\/green.cloud\/docs\/linux-operating-systems\/"},{"@type":"ListItem","position":4,"name":"How to set up a Firewall with UFW on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/green.cloud\/docs\/#website","url":"https:\/\/green.cloud\/docs\/","name":"GreenCloud Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/green.cloud\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/7955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/comments?post=7955"}],"version-history":[{"count":4,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/7955\/revisions"}],"predecessor-version":[{"id":23615,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/7955\/revisions\/23615"}],"up":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/17817"}],"wp:attachment":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/media?parent=7955"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/doc_tag?post=7955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}