Restrict access to webpages that needs to load more than a few seconds (let's say 20)
Linux - NetworkingThis 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.
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.
Restrict access to webpages that needs to load more than a few seconds (let's say 20)
Currently I need to set on my server (CentOS 6.2) a way to restrict for some users access to pages that take more than 10 or 20 seconds to load. Is that possible through iptables? Or what suggestions do you have for this? Are there other ways to get this done?
Restrict access to webpages that needs to load more than a few seconds (let's say 20)
I'm trying to put some restrictions for specific users on my LAN. So I need to restrict access to a webpage for a specific user. What suggestions do you have for this? Is that possible through iptables (remember: restrict on webpage, not on IP)? I know that can be possible through squid (for the whole lan I think), but I would be more glad to implement it through iptables or something like this if possible.
How about using a proxy that times out requests after say 15 seconds?
I don't know exactly how to do that with squid, but after some research I guess I will get it (if have some hints, you can guide me). I'm just wondering if it's possible to do that with iptables. Probably in some contexts it will be more comfortable for me. I'm looking for possibilities that I have.
I'm just wondering if it's possible to do that with iptables. Probably in some contexts it will be more comfortable for me.
Yes,you can probably get the iptables string match module to block something but basically Netfilter concerns itself only with what the network layer holds. Making it do things it wasn't meant for is inefficient (filter-wise it will always be incomplete), circumventable (you won't be able to get all the permutations in anyway) and it'll be a complete performance drain. In short: worse than a kludge. Maybe there's more to all of this but I shouldn't have to ask you again to be detailed and verbose about things, unless you want to show you haven't learned from your previous thread (about a month ago).
... making it do things it wasn't meant for is inefficient (filter-wise it will always be incomplete), circumventable (you won't be able to get all the permutations in anyway) and it'll be a complete performance drain... In short: worse than a kludge.
Thanks. That's what I needed to know. At least for now.
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196
Rep:
If the web page is a php page, then you can put some logic at the top of the page to check for the IP address accessing it and redirect them out of there to another page.
Also, if the web server is apache, then you can use mod_rewrite to redirect IP addresses out of particular areas of the website.
Last edited by tonyfreeman; 12-21-2012 at 10:18 PM.
Reason: added apache info
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.