How do I set a basic Linux firewall (UFW)? | SistemDC

How do I set a basic Linux firewall (UFW)?

How do I set a basic Linux firewall (UFW)?

Short answer: On Ubuntu/Debian use UFW to allow only needed ports. Never enable UFW before adding an SSH (22) allow rule.

Steps

  1. Connect over SSH.
  2. Run `sudo ufw allow OpenSSH` or `sudo ufw allow 22/tcp`.
  3. Add required service ports (e.g. 80, 443).
  4. Run `sudo ufw enable` and verify with `sudo ufw status`.

To avoid lockout on VDS, know how to open VNC Console from the client area first. Create a support ticket

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?

1 times viewed | 0 people fount it helpful

+902243340242