Proxy Transparente+Firewall+DHCP [RESOLVIDO]

13. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Lenoxx
xlinux

(usa Ubuntu)

Enviado em 03/10/2013 - 14:39h

Então tá passando do mesmo jeito...
qualquer site que coloco na regra de bloqueio passa...

att


  


14. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Pedro
px

(usa Debian)

Enviado em 03/10/2013 - 14:44h

estranho... vou refazer este squid.conf e posto aqui em baixo jaja, ai você testa


15. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Lenoxx
xlinux

(usa Ubuntu)

Enviado em 03/10/2013 - 14:48h

beleza


16. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Pedro
px

(usa Debian)

Enviado em 03/10/2013 - 14:50h

ai prontinho:

##Squid.conf

http_port 3128 transparent
visible_hostname atenas
error_directory /usr/share/squid/errors/Portuguese

#Diretório do cache
cache_dir ufs /var/cache/squid 4096 16 256

#Log
cache_access_log /var/log/squid/access.log

#Porcentagem de atualizacao do cache -limpo ao atingir o maximo
cache_swap_low 85
cache_swap_high 90

#Memória do cache
cache_mem 512 MB

#Usar o máximo de memória possível
memory_pools on
memory_pools_limit 2048 MB

#Tamanho máximo de arquivos alocados na RAM
maximum_object_size_in_memory 2048 KB
maximum_object_size 4096 KB

#Maximo e Minimo armazenados no disco
maximum_object_size 512 MB
minimum_object_size 0 KB

# Portas Liberadas
acl SSL_ports port 443
acl SSL_ports port 10000 # Webmin HTTPS
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 Safe_ports port 10000 # Webmin
acl Safe_ports port 3306 # Cartago
http_access deny !Safe_ports

# ACL PARA CONEXAO METODO SSL
acl CONNECT method CONNECT
http_access deny CONNECT !SSL_ports

# ACLs PARA LIBERACAO TOTAL POR MAC
acl mac_liberados arp "/etc/squid/mac_liberados"
http_access allow mac_liberados

# ACLs PARA SITES LIBERADOS
acl sites_liberados url_regex -i "/etc/squid/sites_liberados"
http_access allow sites_liberados

# ACLs PARA SITES BLOQUEADOS
acl sites_bloqueados url_regex -i "/etc/squid/sites_bloqueados"
http_access deny sites_bloqueados

acl localnet src 192.168.0.0/24

# Politicas para rede local
http_access allow localnet
http_access deny all


Não se esqueça de criar os arquivos dos ips liberados e sites negados.

E subistituir o acl localnet src "192.168.0.0/24" por sua range de ips locais


17. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Lenoxx
xlinux

(usa Ubuntu)

Enviado em 03/10/2013 - 15:05h

Olá


Retornou esse resultado depois que tentei reconfigurar....


2013/10/03 15:04:44| decode_eth: Invalid ethernet address '6554554'
2013/10/03 15:04:44| squid.conf line 54: acl mac_liberados arp "/etc/squid/mac_liberados"
2013/10/03 15:04:44| aclParseArpData: Ignoring invalid ARP acl entry: can't parse '6554554'
2013/10/03 15:04:44| aclParseAclLine: WARNING: empty ACL: acl mac_liberados arp "/etc/squid/mac_liberados"
2013/10/03 15:04:44| ACL name 'localnet' not defined!
FATAL: Bungled squid.conf line 66: http_access allow localnet
Squid Cache (Version 2.7.STABLE3): Terminated abnormally.



18. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Pedro
px

(usa Debian)

Enviado em 03/10/2013 - 15:07h

xlinux escreveu:

Olá


Retornou esse resultado depois que tentei reconfigurar....


2013/10/03 15:04:44| decode_eth: Invalid ethernet address '6554554'
2013/10/03 15:04:44| squid.conf line 54: acl mac_liberados arp "/etc/squid/mac_liberados"
2013/10/03 15:04:44| aclParseArpData: Ignoring invalid ARP acl entry: can't parse '6554554'
2013/10/03 15:04:44| aclParseAclLine: WARNING: empty ACL: acl mac_liberados arp "/etc/squid/mac_liberados"
2013/10/03 15:04:44| ACL name 'localnet' not defined!
FATAL: Bungled squid.conf line 66: http_access allow localnet
Squid Cache (Version 2.7.STABLE3): Terminated abnormally.


calma, vamos arrumar.

qual sua range de ips? tipo 192.168.1.1/24, algo assim

crie os arquivos que te pedi em /etc/squid/

tais como o "/etc/squid/mac_liberados"


19. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Lenoxx
xlinux

(usa Ubuntu)

Enviado em 03/10/2013 - 15:09h

minha range de ip 192.168.1.0

já criei os arquivos como orientou...




att


20. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Pedro
px

(usa Debian)

Enviado em 03/10/2013 - 15:12h

aqui:

##Squid.conf

http_port 3128 transparent
visible_hostname atenas
error_directory /usr/share/squid/errors/Portuguese

#Diretório do cache
cache_dir ufs /var/cache/squid 4096 16 256

#Log
cache_access_log /var/log/squid/access.log

#Porcentagem de atualizacao do cache -limpo ao atingir o maximo
cache_swap_low 85
cache_swap_high 90

#Memória do cache
cache_mem 512 MB

#Usar o máximo de memória possível
memory_pools on
memory_pools_limit 2048 MB

#Tamanho máximo de arquivos alocados na RAM
maximum_object_size_in_memory 2048 KB
maximum_object_size 4096 KB

#Maximo e Minimo armazenados no disco
maximum_object_size 512 MB
minimum_object_size 0 KB

# Portas Liberadas
acl SSL_ports port 443
acl SSL_ports port 10000 # Webmin HTTPS
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 Safe_ports port 10000 # Webmin
acl Safe_ports port 3306 # Cartago
http_access deny !Safe_ports

# ACL PARA CONEXAO METODO SSL
acl CONNECT method CONNECT
http_access deny CONNECT !SSL_ports

# ACLs PARA LIBERACAO TOTAL POR MAC
acl mac_liberados arp "/etc/squid/mac_liberados"
http_access allow mac_liberados

# ACLs PARA SITES LIBERADOS
acl sites_liberados url_regex -i "/etc/squid/sites_liberados"
http_access allow sites_liberados

# ACLs PARA SITES BLOQUEADOS
acl sites_bloqueados url_regex -i "/etc/squid/sites_bloqueados"
http_access deny sites_bloqueados

acl localnet src 192.168.1.0/24

# Politicas para rede local
http_access allow localnet
http_access deny all



21. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Lenoxx
xlinux

(usa Ubuntu)

Enviado em 03/10/2013 - 15:29h

Desculpe retornar com esse erro ao reconfigurar o squid mas pesquisei um monte aqui e não achei solução...


ACL name 'all' not defined!
FATAL: Bungled squid.conf line 69: http_access deny all
Squid Cache (Version 2.7.STABLE3): Terminated abnormally.


Obrigado




22. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Pedro
px

(usa Debian)

Enviado em 03/10/2013 - 15:31h

xlinux escreveu:

Desculpe retornar com esse erro ao reconfigurar o squid mas pesquisei um monte aqui e não achei solução...


ACL name 'all' not defined!
FATAL: Bungled squid.conf line 69: http_access deny all
Squid Cache (Version 2.7.STABLE3): Terminated abnormally.


Obrigado



xii, não deve funcionar no 2.7 ^^ falha minha. Tire esta acl e tente usar o squid normalmente.

PS: vou tentar ver como pode bloquear all (todo o resto) no 2.7


23. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Lenoxx
xlinux

(usa Ubuntu)

Enviado em 03/10/2013 - 15:37h

vai desculpando mas continua dando erro..


* Restarting Squid HTTP proxy squid 2013/10/03 15:36:30| ACL name 'all' not defined!
FATAL: Bungled (null) line 180: http_reply_access allow all
Squid Cache (Version 2.7.STABLE3): Terminated abnormally.


eu uso ubuntu não sei se faz diferença...


24. Re: Proxy Transparente+Firewall+DHCP [RESOLVIDO]

Pedro
px

(usa Debian)

Enviado em 03/10/2013 - 15:44h

xlinux escreveu:

vai desculpando mas continua dando erro..


* Restarting Squid HTTP proxy squid 2013/10/03 15:36:30| ACL name 'all' not defined!
FATAL: Bungled (null) line 180: http_reply_access allow all
Squid Cache (Version 2.7.STABLE3): Terminated abnormally.


eu uso ubuntu não sei se faz diferença...


Mostra a config que você ta usando ai. Pq eu não lembro de ter colocado allow all em nada ai!