Objetivo: Colocar alias en shorewall que haga refenrecia a un conjunto de opciones o interfaces de red
example: tengo varias vlanes: vlan1, vlan2, vlan3 ... como lo relaciono con una variable que me permita exportar hacia los demas archivos.
root@localhost# cat >> /etc/shorewall/params << "EOF"
LAN_VLAN_LAB1=eth1.1
LAN_VLAN_LAB2=eth1.2
LAN_VLAN_LAB3=eth1.3
LAN_VLAN_LAB4=eth1.4
LAN_VLAN_LAB5=eth1.5
LAN_VLAN_LAB6=eth1.6
LAN_VLAN_LAB7=eth1.7
LAN_VLAN_LAB8=eth1.8
LAN_VLAN_LAB9=eth1.9
OPTIONS_INT=tcpflags,nosmurfs,routefilter
EOF
root@localhost# cat >> /etc/shorewall/interfaces << "EOF"
#ZONE INTERFACE BROADCAST OPTIONS
WAN eth0 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB1 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB2 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB3 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB4 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB5 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB6 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB7 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB8 detect $OPTIONS_INT
LAN $LAN_VLAN_LAB9 detect $OPTIONS_INT
EOF
No hay comentarios:
Publicar un comentario