I want to open the port 8040 on my centos, but I keep getting connection refused.
This is what I have done:
iptables -I INPUT -m state --state NEW -p tcp --dport 8040 -j ACCEPT iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT /etc/init.d/iptables save sudo service iptables restart
sudo iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8040 acctboth all -- anywhere anywhere
telnet localhost 8040 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused
What else do I need to do?
I tried disabling iptables and selinux, I still get connection refused.