r/docker • • 26d ago

NetAlertX Problems at Initially Starting the docker Container

[SOLVED] - The workaround is in the 1st reply

I'm starting with the docker compose setup of NetAlertX using the guide on the github page. It's a Rocky Linux 9.7 system that has been running a couple other docker containers without any issues.

The error message isn't too helpful:

[dockeruser@rocky-mini-01 NetAlert]$ docker compose up
Attaching to netalertx
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: sysctl "net.ipv4.conf.all.arp_announce" not allowed in host network namespace

I've been using docker for a while, but I am about an intermediate user at best. I can't tell if there are multiple errors listed here or just 1.

The last part is plain (runc create failed: sysctl "net.ipv4.conf.all.arp_announce" not allowed in host network namespace), but none of the remedies solve it. The compose.yaml file already has the "NET_ADMIN" and "network_mode: ${NETALERTX_NETWORK_MODE:-host}" and the entry for

sysctls:
net.ipv4.conf.all.arp_ignore: 1
net.ipv4.conf.all.arp_announce: 2

I've tried using:

sudo sysctl -w net.ipv4.conf.all.arp_ignore=1
sudo sysctl -w net.ipv4.conf.all.arp_announce=2

I've tried running the docker compose command as the dockeruser and root.

Literally, the only thing I changed from the NetAlertX compose file with the path:

# Example custom local folder called /home/user/netalertx_data

- type: bind
source: /mnt/disk/docker/NetAlertX/netalertx_data
target: /data
read_only: false

Any clues?

2 Upvotes

4 comments sorted by

1

u/Only-Stable3973 26d ago

I'm thinking open your compose file and look for this block and comment it out or remove it...sysctls: - net.ipv4.conf.all.arp_announce=2, then run this on your Rocky host ...sudo sysctl -w net.ipv4.conf.all.arp_announce=2, then to make that permanent use...echo "net.ipv4.conf.all.arp_announce=2" | sudo tee -a /etc/sysctl.conf. The other thing you could do is remove or comment out network_mode: "host" on your docker-compose.yml and add the ports but then you will be limited to limited scans.

1

u/ticedoff8 26d ago edited 26d ago

[EDIT]"... open your compose file and look for this block and comment it out or remove it...sysctls: - net.ipv4.conf.all.arp_announce=2, then run this on your Rocky host ...sudo sysctl -w net.ipv4.conf.all.arp_announce=2, then to make that permanent use...echo "net.ipv4.conf.all.arp_announce=2" | sudo tee -a /etc/sysctl.conf."

That got it running,

Thanks.