Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

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 127.0.0.7. 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. (code.macournoyer.com/thin) –  Juanin Jun 9 '12 at 7:21
add comment

1 Answer 1

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.

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

Your Answer

 
discard

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.