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
  Search this Thread
Old 12-08-2005, 09:50 AM   #1
OneSeventeen
Member
 
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41

Rep: Reputation: 16
Whitelisting websites in linux


Is it possible to whitelist URLs or IPs so when a user tries to connect to a webpage that is not in the allowed list they either get an error, or (prefferably) get redirected to an allowed web page that says "that site isn't allowed". But then when they go an allowed IP, everything works as usual.

I'd prefer to block all ports other than 80/443 and whatever SSH is

Here's my guess on how it should be done:

iptables {block all ports}
iptables {unblock ports 80, 443, and 22}
iptables {block all IPs}
iptables {unblock 111.111.111.*, 111.111.222.*, and 111.111.333.*}

If you know the syntax, please let me know, as this would be cool to have done. Users are getting way out of hand with our windows machines and messing everything up, so I'm trying to set up a linux box that will be as un-mess-upable as possible.
 
Old 12-08-2005, 11:29 AM   #2
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
Quote:
Originally Posted by OneSeventeen
Is it possible to whitelist URLs or IPs so when a user tries to connect to a webpage that is not in the allowed list they either get an error, or (prefferably) get redirected to an allowed web page that says "that site isn't allowed". But then when they go an allowed IP, everything works as usual.

I'd prefer to block all ports other than 80/443 and whatever SSH is

Here's my guess on how it should be done:

iptables {block all ports}
iptables {unblock ports 80, 443, and 22}
iptables {block all IPs}
iptables {unblock 111.111.111.*, 111.111.222.*, and 111.111.333.*}

If you know the syntax, please let me know, as this would be cool to have done. Users are getting way out of hand with our windows machines and messing everything up, so I'm trying to set up a linux box that will be as un-mess-upable as possible.
The quickest and simplest thing would be to install something like IpCop (www.ipcop.org). Self-installing firewall. Look in their forums for the 3rd party application to filter internet sites. I've used it in the past, and it was rather easy to install. Then you select what types of sites you want to block (porn, hate, sports, etc) and restart the engine. Poof. Now when someone goes to porn.com or whatever, they get redirected to an access denied webpage.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Useful websites to master Linux but not the UI. cigarstub Linux - General 5 09-19-2005 10:56 PM
postfix question - whitelisting wijnands Linux - Software 2 03-30-2005 03:28 AM
websites with linux software oasisbhrnw99 Linux - Software 5 10-15-2004 04:18 PM
Linux/C++ Freelance Websites. liguorir Linux - Software 1 07-08-2003 01:55 PM
Useful linux related websites antken Linux - General 9 10-22-2002 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration