Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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- ?

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

share|improve this question
"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 Is the 'thin' web server a product anyone might have heard of or is it really called thin? – EightBitTony Jun 8 '12 at 17:24
On ruby-on-rails if you use "gem thin" you get a web server called thin. ( – Juanin Jun 9 '12 at 7:21

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 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.

share|improve this answer
I'll check it. Thanks. – Juanin Jun 9 '12 at 7:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.