Hola lista, tengo un sw-3426 configurado para hacer vlanes y separar 2
redes lan de mi empresa:
vlan2-->puerto2-->untag,
puerto24-->tag
vlan3->puerto3-->untag,puerto24-->tag
Datos: pc_firewall
SO: debian squeeze 6.0
kernel: Linux 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686
GNU/Linux
Del 24 conecto mediante un cable directo a la pc_firewall(eth2) con 3
tarjetas de red ( net-->eth0, net2-->eth1,lan-->eth2), en dicha pc instale
el paquete vlan
root@localhost# apt-get install vlan
Configure las interfaces respectivas en modo vlan
root@localhost# cat /etc/network/interfaces
# Primero proveedor de ISP
auto eth0
iface eth0 inet static
address A.A.A.A
netmask 255.255.255.224
gateway C.C.C.C
dns-nameservers D.D.D.D
#Segundo proveedor de ISP
auto eth1
iface eth1 inet static
address 192.168.1.100
netmask 255.255.255.0
auto eth2
iface eth2 inet manual
auto vlan2
iface vlan2 inet static
address 172.16.7.158
netmask 255.255.255.224
vlan_raw_device eth2
auto vlan3
iface vlan3 inet static
address 192.168.20.1
netmask 255.255.255.224
vlan_raw_device eth2
Se comprueba conectividad, cualquier pc conectada desde la vlan1,vlan2 hace
ping a la puerta de enlace
Empiezan los problemas instalando shorewall:
root@localhost# apt-get install shorewall
Configurando el shorewall
root@localhost# vim /etc/default/shorewall
startup=1
root@localhost# cat /etc/shorewall/interfaces
net eth0 detect dhcp,tcpflags,logmartians,nosmurfs
net eth1 detect dhcp,tcpflags,logmartians,nosmurfs
lan vlan2 detect
lan vlan3 detect
root@localhost# cat /etc/shorewall/zones
#ZONE TYPE OPTIONS IN OUT
# OPTIONS OPTIONS
fw firewall
net ipv4
lan ipv4
root@localhost# cat /etc/shorewall/policy
#SOURCE DEST POLICY LOG LEVEL LIMIT:BURST
# The FOLLOWING POLICY MUST BE LAST
fw all ACCEPT
all all DROP info
root@localhost# cat /etc/shorewall/rules
#################################### LAN
####################################################################
#ACTION SOURCE DEST PROTO DEST
SOURCE ORIGINAL RATE USER/ MARK
# PORT
PORT(S) DEST LIMIT GROUP
Ping(ACCEPT) lan $FW
Chequeando reglas todo ok
root@localhost# shorewall check
Inicio el shorewall
root@localhost# /etc/init.d/shorewall restart
Problema : AL hacer ping a la puerta de enlace desde cualquier pc conectada
a la lan(vlan2, vlan3) no optengo respuesta
Solucion temporal:
root@localhost# ifdown -a --exclude=lo --exclude=eth0 --exclude=eth1 &&
ifup -a --exclude=lo --exclude=eth0 --exclude=eth1
*Ahora todos los equipos desde vlan pueden hacer ping a la puerta de
enlace, el shorewall sigue activo.*
Deducción del error: el archivo shorewall.conf trae varias opciones, creo
que por ahi esta el problema pero cual ?
root@locahost# cat /etc/shorewall.conf
STARTUP_ENABLED=Yes
VERBOSITY=1
LOGFILE=/var/log/messages
STARTUP_LOG=/var/log/shorewall-init.log
LOG_VERBOSITY=2
LOGFORMAT="Shorewall:%s:%s:"
LOGTAGONLY=No
LOGRATE=
LOGBURST=
LOGALLNEW=
BLACKLIST_LOGLEVEL=
MACLIST_LOG_LEVEL=info
TCP_FLAGS_LOG_LEVEL=info
SMURF_LOG_LEVEL=info
LOG_MARTIANS=Yes
IPTABLES=
IP=
TC=
IPSET=
PERL=/usr/bin/perl
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
SHOREWALL_SHELL=/bin/sh
SUBSYSLOCK=
MODULESDIR=
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
RESTOREFILE=
IPSECFILE=zones
LOCKFILE=
DROP_DEFAULT="Drop"
REJECT_DEFAULT="Reject"
ACCEPT_DEFAULT="none"
QUEUE_DEFAULT="none"
NFQUEUE_DEFAULT="none"
RSH_COMMAND='ssh ${root}@${system} ${command}'
RCP_COMMAND='scp ${files} ${root}@${system}:${destination}'
################### OPCIONES ########################
IP_FORWARDING=On
ADD_IP_ALIASES=No
ADD_SNAT_ALIASES=No
RETAIN_ALIASES=No
TC_ENABLED=Internal
TC_EXPERT=No
TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2"
CLEAR_TC=Yes
MARK_IN_FORWARD_CHAIN=No
CLAMPMSS=Yes
ROUTE_FILTER=No
DETECT_DNAT_IPADDRS=No
MUTEX_TIMEOUT=60
ADMINISABSENTMINDED=Yes
BLACKLISTNEWONLY=Yes
DELAYBLACKLISTLOAD=No
MODULE_SUFFIX=ko
DISABLE_IPV6=No
BRIDGING=No
DYNAMIC_ZONES=No
PKTTYPE=Yes
NULL_ROUTE_RFC1918=No
MACLIST_TABLE=filter
MACLIST_TTL=
SAVE_IPSETS=No
MAPOLDACTIONS=No
FASTACCEPT=No
IMPLICIT_CONTINUE=No
HIGH_ROUTE_MARKS=No
USE_ACTIONS=Yes
OPTIMIZE=1
EXPORTPARAMS=No
EXPAND_POLICIES=Yes
KEEP_RT_TABLES=No
DELETE_THEN_ADD=Yes
MULTICAST=No
DONT_LOAD=
AUTO_COMMENT=Yes
MANGLE_ENABLED=Yes
USE_DEFAULT_RT=No
RESTORE_DEFAULT_ROUTE=Yes
AUTOMAKE=No
WIDE_TC_MARKS=Yes
TRACK_PROVIDERS=Yes
ZONE2ZONE=2
ACCOUNTING=Yes
DYNAMIC_BLACKLIST=Yes
OPTIMIZE_ACCOUNTING=No
LOAD_HELPERS_ONLY=Yes
REQUIRE_INTERFACE=No
FORWARD_CLEAR_MARK=Yes
BLACKLIST_DISPOSITION=DROP
MACLIST_DISPOSITION=REJECT
TCP_FLAGS_DISPOSITION=DROP
Gracias de antemano :D si por ahi alguien me puede dar algún tip para
elevar la seguridad del shorewall se lo agradecería
XD loquitoslack XD
--
Administrador de Redes
RPC: 989300335
ACTI - ICH
_______________________________________________
Lista de correo Linux-plug
Temática: Discusión general sobre Linux
Peruvian Linux User Group (http://www.linux.org.pe)
Participa suscribiéndote y escribiendo a: [email protected]
Para darte de alta, de baja o hacer ajustes a tu suscripción visita:
http://voip2.voip.net.pe/mailman/listinfo/linux-plug
IMPORTANTE: Reglas y recomendaciones
http://www.linux.org.pe/listas/reglas.php
http://www.linux.org.pe/listas/comportamiento.php
http://www.linux.org.pe/listas/recomendaciones.php
Alojamiento de listas cortesia de http://cipher.pe