Non standard HTTP port on ubuntu
I have an Ubuntu droplet
> uname -a
Linux MYHOSTNAME 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
I am trying to run a ruby webrick command line invocation to bind to port 9191.
> ruby -run -e httpd . -p9191
When I do this I am able to connect to the public IP of the host using curl
or telnet
from the droplet itself, but not from other hosts.
> curl -X GET http://MYIPADDRESS:9191
curl: (7) Failed to connect to MYIPADDRESS port 9191: Connection refused
If I change the webserver command to port 80
> ruby -run -e httpd . -p80
Then it works. What is different about port 80 in this case? How can I enable HTTP traffic to port 9191 from the outside world.
BTW iptable does not seem to have any rules setup
> iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination