Skip to content

Instantly share code, notes, and snippets.

@deploy595
deploy595 / main.md
Last active June 8, 2025 06:53
Block all outgoing connections from inside a docker container except http(s) and smtp using firewalld (fixin' Hetzner netscan abuse)

Install, start and enable:

  apt install firewalld
  systemctl start firewalld 
  systemctl enable firewalld

Make sure the file /etc/docker/daemon.json does not contain this line. If it does, delete/comment it. If the file is missing, it is OK, you can skip the step:

{