Enviado em 29/05/2012 - 12:28h
Olá, estou tentando bloquear facebook e hotmail no servidor da empresa, porém o https passa direto pelo squid, e utilizando as seguintes funções do iptables eu consegui bloquear os sitesEnviado em 29/05/2012 - 14:21h
Boa tarde amigo,touch /etc/init.d/firewall.sh
chmod +x /etc/init.d/firewall.sh
vim /etc/init.d/firewall.sh
#!/bin/bash iptables -I FORWARD -m string --algo bm --string "facebook.com" -j DROP iptables -I FORWARD -m string --algo bm --string "youtube.com" -j DROP iptables -I OUTPUT -m string --algo bm --string "facebook.com" -j DROP iptables -I OUTPUT -m string --algo bm --string "youtube.com" -j DROP
update-rc.d firewall.sh defaults
Enviado em 29/05/2012 - 13:00h
iptables --save iptables --restore
Enviado em 29/05/2012 - 13:36h
é assim o:# touch /etc/firewall
# iptables-save /etc/firewall
# echo "iptables-restore /etc/firewall" >> /etc/rc.local
Enviado em 29/05/2012 - 13:52h
# touch /etc/firewall
# iptables-save /etc/firewall
# echo "iptables-restore /etc/firewall" >> /etc/rc.local
Enviado em 29/05/2012 - 13:54h
# touch /etc/firewall
# iptables-save /etc/firewall
# echo "iptables-restore /etc/firewall" >> /etc/rc.local
Enviado em 29/05/2012 - 14:34h
touch /etc/init.d/firewall.sh
chmod +x /etc/init.d/firewall.sh
vim /etc/init.d/firewall.sh
#!/bin/bash iptables -I FORWARD -m string --algo bm --string "facebook.com" -j DROP iptables -I FORWARD -m string --algo bm --string "youtube.com" -j DROP iptables -I OUTPUT -m string --algo bm --string "facebook.com" -j DROP iptables -I OUTPUT -m string --algo bm --string "youtube.com" -j DROP
update-rc.d firewall.sh defaults
Enviado em 29/05/2012 - 14:37h
O amigo eabreu esqueceu de um detalhe:iptables-save > /etc/firewall
echo "iptables-restore < /etc/firewall" >> /etc/rc.local
Enviado em 29/05/2012 - 14:40h
para melhores estudos sobre linux e serviços de redes usando o mesmo tem estes dois materiais abaixo:Enviado em 29/05/2012 - 14:49h
iptables-save > /etc/firewall
echo "iptables-restore < /etc/firewall" >> /etc/rc.local
Automatizando digitação de códigos 2FA no browser
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Como converter imagens PNG/JPEG para SVG em linha de comando
Fez porcaria no teu repositório Git? Aprenda a restaurar uma versão anterior do seu código!
Restaurando Fontes de Download do Hydra no Linux
Atualizando "na marra" o YT-DLP quando começa a dar erro de downloads
Como instalar o WPS com interface e corretor ortográfico em PT-BR no Arch Linux
Inicializaçao lenta (alguns processos rodando) Debian 11 Bullseye [RES... (2)
Erro na atualização dos pacotes (6)