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 running Ubuntu and am setting up a development server for my website. I only want the IP from my workstation to be able to access the website. Is there anyway to setup a firewall rule for this?

Thanks Jason

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Yes. The typical way to do this would be in the web server's config; that's where I'd recommend putting it. For Apache:

Order deny,allow
Deny from all
Allow from 10.1.1.49

But, if you're inclined toward blocking connections altogether, you can do that, too. Ubuntu provides a simplified iptables interface called UFW:

sudo ufw enable
sudo ufw allow from 10.1.1.49 to any port 80/tcp
sudo ufw deny 80/tcp
share|improve this answer
    
I know iptables inside and out, but didn't know about ufw: learned something new today. It seems to be included in Debian Squeeze as well. packages.debian.org/squeeze/ufw –  Wim Kerkhoff May 7 '11 at 18:42

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.