For obscure reasons, I started a docker container from systemd. This container has a DHCP server in it.

I ran nmap -e eth0 --script=broadcast-dhcp-discover.nse from the command line outside of any docker container, which should broadcast a DHCP DISCOVER packet, and then report on the results.

When the container-with-DHCP-server ran from systemd, the nmap script got no answer. Editing the container's systemd unit file into a working shell script, the nmap script gets an answer from the DHCP server in the container.

What network settings/foul magic does systemd do? Why did my DHCP-server-in-a-container not respond to nmap when run from systemd? I did not change the container itself between in-systemd-attempt, and not-in-systemd-attempt.

This is on "CentOS Linux release 7.3.1611", the DHCP server is actually from a Go package, go.universe.tf/netboot/dhcp4, Docker version 17.05.0-ce, build 89658be, "systemd 219 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.