Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

At home, I have Ubuntu server with the UFW firewall. What command do I type to turn on local intranet access to my web server, but keep the outside world out from my DSL modem?

share|improve this question
1  
sudo ufw allow from <ipaddress> to any port <port number> where <ipaddress> would be your internal network and <port number> your webserver port default is 80. –  Prix Aug 24 '10 at 23:06
add comment

migrated from serverfault.com Aug 25 '10 at 13:19

This question came from our site for professional system and network administrators.

2 Answers

I would guess something like: sudo ufw allow from 192.168.1.0/24 to port 80

share|improve this answer
add comment
$ sudo ufw default deny
$ sudo ufw enable
$ sudo ufw allow from 192.168.1.0/24 to any port 80

...where 192.168.1.* is my local NAT routing for my intranet (as in, my workstation is 192.168.1.5 and the subnet mask is 255.255.255.0.).

share|improve this answer
    
yes that is correct 192.168.1.0/24 you should aswell make use of proto tcp which will make it accept only the webserver protocol instead of all available. –  Prix Aug 24 '10 at 23:28
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.