Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

How to Block all websites except one website in a LAN of Ubuntu 11.10 Clients ?

share|improve this question
up vote 4 down vote accepted

One of the simplest ways is to set up a squid proxy, and put rules in place to allow only the site you want. Then block access to all ports on your firewall for LAN PCs (you may need to consider if your clients need to access any other internet services). Finally, push out proxy info using wpad.dat or dhcp option 252, both of which should work for linux I believe.

A bit more info about your scenario would help tailor a better solution.

share|improve this answer
Actually we are organising exams and we want that students should open only our one website and they can not search anything on internet. – Naval Saini Jun 2 '12 at 10:18
Proxy sounds perfect for this to me. Just create some ACL's in Squid. – boburob Jun 2 '12 at 10:20
thanx boburob and Tom Newton i'll try – Naval Saini Jun 2 '12 at 10:31
Sounds like a plan then - they won't need email etc. you can just lock the firewall right down. Take care that you unblock the whole exam site and any sites eg. cdns which it may use. – Tom Newton Jun 2 '12 at 19:17

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.