I have been trying to setup a transparent proxy with squid on UCS 4.3 and I’m running into some problems.
I’b trying to access the squid interface at port 3128 and I’m getting an access denied page. I’ve setup all of my networks and yes my computer I’m accessing port 3128 is in one of those localnets listed in the conf file attached below.
It’s also unclear as how to setup the network interfaces. Is all traffic going to route through the sever so I have to have one NIC on the local network and the other outside? I have enabled echo “net.ipv4.ip_forward = 1” >> /etc/sysctl.conf and then sysctl -p which tells me I need to put this device inline with the traffic that leaves our switch and the filter (also setup as a transparent device) and firewall (which performs our NAT). From our current configuration of the filter and firewall both NICs if they had IPs would be on the same network, but on our filter I only have to set one NIC (the port facing the local networks) with an IP address and the other side connects to the firewall.
(Local networks) --> (UCS Squid) --> (Filter) --> (Firewall) --> Internet
#Warning: This file is auto-generated and might be overwritten by
# univention-config-registry.
# Please edit the following file(s) instead:
#Warnung: Diese Datei wurde automatisch generiert und kann durch
# univention-config-registry ueberschrieben werden.
# Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
#
# /etc/univention/templates/files/etc/squid/squid.conf
#
include /etc/squid/local.conf
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_dir ufs /media/squidcache/cache 512 16 256
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
# Adapted from squeeze default configuration
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
# debug options
debug_options ALL,1
http_port 3128 transparent
########
# ACLs #
########
# default
# ACLs all, manager, localhost, and to_localhost are predefined.
acl purge method PURGE
acl CONNECT method CONNECT
acl web_ports port 80
acl web_ports port 21
acl web_ports port 8530
acl web_ports port 8531
acl web_ports port 8088
# network ACLs
acl localnet0 src 172.16.0.0/21
acl localnet1 src 192.168.16.0/20
acl localnet2 src 192.168.0.0/24
acl localnet3 src 10.0.100.0/24
acl localnet4 src 172.16.0.0/21
acl localnet5 src 172.16.8.0/22
acl localnet6 src 172.16.14.0/24
acl localnet7 src 172.16.24.0/23
acl localnet8 src 172.16.49.0/24
acl localnet9 src 172.16.50.0/24
acl localnet10 src 172.16.51.0/24
acl localnet11 src 172.16.52.0/24
acl localnet12 src 172.16.53.0/24
acl localnet13 src 172.16.54.0/24
acl localnet14 src 172.16.55.0/24
acl localnet15 src 172.16.56.0/24
acl localnet16 src 172.16.57.0/24
acl localnet17 src 172.16.58.0/24
acl localnet18 src 172.16.59.0/24
acl localnet19 src 172.16.60.0/24
acl localnet20 src 172.16.61.0/24
acl localnet21 src 172.16.62.0/24
acl localnet22 src 172.16.63.0/24
acl localnet23 src 172.16.64.0/24
acl localnet24 src 172.16.65.0/24
acl localnet25 src 172.16.66.0/24
acl localnet26 src 172.16.67.0/24
acl localnet27 src 172.16.68.0/24
acl localnet28 src 172.16.69.0/24
#############
# user ACLs #
#############
#########
# rules #
#########
include /etc/squid/local_rules.conf
# default rules
# Only allow cachemgr access from localhost
http_access deny !web_ports
http_access allow localhost manager
http_access deny manager
http_access allow purge localhost
http_access deny purge
# deny from user ACLs
# allow from user ACLs
# allow access based on networks
http_access allow localhost
http_access allow localnet0
http_access allow localnet1
http_access allow localnet2
http_access allow localnet3
http_access allow localnet4
http_access allow localnet5
http_access allow localnet6
http_access allow localnet7
http_access allow localnet8
http_access allow localnet9
http_access allow localnet10
http_access allow localnet11
http_access allow localnet12
http_access allow localnet13
http_access allow localnet14
http_access allow localnet15
http_access allow localnet16
http_access allow localnet17
http_access allow localnet18
http_access allow localnet19
http_access allow localnet20
http_access allow localnet21
http_access allow localnet22
http_access allow localnet23
http_access allow localnet24
http_access allow localnet25
http_access allow localnet26
http_access allow localnet27
http_access allow localnet28
# deny the rest
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
forwarded_for off
# this must be the last directive
include /etc/squid/local_bottom.conf