Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-09-2015, 08:52 AM   #1
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
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 and referring to, not other sites like, etc.,
Old 01-12-2015, 03:54 AM   #2
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 ^
header_access Referer deny denysource-domain


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration