Skip to content
hostup.se

Firewall for your VPS: open ports and turn on protection

Checked against the client area 6 November 2026

The firewall in the client area makes sure only the services you choose can be reached on your VPS, for example SSH or a website. On a new server, protection is off. It says Firewall Inactive next to the switch on the Firewall tab and the firewall lets all traffic in. You add a rule for each service and then turn protection on. All other incoming traffic is then stopped on our side before it reaches the server.

If several servers should have the same rules, collect them in a firewall group.

Open your servers in the client area

Add a rule for whatever you log in with before you turn protection on. That is SSH (port 22) on Linux and Remote Desktop (port 3389) on Windows. Otherwise you lock yourself out. If you can’t reach the server after turning protection on, turn it off with the switch on the Firewall tab. Then add the missing rule and turn protection back on.

If the server is on a private network, protection also stops traffic from your other servers on that network. Add a rule that lets that network in as well. In that rule, fill in only Source with the whole private /24 network, for example 10.200.5.0/24 if the server’s private address is 10.200.5.12.

  1. Open the server in the client area and go to the Firewall tab.

  2. Click + Add Rule.

    The Firewall tab with the Add Rule button framed
  3. Pick the service under Quick Template, for example SSH or web. The protocol and port are filled in for you.

  4. If the service is not among the templates, choose TCP or UDP under Protocol. Enter the port in the Port field under Destination, further down in the dialog. Write several ports as 80,443 and a range as 1000-2000.

  5. To let in only certain addresses, enter them under Source as an IP address or a network such as 192.168.1.0/24. Empty means any. Leave Source port empty.

  6. Click Add Firewall Rule. The rule appears in the list on the tab. Do the same for each service the server should be reachable on.

    The Add Firewall Rule dialog with the SSH template picked, TCP and port 22 filled in and the Add Firewall Rule button framed
  7. Click the switch next to Firewall Inactive to turn protection on.

    The Firewall Rules box with one SSH rule and the switch next to Firewall Inactive framed
  8. The Enable firewall? dialog says the inbound policy is set to DROP. That means incoming traffic without a matching rule is stopped. The dialog also shows how many rules you have. Click Enable firewall.

    The Enable firewall dialog with one rule configured and the Enable firewall button framed

Next to the switch it now says Firewall Active. A green box above the rules says only traffic that matches the rules is let in. Traffic that does not match one of the rules is stopped on our side before it reaches the server.

The firewall only covers incoming traffic. Replies to connections the server opens itself always get through, for example when it downloads updates. If the server should answer ping, you need a rule with the Ping - ICMP echo request template.

  • The rules do not protect the server as long as it says Firewall Inactive next to the switch. They stay in place and apply as soon as you turn protection on.
  • If a port does not answer while protection is off, check the service and the firewall inside the server. See Can’t reach your VPS? Troubleshoot the connection.
  • Change a rule with Edit and remove it with Delete.
  • A server can have up to 100 rules. The counter next to the switch shows how many you have used.

If several servers should have the same rules, you can collect them in a firewall group.

Open the firewall groups in the client area

  1. Go to Dashboard and the Security tab. It is the tab above the server list, not Security in the menu. Click Create Group.

    The VPS box on the Dashboard with the Security tab and the Create Group button framed
  2. Enter a name under Group Name.

  3. Click Add Rule next to the Firewall Rules heading. Fill in the rule in the Configure New Rule box the same way as above. Then click Add Rule at the bottom of that box. Do the same for each rule.

    The Create Firewall Group dialog with a name in the Group Name field and the Add Rule button framed
  4. Click Create Group.

  5. Open the server and go to the Firewall tab. Choose the group under Apply Group and click Assign & sync.

Under Apply Group it then says Current group with the group’s name. The group’s rules are copied to the server and show in the list among its own rules. This does not turn protection on. If the switch is off, turn it on as in step 7 above.

  • If you add a rule to the group later, it is added on every server that has the group.
  • If you remove a rule from the group, it stays on the servers. Remove it on each server.
  • If you remove the group from a server with Remove, its rules stay on the server.
  • A group that a server uses cannot be deleted. Remove it from the servers first.