{"id":18556,"date":"2024-11-26T12:15:55","date_gmt":"2024-11-26T06:45:55","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=18556"},"modified":"2024-11-26T12:15:56","modified_gmt":"2024-11-26T06:45:56","slug":"almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/","title":{"rendered":"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld"},"content":{"rendered":"\n<p>Rocky Linux and <a href=\"https:\/\/www.milesweb.in\/hosting\/vps-hosting\/almalinux-vps\">AlmaLinux<\/a> are two major CentOS alternatives known for their security, stability, and compatibility with the enterprise environment. These distributions offer a robust platform for <a href=\"https:\/\/www.milesweb.in\/\">web hosting<\/a>, application deployment, and other server needs. In the server administration, managing network traffic is a critical aspect of server administration. Hence, opening HTTP (port 80) and HTTPS (port) is the foundational step for enabling web services.&nbsp;<\/p>\n\n\n\n<p>Firewalls such as firewalld and iptables play an important role in securing your Linux system. They filter the traffic, and, therefore, secure your network. Configuring firewalls to allow traffic in or out of ports 80 and 443 allows your server to host websites and applications over secure and non-secure protocols. Here is a detailed guide on opening ports 80 and 443 in AlmaLinux and <a href=\"https:\/\/www.milesweb.in\/hosting\/vps-hosting\/rocky-linux-vps\">Rocky Linux<\/a> 8 using firewall tools.<\/p>\n\n\n\n<p>FirewallD is the default firewall application in Linux. You can use the following command to get this on your server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install firewalld\nsudo systemctl start firewalld\nsudo systemctl enable firewalld\nsudo systemctl status firewalld<\/code><\/pre>\n\n\n\n<p><strong>Key Insights<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How to open HTTP port 80 and HTTPS port 443 Permanently<\/li>\n\n\n\n<li>Command to open or close any server and port in AlmaLinux<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Commands to open or close HTTP port 80 &amp; HTTPS 443 on AlmaLinux\/ Rocky 8<\/h2>\n\n\n\n<p>The first step is to check the Active AlmaLinux port list. Check what ports and services already allow to communicate outside the public network in our firewall. For that use:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --list-all<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat -na | grep port-number<\/code><\/pre>\n\n\n\n<p>Replace port-number with the one you want to know. In the case of inactivity, you may not receive any results.<\/p>\n\n\n\n<p>Second, you need to execute the command to open port 80 and 443. We all know that firewall comes with some default pre-configured services and http and https are in them. So, use the service or port command of the firewalld allowing to access in the Public zone:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --zone=public --permanent --add-service=http\nsudo firewall-cmd --zone=public --permanent --add-service=https<\/code><\/pre>\n\n\n\n<p>We can also open other ports if your Apache web server&#8217;s application runs on a port other than 80 and 443. Let\u2019s say your web application is on some custom port 5000. Thus, to open it we use-<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --zone=public --permanent --add-port 5000\/tcp<\/code><\/pre>\n\n\n\n<p>Just replace 5000 with whatever port number you want to open.<\/p>\n\n\n\n<p>Third, in order to ensure that the open service or port is successfully recognized by the firewalld, reload its service using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Block or close port 80 and 443 &#8211; If after some time, you want to block or close HTTP and HTTPS services or any other port, you can do so manually, using the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --zone=public --permanent --remove-service=http\nsudo firewall-cmd --zone=public --permanent --remove-service=https<\/code><\/pre>\n\n\n\n<p><strong>For some particular port number<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --zone=public --permanent --remove-port 5000\/tcp<\/code><\/pre>\n\n\n\n<p><strong>Reload firewall<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --reload<\/code><\/pre>\n\n\n\n<div class=\"vlt-box \">\n<div class=\"box-title\" style=\"background:#D5EAFF; color:#000\">Wrapping it Up<\/div>\n<div class=\"box-content\" >\n<p>Configuring firewalls to allow HTTP and HTTPS traffic is a vital step for ensuring smooth and secure web service operations on AlmaLinux and Rocky Linux 8. By enabling ports 80 and 443, you can effectively serve web content and provide secure communication to your users. Tools like firewalld simplify this process, making it easy to manage access while maintaining system security.<\/p>\n<p>Whether you&#8217;re deploying websites or hosting APIs, understanding how to manage firewall rules is an essential skill for administrators. With a properly configured firewall, you not only enable seamless connectivity but also ensure that your server remains safeguarded from unauthorized access.<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Rocky Linux and AlmaLinux are two major CentOS alternatives known for their security, stability, and compatibility with the enterprise environment. These distributions offer a robust platform for web hosting, application deployment, and other server needs. In the server administration, managing network traffic is a critical aspect of server administration. Hence, opening HTTP (port 80) and [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-18556","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-vps-faq"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld<\/title>\n<meta name=\"description\" content=\"Secure your AlmaLinux\/Rocky Linux 8 server with a robust firewalld configuration. Learn how to open HTTP (port 80) and HTTPS (port 443) ports securely, enhancing your server&#039;s accessibility and protection.\" \/>\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.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld\" \/>\n<meta property=\"og:description\" content=\"Secure your AlmaLinux\/Rocky Linux 8 server with a robust firewalld configuration. Learn how to open HTTP (port 80) and HTTPS (port 443) ports securely, enhancing your server&#039;s accessibility and protection.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-26T06:45:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:45:56+00:00\" \/>\n<meta name=\"author\" content=\"Ujwala\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ujwala\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\"},\"author\":{\"name\":\"Ujwala\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\"},\"headline\":\"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld\",\"datePublished\":\"2024-11-26T06:45:55+00:00\",\"dateModified\":\"2024-11-26T06:45:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\"},\"wordCount\":506,\"commentCount\":0,\"articleSection\":[\"VPS FAQ\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\",\"name\":\"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"datePublished\":\"2024-11-26T06:45:55+00:00\",\"dateModified\":\"2024-11-26T06:45:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\"},\"description\":\"Secure your AlmaLinux\/Rocky Linux 8 server with a robust firewalld configuration. Learn how to open HTTP (port 80) and HTTPS (port 443) ports securely, enhancing your server's accessibility and protection.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\",\"name\":\"Ujwala\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3688a73ea9910afb426b453e227deb5300ca470f5518aac6c3b676a5b0acfee5?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3688a73ea9910afb426b453e227deb5300ca470f5518aac6c3b676a5b0acfee5?s=96&d=blank&r=g\",\"caption\":\"Ujwala\"},\"description\":\"My aim is to create enriching content on topics related to SEO, web hosting and social media. The idea is to elevate the readers to new levels of usability, accessibility and understanding.\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/ujwala\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld","description":"Secure your AlmaLinux\/Rocky Linux 8 server with a robust firewalld configuration. Learn how to open HTTP (port 80) and HTTPS (port 443) ports securely, enhancing your server's accessibility and protection.","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.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/","og_locale":"en_US","og_type":"article","og_title":"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld","og_description":"Secure your AlmaLinux\/Rocky Linux 8 server with a robust firewalld configuration. Learn how to open HTTP (port 80) and HTTPS (port 443) ports securely, enhancing your server's accessibility and protection.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2024-11-26T06:45:55+00:00","article_modified_time":"2024-11-26T06:45:56+00:00","author":"Ujwala","twitter_misc":{"Written by":"Ujwala","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/"},"author":{"name":"Ujwala","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8"},"headline":"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld","datePublished":"2024-11-26T06:45:55+00:00","dateModified":"2024-11-26T06:45:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/"},"wordCount":506,"commentCount":0,"articleSection":["VPS FAQ"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/","name":"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"datePublished":"2024-11-26T06:45:55+00:00","dateModified":"2024-11-26T06:45:56+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8"},"description":"Secure your AlmaLinux\/Rocky Linux 8 server with a robust firewalld configuration. Learn how to open HTTP (port 80) and HTTPS (port 443) ports securely, enhancing your server's accessibility and protection.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/almalinux-rocky-linux-8-open-http-https-port-80-443-with-firewalld\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"AlmaLinux \/ Rocky Linux 8 Open HTTP\/HTTPS Port 80\/443 with Firewalld"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8","name":"Ujwala","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3688a73ea9910afb426b453e227deb5300ca470f5518aac6c3b676a5b0acfee5?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3688a73ea9910afb426b453e227deb5300ca470f5518aac6c3b676a5b0acfee5?s=96&d=blank&r=g","caption":"Ujwala"},"description":"My aim is to create enriching content on topics related to SEO, web hosting and social media. The idea is to elevate the readers to new levels of usability, accessibility and understanding.","url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/ujwala\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/18556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=18556"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/18556\/revisions"}],"predecessor-version":[{"id":18557,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/18556\/revisions\/18557"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=18556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=18556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=18556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}