0

I'm using a thin web server for my production ruby-on-rails app. I have a lighttpd frot-end for a 3 servers cluster.

Everything is ok, but all three servers are accessible from the outside world.

lighttp: port 80
thin1: port 3300 
thin1: port 3301 
thin1: port 3302

How could I limit the access to my thin servers from the outside world, permitting only access from the same ubuntu box (localhost- 127.0.0.1) ?

In my configuration file for thin server the address field its set to 0.0.0.0. I'd tested with 127.0.0.1 but doesn't work.

2
  • "but doesn't work" - in what way? Can you show the config file excerpts? What does netstat -an|grep 3300 show before and after changing it to 127.0.0.7. Is the 'thin' web server a product anyone might have heard of or is it really called thin? Jun 8, 2012 at 17:24
  • On ruby-on-rails if you use "gem thin" you get a web server called thin. (code.macournoyer.com/thin)
    – Juanin
    Jun 9, 2012 at 7:21

1 Answer 1

0

Forgetting configuration of the web services for the moment, the fact that you don't automatically block access to all ports on your server with iptables, and only allow ports you care about, is a worry.

So, lock down all external access to the server using a firewall (iptables), including rules to ensure 127.0.0.1 can always access everything. Then, you can take your time finding out how to limit your applications, but start at the network layer.

Obviously, test it completely first, because you don't want to lock yourself out.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .