| Linode Forum https://forum.linode.com/ |
|
| Failed remote web connections https://forum.linode.com/viewtopic.php?f=19&t=11596 |
Page 1 of 1 |
| Author: | brogers [ Sat Feb 14, 2015 4:32 pm ] |
| Post subject: | Failed remote web connections |
hi: I'm trying to start a webserver (rails) on Ubuntu 14.04 LTS. It starts fine and responds fine to local wget/curl requests, but no remote requests (curl or browser). No error code - just failed connection. To eliminate variables, I'm using just the IP address (no DNS) over port 80, though I was ultimately planning to run on normal dev ports of 3000 or 8080. As I'm not 100% confident in the firewall settings, I first tried to temporarily disable/flush the rules with "sudo iptables -F", but still getting failure to connect in remote curl or browser. netstat -ltn shows: Code: b:~$ netstat -ltn iptables -L shows: Code: Chain INPUT (policy ACCEPT) Thanks in advance for your help. |
|
| Author: | db3l [ Sat Feb 14, 2015 5:31 pm ] |
| Post subject: | Re: Failed remote web connections |
brogers wrote: netstat -ltn shows: Code: b:~$ netstat -ltn Your server (the port 80 line above) is only listening on your localhost (127.0.0.1) address, thus it's impossible to contact it from the outside (firewall or not). It's probably a default "safe" setting in whatever setup you're using. You want that port 80 line to look more like your ssh (port 22) line below it "0.0.0.0" as the local address (or alternatively an explicit local address of your public IP). You need to adjust your configuration (either the rails app itself if its serving the port directly, or your front-end web server if not) to let it listen on either all of your addresses, or explicitly a selected public address, in addition to localhost. There's probably a configuration item somewhere for listen or local address to bind to. -- David |
|
| Author: | brogers [ Sat Feb 14, 2015 8:45 pm ] |
| Post subject: | Re: Failed remote web connections |
Thanks, David. That was it. For future reference for anyone else searching, the binding in rails is 'rvmsudo rails s -p80 --binding=0.0.0.0 |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|