1. Firewall de filtrado de paquetes configuracion firewall --------- ----------- 10.10.x.1----- 10.10.x.254 externa --------- --------- --------- protegido 10.20.x.254 ---- 10.20.x.1 ------------ -------- 2. En maquina externa ifconfig eth0 10.20.x.1 netmask 255.255.255.0 echo 0 | cat >/proc/sys/net/ipv4/conf/all/accept_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/all/send_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/eth0/accept_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/eth0/send_redirects route add -net 10.10.x.0 netmask 255.255.255.0 gw 10.20.x.254 /etc/init.d/ssh start /etc/init.d/apache start 3. En maquina protegida ifconfig eth0 10.10.x.1 netmask 255.255.255.0 echo 0 | cat >/proc/sys/net/ipv4/conf/all/accept_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/all/send_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/eth0/accept_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/eth0/send_redirects route add -net 10.20.x.0 netmask 255.255.255.0 gw 10.10.x.254 4. En firewall ifconfig eth0 10.20.x.254 netmask 255.255.255.0 ifconfig eth0:1 10.10.x.254 netmask 255.255.255.0 echo 0 | cat >/proc/sys/net/ipv4/conf/all/accept_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/all/send_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/eth0/accept_redirects echo 0 | cat >/proc/sys/net/ipv4/conf/eth0/send_redirects echo 1 | cat >/proc/sys/net/ipv4/ip_forward 5. Probar configuracion traceroute 10.10.x.1 #externa ping 10.10.x.1 traceroute 10.20.x.1 #protegida ping 10.20.x.1 konqueror http://10.20.x.1 & 6. Activar Firewall (esto se debe hacer solo en maquina firewall) iptables -F FORWARD iptables -P FORWARD DROP iptables -A FORWARD -s 10.10.x.1 -j ACCEPT iptables -A FORWARD -s 0/0 -d 10.10.x.1 -p tcp --dport www -j ACCEPT iptables -A FORWARD -s 0/0 -d 10.10.x.1 -p tcp --dport ssh -j ACCEPT iptables -A FORWARD -j DROP iptables -vnL 7. Validar que maquina externa no vea a interna nc -l -p 2300 #maquina interna nc 10.10.x.1 2300 #maquina externa konqueror http://10.10.x.1 & #maquina externa Firewall de aplicaciones DE PREFERENCIA HACER REBOOT DE TODO 1. Firewall a). Firewall. Descomprimier fwtk.tgz b). mkdir /home/knoppix/etc /home/knoppix/sbin c). En el directorio fwtk make install d). ifconfig eth0 10.100.x.254 netmask 255.255.255.0 ifconfig eth0:1 10.101.x.254 netmask 255.255.255.0 e) En directorio fwtk/myconfig sh arranca.sh f) Checar que esten activos los puertos 8080, 220,2200 g) Copiar el archivo fwtk/myconfig/netperm-table a /home/knoppix/etc Editar la tabla de permisos /home/knoppix/etc/netperm-table y dejar asi, donde dice nc-gw:port 2200 127.0.0.1 10.101.x.1 -plug-to 10.100.x.1 -port 2300 ssh-gw: port 220 127.0.0.1 10.101.x.1 -plug-to 10.100.x.1 -port 22 http-gw: permit-hosts 127.0.0.1 10.100.x.1 10.101.x.1 2. Maquina protegida y externa ifconfig eth0 10.100.x.1 #protegida ifconfig eth0:1 10.101.x.1 #externa 3. En la maquina protegida, levantar /etc/init.d/apache start /etc/init.d/ssh start nc -l -p 2300 & 4. En la maquina externa nc 10.101.x.254 2200 #conectarse al firewall de aplicaciones ssh -p 220 10.101.x.254 konqueror ->Configure konqueror -> Proxy->Use proxy->manually-> setup->Use same proxy y alimentar http://10.10.x.254