I'm trying to allow Internet traffic to port 7778 on my server, but am unable to do it correctly. Probably making some rookie mistake here. Can you help me diagnose and solve the issue?
I simply did the following:
sudo iptables -A TCP -p tcp -m tcp --dport 7778 -j ACCEPT
If I do iptables -S, I do see the rule appended in the list, e.g.:
-A TCP -p tcp -m tcp --dport 22 -j ACCEPT
-A TCP -p tcp -m tcp --dport 80 -j ACCEPT
-A TCP -p tcp -m tcp --dport 443 -j ACCEPT
-A TCP -p tcp -m tcp --dport 7778 -j ACCEPT
However, if I ping this particular port from another server - telnet example.com 7778, I see:
telnet: Unable to connect to remote host: Connection refused
What else can I do here? Port 80, 443 and 22 are working correctly FYI.
Note: my server uses Azure infrastructure (classic VM). An extra step I took was adding an endpoint for port 7778 in the Azure portal. Thus this part is covered.
iptables - nvL INPUT– user9517 Dec 22 '16 at 16:09telnet: Unable to connect to remote host: Connection refused. Very peculiar! – Hassan Baig Dec 23 '16 at 02:21fail2banhave anything to do with btw? – Hassan Baig Dec 23 '16 at 02:58