We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

[Ubuntu] Opening ports


alvaroag
19-02-2017, 01:20
Use shorewall or firehol instead of spare iptables commands. It's much more efficient and secure.

Also, ensure your app is listening on "0.0.0.0" instead of "127.0.0.1".

helldesigin
18-02-2017, 22:04
Hi guys,

I need these two ports open: 3724 and 8085 on my Ubuntu VPS. I've used these commands in the console:

Code:
iptables -A INPUT -p tcp --dport 3724 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp --dport 3724 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 8085 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp --dport 8085 -m state --state NEW,ESTABLISHED -j ACCEPT
also
Code:
sudo iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 8085  -j ACCEPT
but it seems the ports are still closed...

Do you have an idea how to open them? Thank you.