Amélioration du déploiement via Ansible
This commit is contained in:
102
deploiement/sources/zone_dmz/ferm/proxyint_ferm.conf
Normal file
102
deploiement/sources/zone_dmz/ferm/proxyint_ferm.conf
Normal file
@@ -0,0 +1,102 @@
|
||||
@def $IF_ADMIN = eth5;
|
||||
@def $IF_FRONT = eth0;
|
||||
@def $IF_BACK = (eth1 eth2 eth3 eth4);
|
||||
|
||||
|
||||
# REQUEST : EXT -> INT | ACCESS : INT -> EXT
|
||||
|
||||
|
||||
# Depuis l'extérieur sur l'interface principale
|
||||
@def $HAVE_FRONT_REQUEST = 1; #0 pour NON 1 pour OUI
|
||||
@def $OPEN_PORT_FRONT_REQUEST = (3128 9999);
|
||||
@def $NEED_UDP_FRONT_REQUEST = 0; #0 pour NON 1 pour OUI
|
||||
@def $UDP_OPEN_PORT_FRONT_REQUEST = ();
|
||||
|
||||
# Depuis l'intérieur sur l'interface principale
|
||||
@def $HAVE_FRONT_ACCESS = 1; #0 pour NON 1 pour OUI
|
||||
@def $OPEN_PORT_FRONT_ACCESS = (10:65535);
|
||||
@def $NEED_UDP_FRONT_ACCESS = 0; #0 pour NON 1 pour OUI
|
||||
@def $UDP_OPEN_PORT_FRONT_ACCESS = (53);
|
||||
|
||||
|
||||
# Depuis l'extérieur sur les interfaces secondaires
|
||||
@def $HAVE_BACK_REQUEST = 1; #0 pour NON 1 pour OUI
|
||||
@def $OPEN_PORT_BACK_REQUEST = (3128 9999);
|
||||
@def $NEED_UDP_BACK_REQUEST = 0; #0 pour NON 1 pour OUI
|
||||
@def $UDP_OPEN_PORT_BACK_REQUEST = ();
|
||||
|
||||
# Depuis l'intérieur sur les interfaces secondaires
|
||||
@def $HAVE_BACK_ACCESS = 0; #0 pour NON 1 pour OUI
|
||||
@def $OPEN_PORT_BACK_ACCESS = ();
|
||||
@def $NEED_UDP_BACK_ACCESS = 0; #0 pour NON 1 pour OUI
|
||||
@def $UDP_OPEN_PORT_BACK_ACCESS = ();
|
||||
|
||||
|
||||
# Besoin de VRRP sur IF_VRRP
|
||||
@def $NEED_VRRP = 0; #0 pour NON 1 pour OUI
|
||||
@def $IF_VRRP = eth0;
|
||||
|
||||
table filter {
|
||||
chain INPUT {
|
||||
policy DROP;
|
||||
mod state state INVALID DROP;
|
||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||
interface lo ACCEPT;
|
||||
interface $IF_ADMIN ACCEPT;
|
||||
|
||||
@if $HAVE_FRONT_REQUEST {
|
||||
interface $IF_FRONT proto tcp dport $OPEN_PORT_FRONT_REQUEST ACCEPT;
|
||||
}
|
||||
|
||||
@if $NEED_VRRP {
|
||||
interface $IF_VRRP proto vrrp ACCEPT;
|
||||
}
|
||||
|
||||
@if $NEED_UDP_FRONT_REQUEST {
|
||||
interface $IF_FRONT proto udp dport $UDP_OPEN_PORT_FRONT_REQUEST ACCEPT;
|
||||
}
|
||||
|
||||
|
||||
@if $HAVE_BACK_REQUEST {
|
||||
interface $IF_BACK proto tcp dport $OPEN_PORT_BACK_REQUEST ACCEPT;
|
||||
}
|
||||
|
||||
@if $NEED_UDP_BACK_REQUEST {
|
||||
interface $IF_BACK proto udp dport $UDP_OPEN_PORT_BACK_REQUEST ACCEPT;
|
||||
}
|
||||
|
||||
|
||||
proto icmp icmp-type echo-request ACCEPT;
|
||||
}
|
||||
|
||||
chain OUTPUT {
|
||||
policy DROP;
|
||||
mod state state INVALID DROP;
|
||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||
outerface lo ACCEPT;
|
||||
|
||||
@if $HAVE_FRONT_ACCESS {
|
||||
outerface $IF_FRONT proto tcp ACCEPT;
|
||||
}
|
||||
|
||||
@if $NEED_VRRP {
|
||||
outerface $IF_VRRP proto vrrp ACCEPT;
|
||||
}
|
||||
|
||||
@if $NEED_UDP_FRONT_ACCESS {
|
||||
outerface $IF_FRONT proto udp dport $UDP_OPEN_PORT_FRONT_ACCESS ACCEPT;
|
||||
}
|
||||
|
||||
@if $HAVE_BACK_ACCESS {
|
||||
outerface $IF_BACK proto tcp dport $OPEN_PORT_BACK_ACCESS ACCEPT;
|
||||
}
|
||||
|
||||
@if $NEED_UDP_BACK_ACCESS {
|
||||
outerface $IF_BACK proto udp dport $UDP_OPEN_PORT_BACK_ACCESS ACCEPT;
|
||||
}
|
||||
|
||||
proto icmp ACCEPT;
|
||||
}
|
||||
|
||||
chain FORWARD policy DROP;
|
||||
}
|
||||
Reference in New Issue
Block a user