# Open a port in the firewall

A new server lets in SSH and web traffic on ports 80 and 443, and nothing else. Outgoing traffic is never blocked, so apps can reach package registries, GitHub and other services.

## Open a port

1. Open the server's **Hardening** tab.
2. Under the firewall, pick **Allow**, enter the TCP port, and add an IP address if only that address should get in.
3. Choose **Apply**. The rule takes effect once the server confirms it.

## Close a port

Remove the rule that opened it, or add a **Deny** rule for the port.

Coresmith won't deny the SSH port it uses, since that would lock it out. On the machine Coresmith itself runs on, it won't deny 80 or 443 either, because that's how people reach Coresmith.

## Rules you add on the server

Rules you add on the server yourself, outside Coresmith, stay as they are. Coresmith only changes the rules it made.

## HTTP/3

Browsers load pages faster over HTTP/3 when the server lets it through. Servers set up before Coresmith 0.8.17 don't, and their **Hardening** tab shows **Browsers can use HTTP/3** as off. Choose **Open it** on that row.

## Apps without a domain

- **Preview without a domain** opens a port for the app while the switch is on, and closes it again when you turn the switch off. The app's page shows the address.
- **Reachable on your tailnet** doesn't open anything. Let your tailnet through the server's firewall yourself. On Ubuntu and Debian, run `sudo ufw allow in on tailscale0` on the server.

[Add a domain](/docs/apps/domains#without-a-domain) covers both switches.

## IPv4 through another server

A server that takes visitors in for others gets UDP 51871 opened for the link, and closed again once no server comes through it. [Take IPv4 visitors through another server](/docs/servers/ipv4-through-another-server).

## Your provider's firewall

If your provider has a firewall in front of the server, open the same ports there too.
