LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-27-2014, 01:57 AM   #1
hmcarthur
LQ Newbie
 
Registered: Nov 2014
Location: South Africa
Distribution: Centos
Posts: 5

Rep: Reputation: Disabled
Question Access denied when running Squid 3 as a transparent proxy


Hey guys,

I could really use some help setting up Squid 3 as a transparent proxy. Right now the redirection results in me getting "Access Denied" messages from Squid.

To summarize my setup:
My router is PFSense
My proxy is Centos running Squid 3 and is a separate server located in our DMZ.

(Internet)
|
Router (PFSense)
+-------DMZ (My proxy with IP 192.168.10.10 is in this subnet)
+-------LAN (My LAN subnet 192.168.2.0/24 Clients are located here)

On my router I have created a port forward rule to redirect any traffic destined for port 80 from the LAN interface to port 3128 on 192.168.10.10

The rule looks like this:

IF: LAN
Proto: TCP
Src Address: LAN Network
Source Ports: *
Dest. Address: *
Dest. Ports: 80
NAT IP: 192.168.10.10
NAT Port: 3128

I am able to access the Internet from my proxy server (192.168.10.10) using links without any issue. DNS resolution is also functioning. Created a firewall rule using firewall-cmd to allow port 3128 incoming.

My squid configuration file is attached as squid.txt

When trying to access the Internet from one of the clients on the LAN I'm constantly presented with an "Access Denied" message from squid:

Log entries from access.log

1417069937.122 6 192.168.10.10 TCP_DENIED/403 4237 GET http://www.youtube.com/ - HIER_NONE/- text/html

1417069937.125 21 192.168.2.25 TCP_MISS/403 4335 GET http://www.youtube.com/ - HIER_DIRECT/192.168.10.10 text/html

From what I can tell the traffic is being transparently redirected to squid because I'm getting the HTML error page from Squid in the client browser - Access Denied.....Access control configuration prevents...

What I can't understand is why the traffic is being denied after I have allowed access from 192.168.2.0/24 in the Squid configuration?

I'd really appreciate some help on how to troubleshoot this further. I'm quite new to Squid so this might be a basic syntax error.

Many thanks!
Attached Files
File Type: txt squid.txt (1.3 KB, 126 views)
 
Old 11-27-2014, 03:28 AM   #2
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
Replace the config files in squid.conf :

# Squid ports
http_port 3128 intercept
http_port 8080


With the following

http_port 3128 transparent
http_port 3129 intercept
 
Old 11-27-2014, 06:35 AM   #3
hmcarthur
LQ Newbie
 
Registered: Nov 2014
Location: South Africa
Distribution: Centos
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for the help, I did as you suggested

# Squid ports
http_port 3128 transparent
http_port 3129 intercept

and restarted squid...
Unfortunately the result is the same.

The cache log though now states:
2014/11/27 14:30:58 kid1| ERROR: No forward-proxy ports configured.

The error in the access log is the same.

I thought "Intercept" and "Transparent" were the same thing?
 
Old 11-27-2014, 06:52 AM   #4
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 151

Rep: Reputation: 29
Try and put a hash infront of the intercept line and restart?
 
Old 11-27-2014, 06:59 AM   #5
hmcarthur
LQ Newbie
 
Registered: Nov 2014
Location: South Africa
Distribution: Centos
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi there,

Same result...Access denied.
 
  


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
transparent proxy with squid v 3.1.19 lindampofu Linux - Newbie 1 09-27-2012 04:37 AM
Squid transparent proxy astalavista2000 Linux - Server 3 11-20-2011 07:40 PM
Problems with squid running as transparent proxy Teres Linux - Networking 6 12-13-2006 08:06 PM
Squid as a transparent proxy kemplej Linux - Software 2 12-08-2004 05:00 PM
Squid with Transparent Proxy MarleyGPN Linux - Networking 1 08-28-2003 02:51 PM

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

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