Skip to content

Ports and firewall

Decoy ports

Role TCP UDP
windows-file-server 135, 139, 445, 3389
windows-domain-controller 53, 88, 135, 139, 389, 445, 464, 636, 3268, 3269, 3389 53, 88, 123, 137, 389
linux-web-hosting 22, 80, 443
ftp-backup-server 21, 22
linux-dns-server 22, 53 53

Each decoy answers only on the IP of its own interface.

Admin ports (manager)

Port Default Answers
Web UI (HTTPS) random port, 49152 to 64999 (--ui-port) management interface only, web UI allow-list
Sensor API (HTTPS) random port, 49152 to 64999 (--sensor-port) management interface only, sensor API allow-list
Host SSH 22, or a random port when a decoy shares the management interface (--ssh-port) management interface only, SSH allow-list

The ports are printed at the end of the install, saved in INSTALL-INFO.txt and shown in the SSH login banner.

The host firewall

The installer writes firewall.sh (iptables and ip6tables). The redpot service applies it at every start and removes it on stop and uninstall.

  • Decoy interfaces: only that decoy's ports answer. Everything else gets the reply of a closed port (TCP reset, ICMP port unreachable), on IPv6 too, and the interface answers ARP only for its own address. This hides all other host services on that interface, including the management interface when a decoy shares it.
  • Admin ports: only on the management interface, and only to their allow-lists.
  • No routing for decoy LANs: forwarded traffic arriving on a decoy interface is refused, and traffic into a Docker network is accepted only for published ports. A route to the console container's own address through the decoy's IP gets a TCP reset.
  • Egress guard: decoy processes may only reply to connections and report to the manager's sensor API. Anything else (the web UI, 127.0.0.1, the LAN, the internet) is refused. The one exception is the NetBIOS name-service answer: small UDP packets from port 137, out of the decoy's own interface to a host in that interface's subnet, never to port 53.
  • TTL 128 for Windows decoys: like real Windows (Linux uses 64). If a Windows decoy shares the management address, the manager's own traffic from that address also leaves with TTL 128, which is harmless. Kernels without the xt_TTL module print a warning and keep TTL 64.

Fail-closed behaviour

firewall.sh apply checks that every chain is hooked (iptables, ip6tables while IPv6 is on, DOCKER-USER or FORWARD). If a chain cannot be hooked it exits with an error that names the chain and removes its rules again. The self-test shows whether the firewall is in effect.

  • The installer checks these prerequisites before it changes anything on the host. If apply still fails during the install, the decoys are not started.
  • Rules are swapped make-before-break: the new set is built next to the one in effect and hooked only when complete; a failed build is dropped and the previous rules stay.
  • add-decoy / remove-decoy: if the new rules cannot be applied, the previous rules are put back and the change is not started. If that fails too, the whole stack is stopped.
  • At every start, the redpot service stops its containers, applies the firewall, and only then starts them. If apply fails, the containers stay stopped.

One remaining window

After an unclean shutdown (power loss, VM reset), Docker restarts the containers by itself when it starts, and they run without the firewall until the redpot service starts after the network is online (usually seconds, up to about two minutes).

Host services and SSH

  • Other services listening on a decoy's address (MySQL, nginx, Cockpit ...) are listed at install time and offered to be stopped, because a "Windows DC" with MySQL would give itself away. Uninstall turns them back on.
  • When host SSH moves, it listens on the new port first and keeps your session open. The installer handles ssh.socket on Ubuntu 22.10+, extra Port lines in sshd_config.d, and systemd's restart rate limit; uninstall moves SSH back to 22.

Enterprise feature: available in ReD-Pot Enterprise

Custom TLS certificates. Community Edition uses the certificate the installer generates for the manager. Enterprise can also use your own certificate (for example from your company CA) for the web UI.

About ReD-Pot Enterprise · Compare editions · Contact us for a licence