Squid3 постоянно режет трафик http?
Добрый день, есть офис в качестве шлюза выступает ubuntu 14 serv, на нем поднят squid3. С недавнего времени squid начал блокировать сайты которые работают по http. Очистка кэш-а помогла на некоторое время, сейчас вообще ничего не помогает, отрабатывают только https сайты. Что можно поправить?
Конф squid3
#url_rewrite_program /usr/bin/squidGuard
#url_rewrite_children 10
cache_mem 300 MB
maximum_object_size_in_memory 10 MB
memory_pools on
memory_pools_limit 30 MB
cache_dir ufs /var/spool/squid3 6000 16 256
http_port 3128 transparent
acl office src 10.49.1.0/24
#ac1 NOCACHEDOMAIN dstdomain mafia.ua deny NOCACHEDOMAIN
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 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 office
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
hierarchy_stoplist cgi-bin?
access_log /var/log/squid3/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern. 0 20% 4320
coredump_dir /var/spool/squid3
Конф iptables
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 4491 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i $TUN_IF -j ACCEPT
iptables -A INPUT -i $INT_IF1 -j ACCEPT
iptables -A INPUT -i $GUEST_IF -s $GUEST_NET -j ACCEPT
iptables -A INPUT -j LOG --log-prefix INPUT_ -m limit --limit 5/min
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
#socseti
# iptables -A FORWARD -m string --string «vk.com» --algo kmp --to 65535 -j DROP
# iptables -A FORWARD -m string --string «vkontakte.ru» --algo kmp --to 65535 -j DROP
# iptables -A FORWARD -m string --string «facebook.com» --algo kmp --to 65535 -j DROP
# for i in 87.240.128.0/18 217.20.144.0/20 173.194.113.0/24 173.252.64.0/18; do iptables -A FORWARD -i $INT_IF1 -s $INT_NET1 -d "$i" -j DROP; done
#socseti
iptables -A FORWARD -i $TUN_IF -o $INT_IF1 -j ACCEPT
iptables -A FORWARD -i $INT_IF1 -o $TUN_IF -j ACCEPT
iptables -A FORWARD -i $INT_IF1 -o $EXT_IF1 -j ACCEPT
iptables -A FORWARD -i $GUEST_IF -s $GUEST_NET -d mail.shf.com.ua -j ACCEPT
iptables -A FORWARD -i $GUEST_IF -o $EXT_IF1 -j ACCEPT
iptables -A FORWARD -j LOG --log-prefix FORWARD_ -m limit --limit 5/min
#unifi
iptables -A FORWARD -d 10.49.1.2 -p tcp -m multiport --dports 8443 -j ACCEPT
iptables -t nat -A PREROUTING -i $INT_IF1 -s $INT_NET1 -p tcp --dport 80! -d 192.168/16 -j REDIRECT --to-port 3128
## NAT Prerouting
iptables -t nat -A PREROUTING -p tcp -d x.x.73.197 --dport 8443 -j DNAT --to-destination 10.49.1.2:8443
iptables -t nat -A POSTROUTING -s $INT_NET1 -o $EXT_IF1 -p icmp -j MASQUERADE
iptables -t nat -A POSTROUTING -s $INT_NET1 -o $EXT_IF1 -p tcp -j MASQUERADE
iptables -t nat -A POSTROUTING -s $INT_NET1 -o $EXT_IF1 -p udp -j MASQUERADE
iptables -t nat -A POSTROUTING -s $GUEST_NET -o $EXT_IF1 -j MASQUERADE
#iptables -t nat -A POSTROUTING -o $EXT_IF1 -j SNAT --to-source $EXT_IP1
#iptables -t nat -A POSTROUTING -o $INT_IF1 -d 192.168.38.252 -j SNAT --to-source $INT_IP1
}
Конф squid3
#url_rewrite_program /usr/bin/squidGuard
#url_rewrite_children 10
cache_mem 300 MB
maximum_object_size_in_memory 10 MB
memory_pools on
memory_pools_limit 30 MB
cache_dir ufs /var/spool/squid3 6000 16 256
http_port 3128 transparent
acl office src 10.49.1.0/24
#ac1 NOCACHEDOMAIN dstdomain mafia.ua deny NOCACHEDOMAIN
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 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 office
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
hierarchy_stoplist cgi-bin?
access_log /var/log/squid3/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern. 0 20% 4320
coredump_dir /var/spool/squid3
Конф iptables
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 4491 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i $TUN_IF -j ACCEPT
iptables -A INPUT -i $INT_IF1 -j ACCEPT
iptables -A INPUT -i $GUEST_IF -s $GUEST_NET -j ACCEPT
iptables -A INPUT -j LOG --log-prefix INPUT_ -m limit --limit 5/min
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
#socseti
# iptables -A FORWARD -m string --string «vk.com» --algo kmp --to 65535 -j DROP
# iptables -A FORWARD -m string --string «vkontakte.ru» --algo kmp --to 65535 -j DROP
# iptables -A FORWARD -m string --string «facebook.com» --algo kmp --to 65535 -j DROP
# for i in 87.240.128.0/18 217.20.144.0/20 173.194.113.0/24 173.252.64.0/18; do iptables -A FORWARD -i $INT_IF1 -s $INT_NET1 -d "$i" -j DROP; done
#socseti
iptables -A FORWARD -i $TUN_IF -o $INT_IF1 -j ACCEPT
iptables -A FORWARD -i $INT_IF1 -o $TUN_IF -j ACCEPT
iptables -A FORWARD -i $INT_IF1 -o $EXT_IF1 -j ACCEPT
iptables -A FORWARD -i $GUEST_IF -s $GUEST_NET -d mail.shf.com.ua -j ACCEPT
iptables -A FORWARD -i $GUEST_IF -o $EXT_IF1 -j ACCEPT
iptables -A FORWARD -j LOG --log-prefix FORWARD_ -m limit --limit 5/min
#unifi
iptables -A FORWARD -d 10.49.1.2 -p tcp -m multiport --dports 8443 -j ACCEPT
iptables -t nat -A PREROUTING -i $INT_IF1 -s $INT_NET1 -p tcp --dport 80! -d 192.168/16 -j REDIRECT --to-port 3128
## NAT Prerouting
iptables -t nat -A PREROUTING -p tcp -d x.x.73.197 --dport 8443 -j DNAT --to-destination 10.49.1.2:8443
iptables -t nat -A POSTROUTING -s $INT_NET1 -o $EXT_IF1 -p icmp -j MASQUERADE
iptables -t nat -A POSTROUTING -s $INT_NET1 -o $EXT_IF1 -p tcp -j MASQUERADE
iptables -t nat -A POSTROUTING -s $INT_NET1 -o $EXT_IF1 -p udp -j MASQUERADE
iptables -t nat -A POSTROUTING -s $GUEST_NET -o $EXT_IF1 -j MASQUERADE
#iptables -t nat -A POSTROUTING -o $EXT_IF1 -j SNAT --to-source $EXT_IP1
#iptables -t nat -A POSTROUTING -o $INT_IF1 -d 192.168.38.252 -j SNAT --to-source $INT_IP1
}
Похожие публикации
delay_pools в squid3 и 100%-я загрузка процессора
Почему Squid3 некоторое время работает, а потом перестаёт?
Как через squid открывать vnc консоль в isp manager?
Как правильно настроить конфиг squid + sams2?
Как все таки блокировать google, youtube etc?
Нет комментариев