Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Hi all, was hoping someone could help me. I have an Ubuntu server running a transparent proxy and would like to restrict specific client machines to browsing only one website during work hours and only allow them unlimited browsing during lunch times, how do i do this, and can it be done without removing the transparent proxy.
I did find options to restrict by time, which I can do, I also found ways of restricting access to specific websites by creating a file with the list of the restricted sites, what I could not find, however, was how to block all sites (obviously I cant list them all) on specific IPs on a network and only allow access to one website.
I have to say replies on this forum are quite fast, many thanks.
Or maybe, is it possible if using squid would be a bit complicated to redirect all outgoing web traffic on those specific IPs to the particular website thats allowed access by using iptables
Last edited by magoretendai; 09-07-2016 at 04:08 AM.
Reason: Had a thought
So you need two ACLs and apply them in the following order:
allow the source machine(s) access to everything but with a time "windows".
allow the source machines(a) access only the specific site (by IP of the site or by dstdomain).
So what will happen is that during "happy hour" the time condition of the first ACL will match, so it'll be "active". When it's outside the "happy hour" the request will fall through to the next ACL where it'll only allow access to the matching IP or dstdomain or whatever other combinations you put in the ACL.
What you may be missing is how to combine conditions. Just give the conditions the same name in the ACL. So the example below creates a "happyhour" ACL that will match between 12:00 and 13:59 (Ok,it's 2 hours, sue me!) AND the client IP is within the given range.
Code:
acl happyhour time 12:00-13:59
acl happyhour src 192.168.1.100-192.168.1.110
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.