Ejemplo 2

Page last edited hace 2117 días 3 horas
De Solaris-ES
Saltar a: navegación, buscar

Habilitar todo el trafico entrante y saliente, también habilitar el log para la NIC de loopback. Aceptar paquetes entrantes del puerto 22 TCP (ssh), 80 TCP/UDP (http), 53 TCP/UDP (DNS) y 3128 TCP/UDP (SQUID) por las NICs hme0 y hme1. Bloquear el resto de paquetes entrantes. Permitir la salida de todo tipo de paquetes y mantener el estado de la conexión.

 # vi /etc/ipf/ipf.conf 
 pass in all 
 pass out all 
 pass in log quick on lo0 all 
 pass out log quick on lo0 all 
 pass in quick on hme0 proto tcp from any to any port = 22 keep state 
 pass in quick on hme0 proto tcp/udp from any to any port = 53 keep state 
 pass in quick on hme0 proto tcp/udp from any to any port = 80 keep state 
 pass in quick on hme0 proto tcp/udp from any to any port = 3128 keep state 
 pass in quick on hme1 proto tcp from any to any port = 22 keep state 
 pass in quick on hme1 proto tcp/udp from any to any port = 53 keep state 
 pass in quick on hme1 proto tcp/udp from any to any port = 80 keep state 
 pass in quick on hme1 proto tcp/udp from any to any port = 3128 keep state 
 block return-rst in log on hme0 proto tcp from any to any 
 block return-rst in log on hme1 proto tcp from any to any 
 pass out on hme0 proto tcp from any to any keep state 
 pass out on hme1 proto tcp from any to any keep state