Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Mam zainstalowanego squida i dansguardiana na portach 3128 i 8080.
W przeglądarce chromium nie mogę wejść na żadną stronę, natomiast w firefox-ie niektóre strony chodzą ? W logach squida mam
1520255447.288 297 192.168.1.2 TCP_DENIED/403 4272 GET http://www.pomorska.pl/tag/sex-pl/ - HIER_NONE/- text/html 1520255447.326 0 192.168.1.2 TCP_DENIED/403 4251 GET http://server:0/squid-internal-static/icons/SN.png - HIER_NON$/proc/sys/net/ipv4/ip_forward
192.168.1.2 - adres karty WAN.
Moja sieć to 172.23.198.0
server - to nazwa serwera.
# czyszczenie starych regul iptables -F iptables -X iptables -t nat -X iptables -t nat -F # ustawienie polityki dzialania iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -p udp --dport 22 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A INPUT -i eth0 -s 172.23.198.0/24 -j ACCEPT iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT iptables -A INPUT -p tcp --dport 9400 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 9401 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 9402 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 9403 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 111 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 2049 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 8080 -m state --state NEW -j ACCEPT iptables -A INPUT -p tcp --dport 3128 -m state --state NEW -j ACCEPT iptables -A INPUT -p udp --dport 8080 -m state --state NEW -j ACCEPT iptables -A INPUT -p udp --dport 3128 -m state --state NEW -j ACCEPT iptables -I FORWARD -p tcp -s 172.23.198.0/24 --dport 9400 -j ACCEPT iptables -I FORWARD -p tcp -s 172.23.198.0/24 --dport 9401 -j ACCEPT iptables -I FORWARD -p tcp -s 172.23.198.0/24 --dport 9402 -j ACCEPT iptables -I FORWARD -p tcp -s 172.23.198.0/24 --dport 9403 -j ACCEPT iptables -I FORWARD -p tcp -s 172.23.198.0/24 --dport 111 -j ACCEPT iptables -I FORWARD -p tcp -s 172.23.198.0/24 --dport 2049 -j ACCEPT iptables -A OUTPUT -p tcp --dport 9400 -m state --state NEW -j ACCEPT iptables -A OUTPUT -p tcp --dport 9401 -m state --state NEW -j ACCEPT iptables -A OUTPUT -p tcp --dport 9402 -m state --state NEW -j ACCEPT iptables -A OUTPUT -p tcp --dport 9403 -m state --state NEW -j ACCEPT iptables -A OUTPUT -p tcp --dport 111 -m state --state NEW -j ACCEPT iptables -A OUTPUT -p tcp --dport 2049 -m state --state NEW -j ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A FORWARD -o lo -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 22 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 22 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p udp --dport 22 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.1 -p udp --dport 22 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 3128 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 3128 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p udp --dport 3128 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.1 -p udp --dport 3128 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 8080 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 8080 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p udp --dport 8080 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.1 -p udp --dport 8080 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 111 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 9400 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 2049 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 9401 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 9402 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.1 -p tcp --dport 9403 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 3128 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 3128 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p udp --dport 3128 -j ACCEPT iptables -A OUTPUT -s 0/0 -d 172.23.198.0/24 -p udp --dport 3128 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 111 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 9400 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 2049 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 9401 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 9402 -j ACCEPT iptables -A INPUT -s 0/0 -d 172.23.198.0/24 -p tcp --dport 9403 -j ACCEPT iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED iptables -A FORWARD -j ACCEPT -m state --state ESTABLISHED,RELATED iptables -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED iptables -t filter -A FORWARD -s 172.23.198.0/255.255.255.0 -d 0/0 -j ACCEPT iptables -t filter -A FORWARD -s 0/0 -d 172.23.198.0/255.255.255.0 -j ACCEPT iptables -t nat -A POSTROUTING -s 172.23.198.0/24 -j MASQUERADE iptables -t nat -A PREROUTING -s 172.23.198.0/255.255.255.0 -p tcp --dport 80 -j REDIRECT --to-port 8080
Offline
Podejrzewam że bez konfiga szybko odpowiedzi nie uzyskasz :)
Dużo squidem się nie bawiłem, ale stawiam na ACL
Offline
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 siec src 172.23.198.0/24 acl godziny_pracy time 00:01-21:30 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 follow_x_forwarded_for deny all acl_uses_indirect_client on delay_pool_uses_indirect_client on log_uses_indirect_client on http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny manager http_access allow localhost http_access allow siec godziny_pracy http_access deny all 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 http_port 172.23.198.1:3128 transparent
Jak jest przekierowanie na squid to internet na stacjach działa. Problem jest gdy jest przekierowanie dansguardiana .
Offline
Time (s) | Query |
---|---|
0.00011 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00095 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.118.154.237' WHERE u.id=1 |
0.00061 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.118.154.237', 1732691847) |
0.00052 | SELECT * FROM punbb_online WHERE logged<1732691547 |
0.00052 | SELECT topic_id FROM punbb_posts WHERE id=318216 |
0.00004 | SELECT id FROM punbb_posts WHERE topic_id=30339 ORDER BY posted |
0.00055 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=30339 AND t.moved_to IS NULL |
0.00005 | SELECT search_for, replace_with FROM punbb_censoring |
0.00106 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=30339 ORDER BY p.id LIMIT 0,25 |
0.00072 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=30339 |
Total query time: 0.00517 s |