You are not logged in.

#1 2010-01-24 22:39:44

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

squid and shorewall

i've just finished the setup of a new arch box running as a router (NAT) for a small network
i've made it with shorewall, my box acts as a dns server ( bind ) and a dhcp server (dhcp )

i wanted to configure squid too for caching http traffic, i've figured out how to make it possible through shorewall
the last two lines of my shorewall config serve the accessibility of the proxy by my clients

but something seems strange to me:

if i specify the proxy in a web-browser, everything works fine
but if I don't ( as if I had no proxy at all ), the clients can stilll browse the web.

What do I miss, if I want that my clients cannot access the web without the proxy?

here is my /etc/squid/squid.conf:

CODE:
---------------------------------

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 192.168.0.0/24

acl SSL_ports port 443
acl Safe_ports port 80        # http
acl Safe_ports port 21        # ftp
acl Safe_ports port 443        # https
acl Safe_ports port 70        # gopher
acl Safe_ports port 210        # wais
acl Safe_ports port 1025-65535    # unregistered ports
acl Safe_ports port 280        # http-mgmt
acl Safe_ports port 488        # gss-http
acl Safe_ports port 591        # filemaker
acl Safe_ports port 777        # multiling http

acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny all
icp_access allow localnet
icp_access deny all

http_port 3128

hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
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
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
coredump_dir /var/cache/squid

visible_hostname archrouter

cache_mem 32 MB
shutdown_lifetime 10 seconds

---------------------------------------

and my /etc/shorewall/rules:

CODE:

--------------------------------------

#ACTION        SOURCE        DEST        PROTO    DEST    SOURCE        ORIGINAL    RATE        USER/    MARK
#                            PORT    PORT(S)        DEST        LIMIT        GROUP

#    Accept DNS connections from the firewall to the network

DNS(ACCEPT)    $FW        net
DNS(ACCEPT)    loc        $FW

#    Accept SSH connections from the local network for administration

SSH(ACCEPT)    loc        $FW
SSH(ACCEPT)    net        $FW

#    Allow Ping from the local network

Ping(ACCEPT)    loc        $FW

# Drop Ping from the "bad" net zone

Ping(DROP)    net        $FW

ACCEPT        $FW        loc        icmp
ACCEPT        $FW        net        icmp

# squid manual proxy on port 3128

ACCEPT        loc        $FW        tcp    3128
ACCEPT        $FW        net        tcp    80,443


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#2 2010-01-25 00:23:37

brenix
Member
From: California
Registered: 2008-03-05
Posts: 185

Re: squid and shorewall

Hmm.. same here.. I was able to render it by adding a shorewall rule to reject outgoing web traffic which forces the client to use the proxy, but I would think it should drop it if the rule doesn't exist..

Web(reject)     loc     net

Offline

#3 2010-02-08 06:46:28

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: squid and shorewall

SOLVED

I'm an idiot

have a look at /etc/squid/policy

the first line permitted any traffic to my clients - and again, document yourself ( myself ) before posting trash


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

Board footer

Powered by FluxBB