PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Squid - Dateien sperren



kinghasi
15.10.03, 10:16
Kann man im Squid den Download/Zugriff von zB *.scr Dateien sperren?

Wenn ja, wie?

LG

Thomas

Liberace
15.10.03, 10:36
Indem du eine ACL erstell im Stil von:


ACL scr urlpath_regex scr
http_access deny scr

Gruss
Liberace

kinghasi
15.10.03, 11:35
http://www.linux-systems.at/bug.scr

Ich werde immer noch gefragt ob ich die Datei downloaden will.

Muss der Eintrag an einer bestimmten Stelle erfolgen?

acl all src 0.0.0.0/0.0.0.0
acl websrv src 10.114.1.154/255.255.255.0
acl local dst "/etc/squid/loc-dest-good"
acl urlgood dstdomain "/etc/squid/url-good"
acl tcpgood src "/etc/squid/tcp-good"
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 563
acl Safe_ports port 21 70 80 210 563 1025-65535
acl CONNECT method CONNECT
acl vb-intranet dst 10.117.225.0/255.255.255.0
acl urlbad dstdomain flirtbazar.com websingles.at
acl FTP proto ftp
acl viruskiller dstdomain symantec.com

http_access allow manager localhost
http_access allow manager websrv
http_access allow local
http_access allow vb-intranet
http_access deny urlbad
http_access allow FTP viruskiller
http_access allow tcpgood !urlgood
http_access allow urlgood
http_access deny manager
http_access allow CONNECT !SSL_ports
http_access allow !Safe_ports
http_access deny all


Wo soll ich die Einträge machen???

Danke!

Thomas

Liberace
15.10.03, 11:40
Ich wuerde es so machen:

acl all src 0.0.0.0/0.0.0.0
acl websrv src 10.114.1.154/255.255.255.0
acl local dst "/etc/squid/loc-dest-good"
acl urlgood dstdomain "/etc/squid/url-good"
acl tcpgood src "/etc/squid/tcp-good"
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 563
acl Safe_ports port 21 70 80 210 563 1025-65535
acl CONNECT method CONNECT
acl vb-intranet dst 10.117.225.0/255.255.255.0
acl urlbad dstdomain flirtbazar.com websingles.at
acl FTP proto ftp
acl viruskiller dstdomain symantec.com
ACL scr urlpath_regex scr

http_access deny scr
http_access allow manager localhost
http_access allow manager websrv
http_access allow local
http_access allow vb-intranet
http_access deny urlbad
http_access allow FTP viruskiller
http_access allow tcpgood !urlgood
http_access allow urlgood
http_access deny manager
http_access allow CONNECT !SSL_ports
http_access allow !Safe_ports
http_access deny all

kinghasi
15.10.03, 12:14
DANKE!!!

Jasper
15.10.03, 14:05
das macht probleme:

ACL scr urlpath_regex scr

damit blockst du alles, wo in der uri 'scr' vorkommt, bspw. aus

/foo/scripts/bar

besser ist:

acl scr urlpath_regex \.scr$

dann muss man nur noch uri der form /foo/bar/bad.scr?bla blocken, da ansonsten extrem einfach die regel umgangen werden kann.

-j

Liberace
15.10.03, 14:13
Klar, habe ich nicht bedacht. Tschuldigung. :D

Gruss
Liberace