Squid proxy denies all

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

Anoniem: 457180

Topicstarter
Ik probeer een squid proxy server op te zetten in mijn persoonlijke testomgeving
Ik heb de standaard conf eruit gesmeten en via google minimum config gezocht.
Echter wordt er niets van traffiek toegelaten door deze proxy.
Dit terwijl ik als eerste rule in mijn config file allow_all vermeld.
Als test alle andere rules in comentaar gezet maar helpt niets.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ACL SECTION
#SAFE PORT SUBSECTION 
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
never_direct allow all

#MY LAN 
#acl local-Network src 192.168.1.0/24 # My lan Network

#ALLOW OR DENY ACCESS TO ACLs
http_access allow all
#http_access allow local-Network
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports
#http_access allow localhost manager
#http_access deny manager
#http_access allow localhost
#http_access deny all

#PORTS
http_port 3128

#CHROOT DIR
coredump_dir /var/spool/squid3

#CACHE REFRESH PATTERNS
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


Ik verwacht dus dat alles van traffiek wordt toegelaten.
Als ik mijn access.log bekijk zie ik dat alle GET-requests gedenied worden.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1408112829.553      0 192.168.1.2 TCP_DENIED/403 3651 CONNECT accounts.google.com:443 - HIER_NONE/- text/html
1408113182.669      0 192.168.1.2 TCP_DENIED/403 3764 GET http://bol.com/ - HIER_NONE/- text/html
1408113182.782      0 192.168.1.2 TCP_DENIED/403 3854 GET http://www.squid-cache.org/Artwork/SN.png - HIER_NONE/- text/html
1408113182.796      0 192.168.1.2 TCP_DENIED/403 3797 GET http://bol.com/favicon.ico - HIER_NONE/- text/html
1408113182.816      0 192.168.1.2 TCP_DENIED/403 3797 GET http://bol.com/favicon.ico - HIER_NONE/- text/html
1408113354.249      0 192.168.1.2 TCP_DENIED/403 3633 CONNECT aus3.mozilla.org:443 - HIER_NONE/- text/html
1408113357.815      0 192.168.1.2 TCP_DENIED/403 3770 GET http://belgie.be/ - HIER_NONE/- text/html
1408113357.953      0 192.168.1.2 TCP_DENIED/403 3856 GET http://www.squid-cache.org/Artwork/SN.png - HIER_NONE/- text/html
1408113357.962      0 192.168.1.2 TCP_DENIED/403 3803 GET http://belgie.be/favicon.ico - HIER_NONE/- text/html
1408113357.986      0 192.168.1.2 TCP_DENIED/403 3803 GET http://belgie.be/favicon.ico - HIER_NONE/- text/html
1408113418.186      0 192.168.1.2 TCP_DENIED/403 3645 CONNECT fhr.data.mozilla.com:443 - HIER_NONE/- text/html
1408113431.909      0 192.168.1.2 TCP_DENIED/403 4359 POST http://safebrowsing.clients.google.com/safebrowsing/downloads? - HIER_NONE/- text/html
1408113451.650      0 192.168.1.2 TCP_DENIED/403 3779 GET http://nederland.nl/ - HIER_NONE/- text/html
1408113451.831      0 192.168.1.2 TCP_DENIED/403 3859 GET http://www.squid-cache.org/Artwork/SN.png - HIER


Via google vind ik geen werkende oplossing, daarom dat ik hier mijn vraag lanceer.
Iemand die mij verder op weg kan zetten?

Acties:
  • 0 Henk 'm!

  • Keeper of the Keys
  • Registratie: Augustus 2002
  • Laatst online: 13-02 14:44
Waarom heb je de standaard eruit gegooid die werkt en heb je ook meteen documentatie bij....

Wat ik altijd doe met squid.conf is:
- ik ga uit van de standaard
- voeg mijn eigen dingen toe in het origineel met alle documentatie
- verplaats het origineel
- grep alleen de actieve regels naar een nieuwe squid.conf

Zo heb je aan de ene kant nog steeds een goed gedocumenteerd bestand en aan de andere kant ook een compact overzichtelijk bestand met alleen de instellingen die niet standaard zijn.

Ik vermoed dat squid om de een of andere reden niet matched op http_access allow all en aangezien de laatste actie nadat alle http_access regels zijn doorlopen zonder een match altijd de inverse is van de laatste regel wordt dus alles niet doorgelaten...

Deze conf werkt voor mij op een locatie:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
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 deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl nacht time 00:00-06:00 
acl nacht time 23:30-24:00
http_access deny nacht
http_access allow localhost
http_access deny all
http_port 3128
coredump_dir /var/spool/squid3
refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4320

Acties:
  • 0 Henk 'm!

  • Thc_Nbl
  • Registratie: Juli 2001
  • Laatst online: 21-05 22:24
een hele korte squid config en volgende keer even de orginele config kopieren b.v. naar *.org. ;-)

acl lan src 192.168.XXX.0/24
http_access allow lan
http_port 3128

## Safe Ports
acl SSL_ports port 443 # https
acl Safe_ports port 80 # http
acl Safe_ports port 443 # https

## wat meer prive internetten.
request_header_access Referer deny all
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access Cache-Control deny all
## en geen reclame meer.
acl block-sites dstdom_regex "/etc/squid3/acl/blocked-sites.txt"
acl ads dstdom_regex "/etc/squid3/acl/ads-blocked-sites.txt"
acl ads dstdom_regex "/etc/squid3/acl/ads-blocked-personallist.txt"
http_access deny ads
deny_info TCP_RESET ads
http_access deny block-sites

Je kan ook nog met icap er een virusscanner tussen hangen, dat heb ik ook gedaan.
hier kan je de ads lijst downloaden.
http://www.thedumbtermina...s/squidblockedsites.shtml

suc6.

ehhh.. noppes