Where do you configure the IP addresses that are permitted to connect to a Rails app?
I have a simple rails application which I have inherited that runs in a development environment on Ubuntu 14.04.
It was working OK until recently when some changes were merged in from git. Now when I run rails s
the application appears to start thin as the server, as expected.
=> Booting Thin
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on localhost:3000, CTRL+C to stop
netstat shows that rails is in fact listening as expected
tcp 0 0 localhost:3000 *:* LISTEN
I can access the website ok from a browser on the server box using 127.0.0.1:3000
and all appears to work as it should. I can't access it from any other machine as a Connection Refused status is returned because rails is only allowing localhost on port 3000.
If I start Thin from the command line with thin start
it returns with a similar setup
>> Using rack adapter
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
But this time Thin is listening for connections from any IP and I can reach the site from another machine. There is a difference in behaviour between starting Thin on its own and starting Thin from rails although both are version 1.5.1. Something in the Rails config is constraining Thin to listen only for connections from localhost.
I have all up to date gems so far as I can tell. I thought the issue might be something to do with eventmachine, but I can't find anything.
Any advice appreciated.