Question

WAF is blocking traffic

So I tried setting up a web access firewall. On the first firewall, all ports were open. I changed it to SSH 22, port 4000 (webserver), 27017(modgod and mongose). The mobile app isn’t able to connect. What step am I missing? When I’ve done an nmap and netstat scan the ports are said to be closed.


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 28, 2022

Hi there,

In order for you to be able to access those services externally, besides allowing the ports via your firewall, you need to make sure that they bind on 0.0.0.0 rather than 127.0.0.1.

You can verify if this is the case with the following command:

netstat -plant | grep 4000

For example, if you want to access your MongoDB externally, you can do that by following the steps here:

https://www.digitalocean.com/community/tutorials/how-to-configure-remote-access-for-mongodb-on-ubuntu-20-04

For the service that is listening on 4000, can you confirm what type of service is it?

Best,

Bobby