I've built an application that listens on the localhost address and a specific port, lets say port 11001. Its on a remote machine with CentOS. I currently have a python script on my local machine that I'm using to communicate with the application.
I've never been able to connect to the application from my local machine. I've tried using netstat, nc, etc to no avail. I've tried to connect from other machines. I can successfully ping the remote machine from my local machine and the others I've tried to connect from but I'm unable to reach my application. I'm pretty sure the IP and port number I'm connecting to is the one that the remote application uses.
Here's the error I'm getting from the python script:
error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I'm also able to SSH into the server but not able to connect to the remote application. I can only assume that I need to do some sort of configuring on the machine for the application.
How do I allow remote connections to the my custom application?
EDIT: The problem was iptables. I just had to configure the iptables to accept requests from the port.