Skonfigurowałem Squida, przed uruchomieniem chciałbym zasięgnąć waszych porad i ustrzec się ewentualnych błędów. Proszę o skomentowanie i ewentualne jakieś poprawki.
Mój cel: Wszystko co wychodzi z 192.168.0.0/24 portem 80 przez mój serwer (192.168.0.1) ma być od tej pory przepuszczane przez squida. Nie chciana konfiguracja czegokolwiek na komputerach użytkowników (transparentność).
squid.conf:
Kod: Zaznacz cały
http_port 8080 transparent
cache_mem 64 MB
cache_swap_low 90
cache_swap_high 95
minimum_object_size 0 KB
maximum_object_size_in_memory 1 KB
maximum_object_size 1024 MB
maximum_object_size_in_memory 5 MB
cache_replacement_policy lru
memory_replacement_policy lru
refresh_pattern -i \.(gif|jpg|jpeg|png|html|bmp) 0 50% 7200 reload-into-ims
refresh_pattern -i \.(zip|gz|bz2|exe|rar|mp3|mpg|avi|wmv|vqf|ogg) 43200 100% 43200 reload-into-ims
refresh_pattern . 0 20% 4320
cache_dir ufs /media/hdb1/ 3500 16 256
cache_log /dev/null
cache_store_log none
dns_nameservers 192.168.0.1
visible_hostname IBM
half_closed_clients off
forwarded_for off
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
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
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
# Definiujemy naszą sieć i dopuszczamy ją do proxy
acl our_networks src 192.168.0.1/24
http_access allow our_networks
# Blokada nie mojej sieci
http_access deny all
Kod: Zaznacz cały
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080