Can't access sinatra server from other computers

515 Views Asked by At

I am running a sinatra server with shotgun that returns a hello world when request GET in the root (typical tutorial) and works perfectly in my computer. I could only access it from localhost:9393 and then i run it with -o 0.0.0.0 and could access it as IP:9393 but still only from the computer where the server was running.

How can i access the server from other computers? already tried bind 0.0.0.0 and environment production.

Thanks in advance.

1

There are 1 best solutions below

8
On

A bit more information is needed, like the OS that you are running and if you have made sure that any local firewalls are not blocking your traffic. I see that you marked this with the "Shotgun" tag which tells me that you are running on a *nix system as Shotgun uses forks and windows doesn't support them.

Check your iptables and see if you got anything in there. :)

iptables -nvL -t nat --line-numbers

iptables -nvL --line-numbers