I'm currently using NetAlertX for network scanning, but I've learned that it needs to run in host network mode. I want my Nginx container to route traffic effectively to this NetAlertX container while also ensuring that it can't be accessed directly via IP and port by others. I've already set up an Nginx container for my other applications. Here's my Docker Compose setup for reference. Can anyone suggest how to configure this properly?
1 Answer
To route traffic from Nginx to your NetAlertX container, you could do a proxy pass using the Docker host's IP and port. However, if your containers are on the same private network, consider using a bridge network for communication instead. Just keep in mind, blocking direct access to the host's IP and port would require a firewall to restrict access from specific MAC addresses.

Just a heads-up, you can't place a container in a bridge network if it's already set to host network mode. Make sure to double-check your setup!