Black Friday: 40% off for life · BLACKFRIDAY40Claim →
crabsmith Get started
Browse documentation
← All documentation

Firewall

On this page

Control which network ports are open on your server using Ubuntu's UFW firewall.

Enable the firewall

Server Firewall tab showing UFW status and allow rules

  1. Open your server's Firewall tab and click Turn on.
  2. Crabsmith installs UFW (if needed), allows your SSH port first so you don't get locked out, allows HTTP (80) and HTTPS (443), and blocks all other incoming traffic. Outgoing traffic stays allowed.

Note

Your SSH rule is locked so you can't accidentally lock yourself out. Remember that your cloud provider's external firewall (such as AWS Security Groups or Hetzner Cloud Firewalls) is separate and must also allow SSH and ports 80/443.

Add or remove rules

  1. Click Add rule and enter a port (for example 3306) or a port range (9000:9010), choose the protocol (TCP or UDP), and optionally restrict the source IP or CIDR.
  2. To allow traffic from another server in your workspace (for example, an app server connecting to a database server), choose Allow another server. Crabsmith automatically uses the private IP when both servers share a private network.
  3. Click Remove on any non-locked rule row to delete it.
  4. Click Apply all again anytime to reapply your saved rules. Any rules you added manually on the server stay visible in the live status and aren't removed.
  5. Click Turn off to disable UFW without losing your saved rules.

When something is still blocked

If a port is open in Crabsmith's Firewall tab but still unreachable from outside, check your cloud provider's external firewall or security group settings as well.