Skip to content
Documentation menu
Products & services
Back to section

VPS firewall: rules, policies and access control

Choose the right VPS firewall layer, build and test access rules, reuse saved policies, understand Audit and Enforce, and recover access without removing unrelated protection.

Services / VPS security

Control who can reach your VPS

Choose the right firewall layer, create access rules in a safe order, reuse policies and verify the result with a new connection.

Keep a working recovery path

Confirm console login and your real administration address before tightening access. Edge rules are stateless: review return traffic as well as incoming connections.

VPS firewall: control access to your server

What the firewall does and why to use it

A firewall decides which network traffic your server should accept or reject. Use it to keep administration private, expose only the application ports you need, and prevent unwanted access even when a service is accidentally left listening inside the VPS.

Open the customer portal, select your VPS, and open Firewall. The Firewall & protection workspace separates Firewall rules, DDoS protection, Statistics and DPI. Available controls depend on your VPS, host and permissions. An unavailable control does not mean that protection has been applied.

Choose the right control

Control What it does When to use it
Edge access rules Match traffic for the VPS's allocated addresses before the VM firewall. Create a short access list, block a remote network, or test a rule in Audit mode.
VM firewall and saved policies Manage the virtual machine's firewall rules and reuse a policy on selected services. Maintain a standard server policy, including rules that use destination ports.
Guest operating-system firewall Enforce rules inside Linux, Windows or another guest OS. Protect individual interfaces and services alongside the platform controls.
DDoS protection Manage the available flood-protection mode, country restrictions and TCP session limits. Reduce unwanted network load and connection pressure; see the DDoS guide.

Traffic must pass every applicable layer. An allow rule at the edge does not override a block in the VM or guest firewall, a country restriction, or an application that is not listening. Website Protection/WAF is a separate service for supported website traffic; see DNS and website protection.

Before changing access

  1. Confirm the VPS hostname, service ID and assigned IP addresses. Identify the actual SSH or RDP port configured inside this server.
  2. Keep a working administrator session and the browser console available. Test console login before relying on it for recovery.
  3. Record the current defaults, rule order and selected saved policy so you can reverse the specific change.
  4. Identify the public source IP or CIDR of your administration connection. A VPN, office NAT or proxy can change the address the VPS sees.
  5. Add the required administration and application permissions before tightening a default action. Check IPv4 and IPv6 separately when both are used.

The example address 198.51.100.24/32 below is documentation-only. Replace it with your own trusted public address. A /32 matches one IPv4 address; an IPv6 /128 matches one IPv6 address.

Add an edge rule

Why: Filter a specific protocol, service or remote network without rebuilding the rest of your server policy.

  1. Open Firewall rules and find Edge access rules. Review the current Policy mode and default inbound/outbound actions.
  2. Select Add rule. Choose Inbound for traffic arriving at the VPS or Outbound for traffic leaving it.
  3. Choose Allow or Block, then the protocol: TCP, UDP, ICMP, ICMPv6 or any protocol, as offered.
  4. Set the Remote network (CIDR), or select an existing Reusable address list when offered. An empty remote network matches any remote address. A named list is useful when several rules should use the same group of networks; review its members before selecting it.
  5. For TCP or UDP, set VM local port or range, such as 2222 or 8000-8010. Leave it empty only when you intend to match every local port.
  6. Add or update the rule in the editor, then use Save policy to submit the complete edge-policy change. Closing the editor alone does not establish that the host has applied it.
  7. Wait for the policy to report Up to date, refresh, and test a new connection from the intended source.

Port direction matters: The edge field means the port on your VPS: the destination port inbound and the source port outbound. An outbound web client normally uses an ephemeral local source port, not local port 443. If you need to restrict outbound connections by the remote service's port, use an appropriate VM-firewall Destination port(s) rule rather than treating the edge local-port field as a remote port.

The edge editor offers up to five rules. Rules run from top to bottom and the first matching rule wins. Use the move-up/down controls to place specific exceptions before broader rules. Disabled, edited or removed entries in another firewall layer are not automatically replaced by an edge rule.

Example: allow SSH only from your administration address

Why: Reduce exposure of an administrative service while leaving the rest of the current access policy intact.

This example assumes your SSH daemon really listens on TCP 2222 and that the current edge defaults allow inbound and outbound traffic. Use your actual SSH port and administration address.

Order Direction and action Protocol / VM local port Remote network
1 Inbound Allow TCP / 2222 Your administration address, for example 198.51.100.24/32
2 Inbound Block TCP / 2222 Any remote address
  1. Create the specific Allow rule first, then the broader Block rule below it.
  2. Save in Audit · count matches first if you need to check the matches without enforcing these edge blocks.
  3. Inspect Statistics and test from the allowed administration connection. Consider other administration addresses or IPv6 access before proceeding.
  4. Change Policy mode to Enforce · block matches, save, and wait for the applied status.
  5. Open a separate SSH connection from the allowed address. If you have a second test connection outside the allowlist, verify that it cannot reach that SSH port.

Check: A new allowed login works after refresh, and the specific unwanted connection is blocked. Keep the original session open until the new one succeeds. This example restricts SSH only; it does not create a default-deny policy for every other service.

Audit, Enforce and default actions

Audit records matches that would be blocked by the edge access policy. Enforce applies its block decisions. Audit does not disable other independently enforced settings, such as VM-firewall rules or country restrictions. A recorded Audit match is not proof that a packet was actually blocked.

Defaults apply when no rule matches. A default inbound Block can be useful, but edge rules are stateless: they do not automatically recognise every reply to an outbound connection. Restricting either direction can break DNS, software updates, monitoring, backups or application dependencies unless the required return traffic is also permitted.

For a general server default-deny policy, use the VM firewall and its appropriate established/return-traffic handling, then verify the effective rules. Do not copy a stateless edge default-deny configuration from another VPS without reviewing how this server connects out and receives replies.

Use the VM firewall and saved policies

Why: Reuse a reviewed configuration across servers and keep common administration and application rules consistent.

  1. In Firewall rules, review the separate VM firewall section and whether it is enabled.
  2. Under the saved-policy controls, use Manage to create or edit a policy. Give it a name that explains the workload, such as a web-server or administration policy.
  3. Review its inbound/outbound defaults and enabled rules. VM-firewall rules offer direction, action, protocol, destination ports and optional source/destination restrictions. Use the actual ports and networks required by your application.
  4. Save the policy, return to the intended VPS, select it and choose the offered Apply or Apply to VPS action. Review the current selection after refresh.
  5. If using a Primary policy, review the assignment shown on each service. Setting a policy as primary is not confirmation that every existing VPS has been changed.
  6. Test a new administrator connection and the real application, including its outbound dependencies. Use Save options for separate VM-firewall option changes when that control is shown.

Check: The intended policy is selected on the correct VPS and the required connections work. Applying a saved policy can replace rules; preserve any server-specific permissions you still need. Default (allow all) is permissive and should be a deliberate choice.

Common uses

Workload Practical approach
Public website Permit the required HTTP/HTTPS ports, restrict SSH/RDP to trusted administration sources, and use appropriate DDoS and website-protection controls.
Database Prefer private connectivity where available. Allow only the application servers that need the database port; avoid exposing it to every source.
Game or voice server Permit the application's actual TCP and UDP ports separately. TCP session controls do not configure a UDP service's access rules.
Monitoring or backups Include the real monitoring/backup source networks and required outbound dependencies before tightening defaults.

Allowing a network port does not install or start the application. A custom SSH port or alternative application port needs a matching rule; opening a commonly used default port is not enough.

Verify status and recover access

Synchronization pending, Propagating the rule or a saved-policy notice means that the requested state is not yet confirmed as applied. If status is stale or unavailable, the portal may pause edits; read the latest error instead of repeatedly submitting the same change. Power, backup, restore or other VPS operations can also temporarily pause firewall changes.

Symptom What to check
A connection times out The correct source address, rule order, defaults, all firewall layers, country restrictions and network reachability.
A connection is refused Whether the application is listening on that IP/port, and whether a rule or application actively rejects the connection.
An allow rule appears ineffective Earlier matching edge rules, Enforce versus Audit, VM/guest rules and independent restrictions.
Passed packets increase but the application fails Passed is an observation at one protection stage; verify later firewall stages, guest networking and the application itself.
Access was lost after an edit Keep console access, reverse the specific platform-rule change through the portal, and inspect the guest firewall if needed.

When contacting support, include the service ID, affected IP, protocol/port, source IP, exact time and timezone, and the displayed policy status. Omit passwords, private keys and application secrets.

Continue with VPS DDoS protection and traffic statistics or return to Manage a VPS.