Firewall
See whether the server is protected, open or block ports with rules, and see what changed.
The firewall decides what the outside world can reach on this server. OSS Panel
drives ufw, so the rules you make here are the rules ufw status shows if you
log in over SSH.
The model is simple: incoming traffic is blocked by default, and a rule is a hole you open on purpose. Find it under Security → Firewall in the sidebar.

Read the status card
The card at the top answers "am I protected?".
- Your server is protected — the firewall is on and anything not listed in the rules is blocked before it reaches the server. The tiles under it show Incoming (Blocked), Outgoing (Allowed) and the number of Rules.
- Your server is not protected — the firewall is off. The card says how many rules are saved but not enforced, or, when there are none, that any port a program leaves open is reachable from the internet.
- Your firewall is on, but it isn't blocking anything — the rules are enforced, but the default incoming policy was changed outside the panel, so everything not listed is still let in. Click Block incoming by default and confirm to put it back. SSH and the panel's own ports are allowed first, so you keep access.
- Firewall state couldn't be read — the panel could not ask the server whether the firewall is on. Nothing was changed. Reload in a moment.
Turn the firewall on or off
- Click Turn off firewall (or Turn on firewall when it is off).
- Read the confirmation and confirm.
Turning it off makes every port a program has open reachable from the internet again. Your rules are kept and come back when you turn it on. Turning it on adds SSH and the ports the panel needs first, so you do not lose access.
Add a rule
-
Click Add rule.
-
Choose Allow or Block. A summary sentence at the top of the dialog rewrites itself as you fill in the form, for example Allow incoming TCP on port 8443 from 203.0.113.5.
-
Enter the Port: one port such as
443, or a range such as8000-8090. You can click one of the service buttons instead — SSH, HTTP, HTTPS, MySQL (called MariaDB when MariaDB is the engine), PostgreSQL, Redis, FTP, SMTP or DNS — to fill the port in. A service that already has a rule is greyed out. -
Choose the Protocol: TCP, UDP or Both TCP and UDP. For a port range pick TCP or UDP: ufw cannot express a range for both at once, so add a second rule if you need it.
-
Under IP address or range, enter one address (
203.0.113.5) or a range (203.0.113.0/24) to limit who the rule applies to. Leave it empty and the rule applies to every address. Only my IP fills in the address you are connecting from. -
Give it a Name, so the table reads like a decision. Allow 8443 from office is better than 8443. The name is optional; an unnamed rule shows its service name or Port 8443.
-
Click Add rule.

The dialog stops you before it sends the rule in four cases:
- You already have a rule exactly like this one.
- You already have the opposite rule for this port and source. Edit that rule instead.
- A database port with no address: MySQL would be reachable from any address on the internet. Databases are normally limited to a single IP — fill in the IP address field below.
- Block on the address you are connected from: That is the address you are connected from. Blocking it would lock you out of this server.
Open a port a program is already using
When a program listens on a port that no rule lets through, the panel shows a note above the table: "1 port is closed to the internet". It lists each port with an Allow button. That is normal for a database: add a rule only when you need to reach the port from outside. Allow opens the Create a rule dialog with the port filled in.
Work with the rules table
The Rules table has the columns Name, Action, Port (with the protocol), From (the source address, or anywhere) and State. The first button above it refreshes the list.
- State switch — turns a rule off without deleting it. A rule that is off shows an Off tag and a struck-through name, and is kept.
- Protected — rules the panel set up itself (the System default ones, on a fresh install SSH, HTTP and HTTPS) show a Protected tag instead of the switch while they are on. Hover it: "This one keeps you connected — switching it off can lock you out of the server or take your applications offline." A protected rule that is on can not be switched off or deleted. If one is off, you can switch it back on.
- Row menu (…) — Edit rule and Delete. Editing opens the same dialog as Add rule, with a Save rule button. Changing the ports replaces the rule: the new one is added before the old one is removed. On a protected rule only the name can change.
- Delete asks Delete this rule? and says what happens: whatever the rule was letting through is blocked (or whatever it was blocking is let through) straight away. If the rule is switched off, or the firewall is off, nothing changes today — but a deleted rule does not come back when you turn the firewall on.
When there are more than 10 rules, a search box and four filters appear above the table: state (Any state, Enabled, Disabled), action (Any action, Allow, Block), Added by (Any source, Custom, System default, Database user) and the sort order (Newest first, Port: low to high, Port: high to low, Action: A–Z, Protocol: A–Z). Rules that a database user needed are added for you and show up as Database user: removing one by hand breaks whatever was connecting.
Rules added outside the panel
If someone added rules with the ufw command, an Added outside the panel card
lists them. They work, but the panel does not manage them. For each one you can
click Manage in panel (when the panel can take it over) or Remove. Some
kinds of rule can be neither: the card says "The panel can't remove this kind of
rule. Remove it with the ufw command on the server."
See what changed
-
Click History above the rules table.
-
Read the list, newest first, with who made each change and when.

With the Activity log permission you see every firewall change on the server. Without it you see your own changes only. Open Activity Log goes to the server-wide activity log.
Limits
- Ports run from 1 to 65535. In a range, the end can not be lower than the start.
- A range needs TCP or UDP, not both.
- A rule name is at most 255 characters and one line.
- This is the host firewall (ufw). It does not filter traffic between containers and it is not a web application firewall. For that, see the per-application web firewall.
Who can do this
- Firewall · View shows the status, the rules and the history.
- Firewall · Manage is needed to turn the firewall on or off, add, edit, switch and delete rules, and manage the rules added outside the panel. Without it the controls are disabled, with the note "Your role does not include Firewall with Manage access. Ask an administrator to grant it."
- Seeing every change in History needs Activity log · View as well.
Common errors
- We could not check the firewall just now. That does not mean your server is open — we just could not get an answer. — the panel could not read the firewall. Reload; the server is not open because of this message.
- Rules could not be loaded. Try again in a moment. — the rules list failed to load while the status card did. Use the refresh button.
- For a range of ports, choose TCP or UDP. Add a second rule if you need both. — pick one protocol for the range.
Related
- Fail2ban — bans single addresses that keep failing to sign in.
- Web firewall — blocks bad requests to one site.
- Settings → Access & security — moving the SSH port updates the firewall for you.
System users
The Linux accounts that own and run your applications. Create them, set the login shell, grant sudo and SSH, manage passwords and SSH keys, and delete one or several at once.
Fail2ban
Ban addresses that keep guessing passwords, with jails to turn on, set the ban rules, keep your own address on the never-ban list, and ban or unban addresses by hand.