LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-20-2012, 07:03 AM   #1
artaxerxe
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Rep: Reputation: Disabled
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?

Thanks.
 
Old 12-20-2012, 07:20 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by artaxerxe View Post
Is that possible through iptables?
How about using a proxy that times out requests after say 15 seconds?
 
1 members found this post helpful.
Old 12-20-2012, 07:21 AM   #3
artaxerxe
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-20-2012, 07:30 AM   #4
artaxerxe
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
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.

Thanks.
 
Old 12-20-2012, 08:47 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by artaxerxe View Post
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).
 
Old 12-21-2012, 01:47 AM   #6
artaxerxe
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
... 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.
 
Old 12-21-2012, 01:56 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I copied post #3 from a duplicate thread. You will probably apply the same solution to both which are variations on a theme.
 
1 members found this post helpful.
Old 12-21-2012, 10:13 PM   #8
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Rep: Reputation: 30
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
 
  


Reply

Tags
iptables, restrictions, timeout



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
Most Webpages take forever to load (Same on all browsers) XcyTheR Linux - Networking 16 10-15-2011 03:26 PM
I canīt load some webpages into the caffeine vizio Fedora 3 01-03-2007 09:43 AM
how can linux load webpages faster? fakie_flip Linux - Software 8 07-01-2006 12:54 PM
how can linux load webpages faster? fakie_flip Linux - Hardware 6 06-23-2006 09:58 AM
can't load webpages chrisrouleau Linux - Networking 4 01-02-2006 11:06 PM

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

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

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