Managing port access and OS-level firewall on your server

Default Port Access at Contabo

By default, Contabo does not restrict any port access. All servers come with full administrative permissions, meaning your server's network settings and firewall configuration are entirely up to you.


Contabo Firewall vs. OS-Level Firewall

Contabo offers two distinct layers of firewall protection. Understanding the difference helps you choose the right tool for your needs.


Contabo FirewallOS-Level Firewall
What it isA network-level feature provided by ContaboA firewall configured directly on your server's operating system
Where it runsOutside your server, at the network levelInside your server
Managed viaContabo Customer PanelCommand line (e.g. iptables, UFW) or OS tools
Applies toInbound traffic onlyInbound and outbound traffic
Available onVPS and VDS onlyAll servers (VPS, VDS, Dedicated)
Default stateInactive until enabled; blocks all inbound traffic once assignedActive on most OS installations by default
Outbound trafficUnrestrictedConfigurable


When to use which?

  • Use the Contabo Firewall if you want a simple, panel-managed solution to block unwanted inbound traffic before it even reaches your server.
  • Use an OS-level firewall if you need granular control, outbound rules, or are on a Dedicated Server where the Contabo Firewall is not available.
  • Both can be used together for layered security.


Managing Ports with iptables

To open a port:

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport <<PORT No.>> -j ACCEPT


To close a port:

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport <<PORT No.>> -j DROP


Verifying Your Configuration

Check that your services are running and listening on the correct ports:

netstat -tulpen


Review your active firewall rules:

iptables -nvL 


Testing Port Accessibility

Test whether a port is reachable from outside:

telnet IPv4_address_of_the_server port

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Can't find what you're looking for?