NGINX startup issue when IPv6 is disabled

On hardened systems where IPv6 is fully disabled, the nginx server in MetaDefender Sandbox might fail to start.

In this situation, docker ps shows that the reverse_proxy (nginx) container is restarting continuously every few seconds and other Sandbox containers can become unhealthy because of the failing reverse_proxy.

It is recommended to check the last few lines of the nginx error.log using this command:

Bash
Copy

If you see the Address family not supported by protocol error, the underlying issue can be addressed by enabling IPv6 on the system or by modifying the nginx default.conf file in /home/sandbox/sandbox/webservice/nginx/conf/production (the path might differ if you installed Sandbox to a different target directory).

If enabling IPv6 is not feasible, please open the nginx default.conf file using a text editor (e.g. nano, vi) and scroll down to locate the following section in the file:

Bash
Copy

Please add a # sign in front of the second listen directive to comment out that line and disable listening on IPv6.

The updated section should look like:

default.conf
Copy

Please save the file (Ctrl+O in nano) and exit the text editor.

Restart the sandbox service:

Bash
Copy

After this change, nginx should start without issues and the Sandbox webservice can function properly.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard