----- Original Message ----- From: "Márcio Luciano Donada" <[EMAIL PROTECTED]> To: ""Lista Brasileira de Discussão sobre FreeBSD (FUG-BR)"" <freebsd@fug.com.br> Sent: Tuesday, August 01, 2006 11:24 PM Subject: Re: [FUG-BR] Bloqueia tudo, libera necessario !
> Suporte Planet Hardware escreveu: >> Ola pessoal, como problema anterior com o spamhaus.org >> >> Quero fazer um firewall com ipfw bloqueando tudo e liberando o >> necessário, >> como ficaria esta regra bem feita? Tenho pouca experiência em ipfw e não >> quero fazer "cagada", já que tenho bastante gente atrás do meu servidor. >> >> Queria liberar apenas as portas padrão, 80, 22, 21, 110, 25 ... >> Existem mais padrões importantes para liberar? >> >> Abraços >> Valeu desde já, adoro essa lista ! :) >> >> Leandro >> >> >> > Leandro, Você pode usar o IPFW mesmo dessa forma abaixo #Limpando Regras /sbin/ipfw -f flush #Interface loopback /sbin/ipfw add 10 allow ip from any to any via lo0 /sbin/ipfw add 11 deny ip from any to 127.0.0.0/8 #Portas FTP /sbin/ipfw add 20 allow udp from any to any dst-port 20,21,1024,49152-65535 /sbin/ipfw add 21 allow tcp from any to any dst-port 20,21,1024,49152-65535 /sbin/ipfw add 22 allow udp from any to any src-port 20,21,1024,49152-65535 /sbin/ipfw add 23 allow tcp from any to any src-port 20,21,1024,49152-65535 #Porta SSH /sbin/ipfw add 30 allow udp from any to any dst-port 22 /sbin/ipfw add 31 allow tcp from any to any dst-port 22 /sbin/ipfw add 32 allow udp from any to any src-port 22 /sbin/ipfw add 33 allow tcp from any to any src-port 22 #Portas SMTP e POP3 /sbin/ipfw add 40 allow udp from any to any dst-port 25,110 /sbin/ipfw add 41 allow tcp from any to any dst-port 25,110 /sbin/ipfw add 42 allow udp from any to any src-port 25,110 /sbin/ipfw add 43 allow tcp from any to any src-port 25,110 #Porta DNS /sbin/ipfw add 50 allow udp from any to any dst-port 53 /sbin/ipfw add 51 allow tcp from any to any dst-port 53 /sbin/ipfw add 52 allow udp from any to any src-port 53 /sbin/ipfw add 53 allow tcp from any to any src-port 53 #Porta WWW /sbin/ipfw add 60 allow udp from any to any dst-port 80 /sbin/ipfw add 61 allow tcp from any to any dst-port 80 /sbin/ipfw add 62 allow udp from any to any src-port 80 /sbin/ipfw add 63 allow tcp from any to any src-port 80 #Bloqueando Restante do Trafego /sbin/ipfw add 65534 deny all from any to any ------------------------- Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd