diseño de un firewall con herramientas de software libre
DESCRIPTION
Slide del taller "Diseño de un firewall con herramientas de software libre" presentado en el II Congreso Mexicano de la Sociedad de la Información y Conocimiento Libre (COSIT 2012) efectuado en Coatzacoalcos, Veracruz el día 30 de agosto del 2012.TRANSCRIPT
FIREWALL CON SOFTWARE LIBRE(DHCP, IPTABLES, SQUID, VSFTPD y SELINUX)
Remigio Salvador Sanchez
COSIT 2012
[email protected] COSIT 2012 COATZACOALCOS
”Mensaje”
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Contenido
1.- Instalacion
2.- Configuracion
3.- IPTABLES
4.- DHCP
5.- SQUID
6.- VSFTPD
7.- SELINUX
8.- Recomendaciones
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
1.- INSTALACION
[email protected] COSIT 2012 COATZACOALCOS
Instalacion
[email protected] COSIT 2012 COATZACOALCOS
Instalacion
[email protected] COSIT 2012 COATZACOALCOS
Instalacion
[email protected] COSIT 2012 COATZACOALCOS
2.- CONFIGURACION
[email protected] COSIT 2012 COATZACOALCOS
Configuracion
Deshabilitar Selinux- vi /etc/selinux/config- setenforce 0
Parar servicios innecesarios- chkconfig ip6tables off- chkconfig sendmail off- chkconfig netfs off
Configurar nuestro hostname- vi /etc/sysconfig/network
[email protected] COSIT 2012 COATZACOALCOS
Configuracion
configurar tarjetas de red (eth0 y p1p1)- eth0 (ip dinamica)- pxxx (puente-LAN) (ip estatica 192.168.0.1)
less /etc/sysconfig/network-scripts/ifcfg-INTERNETless /etc/sysconfig/network-scripts/ifcfg-LAN
Habilitar desde el inicio:chkconfig network on
service network (start stop restart status)
[email protected] COSIT 2012 COATZACOALCOS
Configuracion
Activando el bit de forwarding-vi /etc/sysctl.confnet.ipv4.ip forward = 0
Ejecutar sysctl -p para que tome el cambio de inmediato
[email protected] COSIT 2012 COATZACOALCOS
3.- IPTABLES
[email protected] COSIT 2012 COATZACOALCOS
IPTABLES
iptables -Fiptables -t nat -Fiptables -P INPUT ACCEPTiptables -P OUTPUT ACCEPTiptables -P FORWARD ACCEPTiptables -t nat -A POSTROUTING -s 192.168.0.0/24 -jMASQUERADE
service iptables save/usr/libexec/iptables.init save
service iptables (start stop restart status)
chkconfig iptables on
[email protected] COSIT 2012 COATZACOALCOS
4.- DHCP
[email protected] COSIT 2012 COATZACOALCOS
DHCP
yum -y install dhcp
Archivo de configuracion:- vi /etc/dhcp/dhcpd.conf
[email protected] COSIT 2012 COATZACOALCOS
DHCP
/etc/sysconfig/dhcpdDHCPDARGS=”pxxx”
service dhcpd (start stop restart status)
tail -100 /var/log/messages
chkconfig dhcpd on
[email protected] COSIT 2012 COATZACOALCOS
5.- SQUID
[email protected] COSIT 2012 COATZACOALCOS
SQUID
yum -y install squid
vi /etc/squid/squid.conf
vi /etc/squid/PNP
vi /etc/squid/exts
service squid (start stop restart status)
chkconfig squid on
[email protected] COSIT 2012 COATZACOALCOS
3.- IPTABLES
[email protected] COSIT 2012 COATZACOALCOS
IPTABLES
iptables -t nat -A PREROUTING -i pXXX -p tcp –dport 80 -jREDIRECT –to-port 3128
service iptables save/usr/libexec/iptables.init save
service iptables (start stop restart status)
[email protected] COSIT 2012 COATZACOALCOS
5.- SQUID
[email protected] COSIT 2012 COATZACOALCOS
SQUID
tail /var/log/squid/access.logtail /var/log/messages
[email protected] COSIT 2012 COATZACOALCOS
6.- VSFTPD
[email protected] COSIT 2012 COATZACOALCOS
VSFTPD
yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf
touch /etc/vsftpd/chroot list
service vsftpd (start stop restart status)
chkconfig vsftpd on
[email protected] COSIT 2012 COATZACOALCOS
6.- SELINUX
[email protected] COSIT 2012 COATZACOALCOS
SELINUX
setenforce 1
setsebool -P ftp home dir 1
systemctl
[email protected] COSIT 2012 COATZACOALCOS
RECOMENDACIONES
1.- DHCP
2.- IPTABLES
3.- SQUID
4.- vsFTPD
5.- Esto es solo la punta del Icebergsigue adelante, sigue aprendiendo ;)
[email protected] COSIT 2012 COATZACOALCOS
RECOMENDACIONES
1.- DHCP
2.- IPTABLES
3.- SQUID
4.- vsFTPD
5.- Esto es solo la punta del Icebergsigue adelante, sigue aprendiendo ;)
[email protected] COSIT 2012 COATZACOALCOS
RECOMENDACIONES
1.- DHCP
2.- IPTABLES
3.- SQUID
4.- vsFTPD
5.- Esto es solo la punta del Icebergsigue adelante, sigue aprendiendo ;)
[email protected] COSIT 2012 COATZACOALCOS
RECOMENDACIONES
1.- DHCP
2.- IPTABLES
3.- SQUID
4.- vsFTPD
5.- Esto es solo la punta del Icebergsigue adelante, sigue aprendiendo ;)
[email protected] COSIT 2012 COATZACOALCOS
RECOMENDACIONES
1.- DHCP
2.- IPTABLES
3.- SQUID
4.- vsFTPD
5.- Esto es solo la punta del Icebergsigue adelante, sigue aprendiendo ;)
[email protected] COSIT 2012 COATZACOALCOS
9.- Preguntas
[email protected] COSIT 2012 COATZACOALCOS
Preguntas
PreguntasDudas
Comentarios
[email protected]@remitos
http://vkn-side.blogspot.com
[email protected] COSIT 2012 COATZACOALCOS
Gracias:A los organizadores por las facilidades
ya ustedes por su atencion
[email protected] COSIT 2012 COATZACOALCOS