{"id":19540,"date":"2026-11-19T09:09:43","date_gmt":"2026-11-19T06:09:43","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/vps-firewall-manage-open-ports\/"},"modified":"2026-11-19T09:09:47","modified_gmt":"2026-11-19T06:09:47","password":"","slug":"vps-firewall-manage-open-ports","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/vps-firewall-manage-open-ports\/","title":{"rendered":"Firewall: Control the Open Ports on Your VPS"},"content":{"rendered":"<div class=\"hkb\" dir=\"ltr\">\n<div class=\"hkb-tldr\"><b>In short<\/b>The firewall controls which ports are open from the internet to your machine: unselected ports are closed, shrinking the attack surface. Open only what you need (such as 80 and 443 for the web). Be careful not to close the SSH port (22) on yourself \u2014 and if it happens, the console screen is always available. Outbound mail port 25 is blocked to prevent spam.<\/div>\n<div class=\"hy-vid\"><div style=\"width: 1280px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-19540-1\" width=\"1280\" height=\"720\" poster=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/vpspanel-fw-en.jpg\" preload=\"none\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/vpspanel-fw-en.mp4?_=1\" \/><a href=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/vpspanel-fw-en.mp4\">https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/vpspanel-fw-en.mp4<\/a><\/video><\/div><\/div>\n<p>Every open port on your server is a possible way in. The <b>firewall<\/b> decides which doors are open and which are closed: you keep open only what you need and close the rest, so the attack surface shrinks and your machine is safer.<\/p>\n<figure class=\"hkb-fig\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/vpspanel-fw-ui-en.webp\" alt=\"The Firewall tab enabled with common port options\" width=\"1200\" height=\"675\" loading=\"lazy\" \/><\/figure>\n<h2>How does the firewall work?<\/h2>\n<ul class=\"hkb-list\">\n<li>Turn on the firewall from the <b>Enable firewall<\/b> box.<\/li>\n<li>Choose the ports you want to open from the list.<\/li>\n<li>Unselected ports are closed externally and automatically.<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/vps-console-novnc-access\/\">Console<\/a> (noVNC) screen stays available no matter what you close, because it does not go through the network.<\/p>\n<h2>Common ports<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Port<\/th>\n<th>Use<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>HTTP (80)<\/td>\n<td>Plain web sites<\/td>\n<\/tr>\n<tr>\n<td>HTTPS (443)<\/td>\n<td>Encrypted web sites \u2014 open it for any site<\/td>\n<\/tr>\n<tr>\n<td>SSH (22)<\/td>\n<td>Remote login to the machine \u2014 do not close carelessly<\/td>\n<\/tr>\n<tr>\n<td>DNS (53)<\/td>\n<td>Domain name service if you run it<\/td>\n<\/tr>\n<tr>\n<td>MySQL (3306)<\/td>\n<td>The database \u2014 open only if you need external access<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"hkb-note w\"><b>Two important warnings:<\/b> (1) Do not close the <b>SSH (22)<\/b> port unless you log in another way, or you may lose remote access \u2014 the console remains your emergency route. (2) Outbound <b>mail port (25) is blocked<\/b> to prevent spam; if you need to send mail, open a support ticket and we reply within 24 hours at most.<\/div>\n<div class=\"hkb-hh\">\n<h2>Summary<\/h2>\n<ul>\n<li>The firewall opens the ports you need and closes the rest.<\/li>\n<li>Open 80 and 443 for the web, and avoid closing SSH on yourself.<\/li>\n<li>Outbound mail port 25 is blocked \u2014 open a ticket if you need it.<\/li>\n<\/ul>\n<p style=\"margin:10px 0 0\">For the safest login with the firewall, use <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/vps-ssh-keys-secure-login\/\">SSH keys<\/a>.<\/p>\n<\/div>\n<h2>Frequently asked questions<\/h2>\n<div class=\"hkb-faq\">\n<details>\n<summary>What does the firewall do?<\/summary>\n<p>It controls which ports are open from the internet to your machine. It keeps what you choose open and closes the rest, reducing the number of doors that could be exploited and increasing server security.<\/p>\n<\/details>\n<details>\n<summary>Does closing the SSH port cut my access?<\/summary>\n<p>It may cut your remote SSH access. But the console (noVNC) screen stays available because it is outside the network, so you log in there and reopen the port.<\/p>\n<\/details>\n<details>\n<summary>Why is mail port 25 blocked?<\/summary>\n<p>Outbound port 25 is blocked to prevent spam from servers. If you need to send legitimate mail, open a support ticket and we will help with the right solution.<\/p>\n<\/details>\n<details>\n<summary>Which ports do I open for a normal site?<\/summary>\n<p>Open 80 (HTTP) and 443 (HTTPS) for the web. Keep 22 (SSH) for login, and open the rest only when actually needed.<\/p>\n<\/details>\n<details>\n<summary>Does the firewall slow my site?<\/summary>\n<p>No, its performance impact is practically unnoticeable. Its security benefit far outweighs any cost.<\/p>\n<\/details>\n<\/div>\n<div class=\"hkb-rel\"><b>Related guides<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/vps-console-novnc-access\/\">Console (noVNC): Reach Your VPS Screen from the Browser<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/vps-ssh-keys-secure-login\/\">SSH Keys: Secure Passwordless Login to Your VPS<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/vps-security-quick-and-deep-virus-scan\/\">Security: Quick VPS Check and Deep Virus Scan<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.hyyat.com\/en\/kb\/hyyat-vps-control-panel\/\">All VPS panel guides \u2192<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In shortThe firewall controls which ports are open from the internet to your machine: unselected ports are closed, shrinking the attack surface. Open only what you need (such as 80 and 443 for the web). Be careful not to close the SSH port (22) on yourself \u2014 and if it happens, the console screen is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":19527,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2959],"doc_tag":[],"class_list":["post-19540","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-hyyat-vps-control-panel"],"year_month":"2026-11","word_count":498,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"admin","author_nicename":"admin","author_url":"https:\/\/www.hyyat.com\/en\/author\/admin\/"},"doc_category_info":[{"term_name":"Hyyat VPS Control Panel","term_url":"https:\/\/www.hyyat.com\/en\/kb\/hyyat-vps-control-panel\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/19540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=19540"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/19540\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media\/19527"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=19540"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=19540"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=19540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}