signet help Open the console

Firewall

See a Linux device's firewall, and allow or deny incoming connections, without any risk to its link with the hub.

The Firewall tab on a device's page shows the device's ufw firewall: whether it is on, its rules, and the ports the device listens on. Operators and organization admins can add and remove rules, and turn the firewall on or off; everyone else can see it.

What the tab shows

  • On or off. When ufw is on, incoming connections no rule allows are dropped. When it is off, the rules are kept but nothing is filtered.
  • Rules: allow or deny, the protocol (TCP, UDP or both), the port, where connections come from, and a comment. A rule marked IPv4 only or IPv6 only covers one kind of address.
  • Locked rules (a crossed circle) were made over SSH with options the console does not change, such as outgoing rules or rules for one network interface. Hover to read why.
  • Listening on the network: each port a program listens on, and whether a rule lets it in from anywhere.
  • All rules in force: everything the system enforces, including rules made by other programs.

Change the rules

  1. Open the device, then the Firewall tab.
  2. To add a rule, choose Allow or Deny and the protocol. Type the port (22, a range such as 8000:8100, or a list such as 80,443), and where connections may come from (leave it empty for anywhere, or type an address such as 203.0.113.9 or a range such as 10.20.0.0/16). Then press Add. To remove a rule, press its bin icon; Undo brings it back.
  3. Changes wait in a list. Press Apply, check what will change, and enter the 6-digit code from your authenticator app. The device applies everything together, and the job's output shows each step.

Deny rules are placed before allow rules, so a deny always wins: allow SSH from anywhere, deny one address, and that address stays out.

Turning the firewall on

Once ufw is on, every incoming connection without an allow rule is dropped. Before it turns on, the tab lists the ports that are listening but would be closed, such as SSH or a web server. Tick the ones to allow, and Allow the ticked ones, then turn on adds a rule for each in the same Apply. DHCP and mDNS clients, and high ports the system hands out for outgoing traffic, start unticked: they rarely need a rule.

The device refuses to turn ufw on when that would also restrict its outgoing connections, through outgoing rules or an outgoing default saved earlier over SSH. It also refuses when the device routes traffic for other machines and ufw would start dropping that. Change those settings over SSH first; the job says which.

The console's SSH terminal keeps working even with SSH closed to the network: the agent reaches SSH on the machine itself.

Why a rule cannot cut a device off

The agent only ever connects out to the hub, and only incoming rules can be made here. ufw always lets in the replies to the device's own connections, so no rule here can reach the agent's connection.

The device also checks for itself. Before each change it opens a new connection to the hub; after the change it does it again. If the second connection fails, it puts the previous firewall back and reports the change as refused. If the agent stops halfway, it puts the firewall back when it starts again.

The hub's own machine is read-only, because its port is how every agent connects. Change its firewall over SSH.

Good to know

  • Changing rules needs a code from your authenticator app, as publishing a private network does. If you sign in with a password and have no codes yet, set them up under My account first. Signing in with an admin certificate needs no code.
  • Devices without ufw show their rules read-only. Install ufw (sudo apt install ufw) to manage them here. Windows and Android devices have no Firewall tab yet.
  • Private-network connections reach a machine on its own address, which these rules do not filter. Docker publishes container ports past them too.
  • A device can refuse firewall changes altogether: leave firewall out of SIGNET_JOBS in its agent settings (see Private networks for the full default list).
  • Every change is recorded in the audit log, with what it changed.

Questions? Write to support@signet-app.ie. Found a security issue? Report it privately.