matheus-hf
(usa Debian)
Enviado em 07/06/2017 - 14:43h
Boa tarde Amigos, sou iniciante no linux, estou usando o DEBIAN 8.8, instalei o SQUID3 e configurei o iptables, tive um problema que as estacões não navegavam, agora navegam mas o SQUID não bloqueia nada, minhas conecoes sao eth0 internet e eth1 rede local, segue abaixo o SQUID e iptables, não sei se estão certos.
E o squid tambem esta dando o erro abaixo:
2017/06/07 14:39:36| aclParseAclLine: ACL 'manager' already exists with different type.
FATAL: Bungled /etc/squid3/squid.conf line 34: acl manager proto cache_object
Squid Cache (Version 3.4.8): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.008 user + 0.000 sys
Maximum Resident Size: 35312 KB
Page faults with physical i/o: 0
squid
http_port 3128
visible_hostname ACOMARPROXY
cache_mem 1000 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 100000 16 256
maximum_object_size 30000 KB
maximum_object_size_in_memory 40 KB
access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
pid_filename /var/log/squid3/squid3.pid
mime_table /usr/share/squid3/mime.conf
cache_mgr acomar@acomar.com.br
memory_pools off
diskd_program /usr/lib/squid3/diskd
unlinkd_program /usr/lib/squid3/unlinkd
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.0
acl vlan24 src 192.168.0.0/24
acl lan src 192.168.0.0/24
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 1863 # 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
http_access allow vlan24
cache_mgr webmaster
mail_program mail
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string off
visible_hostname zenhulk
error_directory /usr/share/squid3/errors/Portuguese/
acl rede_local src 192.168.0.0/24
acl localhost src 192.168.0.0/255.255.255.0
acl palavras_bloqueadas url_regex -i "/etc/squid3/palavras_bloqueadas.txt"
acl sites_bloqueados url_regex -i "/etc/squid3/sites_bloqueados.txt"
acl redes_sociais url_regex -i "/etc/squid3/redes_sociais.txt"
acl liberados src "/etc/squid3/ips_liberados.txt"
acl
[*****] url_regex -i "/etc/squid3/sites_porno.txt"
acl formato_arquivo url_regex -i "/etc/squid3/formato_arquivo.txt"
acl horario_almoco time 12:00-13:00
http_access allow liberados
http_access deny redes_sociais
http_access deny sites_bloqueados
http_access deny palavras_bloqueadas
http_access deny
[*****]
http_access deny formato_arquivo
http_access allow rede_local
http_access allow localhost
http_access deny all
IPTABLES
#!bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
#
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-reply -m limit --limit 1/s -j DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 3128 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -i eth0 -j ACCEPT
iptables -A INPUT -p tcp --dport 123 -i eth0 -j ACCEPT
iptables -A INPUT -p udp --dport 123 -i eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -s eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128