Firewall & Security Hardening

Set the Firewall for Your VPS

By the Domain India teamPublished 2 min read
Knowledge base article
Contents (3 sections)

Your VPS has a firewall on the host, outside the server. It decides which incoming traffic reaches your VPS.

Key takeaways

On the Firewall tab, click Add rule, choose Allow or Deny, the protocol, port and source, then click Save firewall. Rules apply from top to bottom; anything no rule allows is blocked.

Open on a new VPS: SSH (TCP 22), HTTP (TCP 80), HTTPS (TCP 443 and UDP 443) and ping.

Firewall tab with the default rules: TCP 22, 80 and 443, UDP 443 and ping allowed from anywhere
The default rules on a new VPS

Add or change rules

  1. Log in to the client area, open VPS & Servers and click your VPS. Go to the Firewall tab.
  2. Click Add rule.
  3. Choose Allow or Deny, the protocol (TCP, UDP or ping), the port (3306) or a range (8000-8100), and optionally a source IP or range (203.0.113.10 or 203.0.113.0/24). Leave the source empty for "from anywhere".
  4. Add a note so you remember why.
  5. Use the arrows to move a rule up or down.
  6. Click Save firewall. To discard your edits, click Undo changes.
A new rule allowing TCP 3306 from 203.0.113.10 with the note mysql from office, and the Save firewall and Undo changes buttons
Adding a rule

Rules to know

  • Rules are checked from top to bottom. Anything no rule allows is blocked.
  • No rules at all means all incoming traffic is blocked.
  • Up to 50 rules per VPS, free.
  • If you remove the SSH rule, you can still reach the server through the Console tab.
  • This firewall works together with any firewall inside the server (UFW, firewalld). Traffic must pass both.
  • Isolation from other servers and the outgoing mail block stay on whatever you set here.
Older VPS

Older VPS without a VPS page in your client area: open a ticket with the VPS IP address and our team will do this for you.

Frequently asked questions

Which ports are open on a new VPS?

SSH (TCP 22), HTTP (TCP 80), HTTPS (TCP 443 and UDP 443) and ping.

How many firewall rules can I add?

Up to 50 per VPS, free.

I removed the SSH rule and cannot connect. What now?

Open the Console tab on your VPS page, or add the SSH rule back on the Firewall tab and click Save firewall.

Ready when you are

Get VPS from ₹800/mo + GST

See plans

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Set the Firewall for Your VPS | Domain India