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.
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!
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:
For the service that is listening on 4000, can you confirm what type of service is it?
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.