Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-08-2005, 09:50 AM
|
#1
|
Member
Registered: Oct 2004
Location: Albuquerque, NM
Posts: 41
Rep:
|
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.
|
|
|
12-08-2005, 11:29 AM
|
#2
|
QmailToaster Developer
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|