Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Squid - http_access deny all not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Fri Sep 09, 2005 5:27 pm    Post subject: Squid - http_access deny all not working Reply with quote

I have a curious problem with squid. At my old high school they have to machines.
Machine A - Mail, file, et al server. It has squid running but deny's all access except to those fortunate people (IP's). Running red hat (dont ask not my baby). 192.168.1.3:3128

Machine B - Proxy server. It has squid (192.168.1.4:port 3128) and dansguardian running (192.168.1.4:8080). Does the authentication through Machine A. Running Gentoo o///

Up until the other day you could not gain access to squid from port 3128 except for local host. All the comps are setup to use 8080. Now I did some testing with squid. If I formally declare:
ACL pc src 192.168.1.132
http_access deny pc

That pc is denied access through 3128 yet the others are still allowed through even though:
ACL localhost 127.0.0.1/255.255.255.255
http_access deny !localhost

ACL all src 0.0.0.0/0.0.0.0
http_access deny all

Now this was working up until the other day :( The same problem is being experienced on Machine A where people (IP's) that would and should fall under the deny all rule are not being blocked.

Can anyone speculate as to what may be causing this? I dont know if the [roblems are related but I suspect so.
Back to top
View user's profile Send private message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Sat Sep 10, 2005 5:22 pm    Post subject: Reply with quote

Anyone?
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Sat Sep 10, 2005 9:18 pm    Post subject: Reply with quote

the output of "grep http_access /etc/squid/squid.conf", please
Back to top
View user's profile Send private message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Sun Sep 11, 2005 11:23 am    Post subject: Reply with quote

grep acl /etc/squid/squid.conf result:
Quote:
acl internet proxy_auth REQUIRED
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8

acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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 Safe_ports port 901 # SWAT

acl purge method PURGE

acl CONNECT method CONNECT


grep http_access /etc/squid/squid.conf result:
Quote:
http_access allow manager localhost
http_access deny manager

http_access allow purge localhost
http_access deny purge

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow internet
http_access deny !localhost
http_access deny all
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Sun Sep 11, 2005 11:49 am    Post subject: Reply with quote

comment the "http_access allow internet" line and see if you still have access to the proxy.
Back to top
View user's profile Send private message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Sun Sep 11, 2005 6:51 pm    Post subject: Reply with quote

Ok cool, will do so tomorrow when I have access to the machine.
Back to top
View user's profile Send private message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Mon Sep 12, 2005 7:34 am    Post subject: Reply with quote

Hey mrness. There is no access at all through squid on port 3128 and dansguardian on 8080. So it would be safe to assume that the problem lies on the red hate machine where squid authenticates from?
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Mon Sep 12, 2005 8:07 am    Post subject: Reply with quote

access will be granted to authenticated users by "http_access allow internet" line, no matter what you put *after*.
if you want it to reject access based on IP address, you must add those lines *before* allow internet.
Back to top
View user's profile Send private message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Mon Sep 12, 2005 3:05 pm    Post subject: Reply with quote

The http_access allow internet is is used to do the proxy authentication of users. Squid should be blocked off to all requests coming in on port 3128 not from the localhost (dansguardian). All request should go through dans on port 8080 which is open to the network.
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Mon Sep 12, 2005 3:14 pm    Post subject: Reply with quote

...
http_access deny !localhost
http_access allow internet
http_access deny all
Back to top
View user's profile Send private message
Ravilj
Apprentice
Apprentice


Joined: 29 Jul 2004
Posts: 164
Location: ziig / #

PostPosted: Mon Sep 12, 2005 4:20 pm    Post subject: Reply with quote

Okay so I had the wrong order, I was allowing internet first than denying !localhost.

I changed got it working actually using:
Quote:
http_access allow internet localhost
http_access deny internet
http_access deny all


Thanks for the help mrness.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum