LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-03-2007, 11:43 AM   #1
E_l_d_o
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
how to block internet access?


How could I block access to all internet pages, and leave access to some pages which i define...

I am trying to build an info point on a computer so people could read news from 2 or 3 internet sites.. but i nead to prevent acces to all other internet sites.. How do i do that? on firewall level or do i nead surten application, or do I just have to write something in file somewher in etc...

thanks
 
Old 05-03-2007, 12:13 PM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
The quickest & dirtiest method I can think of is to use firewall rules (policies, actually) to prevent traffic to/from everywhere except for those few sites. This is easy if there are only 2-3 (or let's say less than 10) ip addresses, but if there are more then you might want to do something else. Also this is probably a lot more effective than using some userlevel program, because the firewall which hopefully works on lower level effectively prevents all kind of traffic except what you want to pass.

So, for example with iptables you'd set the input/output/forward policies to drop and then add some rules to allow traffic to and from the few ip addresses of those sites you want to grant access to.

EDIT: note that if one of those sites included a way to show content from other sites, I'm not sure this works. Or said the other way around, there may be holes in this method but the good thing is that (at least if the system is configured in a sane way) only administrator can control the firewall, so it's not easy to directly break the rules.

Last edited by b0uncer; 05-03-2007 at 12:16 PM.
 
Old 05-03-2007, 12:39 PM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 169Reputation: 169
You could also run your own DNS server and only define the ips that you want. They could still get any site using the IP but very few people will do this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need help... how to block internet access... E_l_d_o Linux - General 3 05-03-2007 12:00 PM
by using iptables block mac address to restric user to access internet Farrukh Fida Linux - Networking 3 10-09-2006 07:59 AM
apache for intranet use only - can i block internet access? pulper Linux - Server 3 08-27-2006 06:39 AM
Block internet access for windows machines Jeeves Linux - Security 5 08-26-2005 03:54 PM
access the block website by certain IP space_beyond Linux - Security 1 06-03-2005 12:33 AM


All times are GMT -5. The time now is 01:19 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration