Search code examples
portiptablesbitnami

How to open and save ports for Bitnami's MEAN Stack


I'm trying to open and save ports on Bitnami's MEAN Stack.

Steps I've followed so far:

sudo iptables -A INPUT -i eth0 -p tcp --dport 3000 -j ACCEPT sudo su iptables-save > /opt/bitnami/iptables-rules iptables-restore < /opt/bitnami/iptables-rules sudo reboot

When I reboot, port 3000 is closed. Not sure what I'm doing wrong. Any help is greatly appreciated. Thank you.


Solution

  • I would recommend to use 'ufw' from Ubuntu. It is very simple to open a port and it preserves the configuration if you reboot the server.

    $ sudo ufw allow 3000