LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-09-2015, 08:52 AM   #1
prasadyv
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Rep: Reputation: Disabled
strip http referer header with squid proxy


I have figured out how to remove Referer from header for request going to a destination, as under:

acl referer_allowdst dstdomain google.com
header_access Referer deny referer_allowsrc

Is it possible to deny this selectively for sites originating the referer? I don't want to do it for all sites using the proxy.
Example - referrer should be stripped for xyz.abc.com and 123.abc.com referring to google.com, not other sites like pqr.abc.com, pbs.abc.com etc.,
 
Old 01-12-2015, 03:54 AM   #2
prasadyv
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
I have this figured out, we can use the referer_regex ACL available in Squid.
For the above mentioned requirement, the rule is like this

acl denysource-domain referer_regex -i ^http://xyz.abc.com
header_access Referer deny denysource-domain
 
  


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
How to block HTTP requisitions with invalid/blank http referer field brgsousa Linux - Software 2 10-18-2010 02:49 PM
Requested site not shown in HTTP Referer chuafengru Linux - Newbie 1 07-14-2010 12:16 AM
fedora as http proxy (squid?)?? jjd228 Linux - Newbie 3 04-09-2008 02:43 PM
Squid proxy server 2.5 not accessing http A Simple Noob Linux - Server 2 11-10-2007 03:52 PM
Referer HTTP Headers and Squid win32sux Linux - Networking 0 09-17-2005 03:02 PM

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

All times are GMT -5. The time now is 04:38 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