Corrections et mise à jour
parent
4ef032f0f2
commit
501c84ce42
|
@ -26,4 +26,4 @@ Pour Squid
|
||||||
# Table des matières
|
# Table des matières
|
||||||
1. [HAProxy](haproxy.md)
|
1. [HAProxy](haproxy.md)
|
||||||
2. [Serveur DNS](dns.md)
|
2. [Serveur DNS](dns.md)
|
||||||
3. [Proxy pour les containers / VM](proxy_interne.md)
|
3. [Proxy pour les conteneurs / VM](proxy_interne.md)
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
@def $UDP_OPEN_PORT_BACK_ACCESS = ();
|
@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 {
|
table filter {
|
||||||
chain INPUT {
|
chain INPUT {
|
||||||
policy DROP;
|
policy DROP;
|
||||||
|
@ -44,6 +48,10 @@ table filter {
|
||||||
interface $IF_FRONT proto tcp dport $OPEN_PORT_FRONT_REQUEST ACCEPT;
|
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 {
|
@if $NEED_UDP_FRONT_REQUEST {
|
||||||
interface $IF_FRONT proto udp dport $UDP_OPEN_PORT_FRONT_REQUEST ACCEPT;
|
interface $IF_FRONT proto udp dport $UDP_OPEN_PORT_FRONT_REQUEST ACCEPT;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +79,10 @@ table filter {
|
||||||
outerface $IF_FRONT proto tcp dport $OPEN_PORT_FRONT_ACCESS ACCEPT;
|
outerface $IF_FRONT proto tcp dport $OPEN_PORT_FRONT_ACCESS ACCEPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if $NEED_VRRP {
|
||||||
|
outerface $IF_VRRP proto vrrp ACCEPT;
|
||||||
|
}
|
||||||
|
|
||||||
@if $NEED_UDP_FRONT_ACCESS {
|
@if $NEED_UDP_FRONT_ACCESS {
|
||||||
outerface $IF_BACK proto udp dport $UDP_OPEN_PORT_FRONT_ACCESS ACCEPT;
|
outerface $IF_BACK proto udp dport $UDP_OPEN_PORT_FRONT_ACCESS ACCEPT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,12 @@ if [ "$(ip a | grep -c "10.0.0.8")" -ge 1 ]; then
|
||||||
then
|
then
|
||||||
other_ip=10.0.0.6
|
other_ip=10.0.0.6
|
||||||
fi
|
fi
|
||||||
certbot renew
|
rm -f /etc/letsencrypt/live/README
|
||||||
rm -rf /etc/ssl/letsencrypt/*
|
rm -rf /etc/ssl/letsencrypt/*
|
||||||
for domain in $(ls /etc/letsencrypt/live); do
|
for domain in $(ls /etc/letsencrypt/live); do
|
||||||
cat /etc/letsencrypt/live/$domain/privkey.pem /etc/letsencrypt/live/$domain/fullchain.pem > /etc/ssl/letsencrypt/$domain.pem
|
cat /etc/letsencrypt/live/$domain/privkey.pem /etc/letsencrypt/live/$domain/fullchain.pem > /etc/ssl/letsencrypt/$domain.pem
|
||||||
done
|
done
|
||||||
scp -r /etc/ssl/letsencrypt/* hasync@$other_ip:/etc/ssl/letsencrypt
|
scp -r /etc/ssl/letsencrypt/* root@$ct_ip:/etc/ssl/letsencrypt
|
||||||
else
|
ssh root@$ct_ip 'service haproxy reload'
|
||||||
|
service haproxy reload
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Gateway 10.0.2.0/24 -> 10.0.2.254
|
# Gateway 10.0.2.0/24 -> 10.0.2.254
|
||||||
# Gateway 10.1.0.0/24 -> 10.1.0.254
|
# Gateway 10.1.0.0/24 -> 10.1.0.254
|
||||||
|
|
||||||
# Créer les containers, les mets à jours, configure les mises à jours de sécurité automatique,
|
# Créer les conteneurs, les mets à jours, configure les mises à jours de sécurité automatique,
|
||||||
# installe des paquets utile et ceux des services, met en place ferm via notre template.
|
# installe des paquets utile et ceux des services, met en place ferm via notre template.
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
pubkey: "{{ ssh_pub }}"
|
pubkey: "{{ ssh_pub }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Start Proxy containers
|
- name: Start Proxy container
|
||||||
proxmox:
|
proxmox:
|
||||||
api_user: root@pam
|
api_user: root@pam
|
||||||
api_password: "{{ pass_pve }}"
|
api_password: "{{ pass_pve }}"
|
||||||
|
|
|
@ -28,17 +28,17 @@ La template utilise des paramètres pour éviter d'avoir à modifier la configur
|
||||||
- IF_BACK : Liste des interfaces secondaire, ne doit inclure ni l'interface administration ni les interfaces qui n'ont pas besoin de règles autre que DROP.
|
- IF_BACK : Liste des interfaces secondaire, ne doit inclure ni l'interface administration ni les interfaces qui n'ont pas besoin de règles autre que DROP.
|
||||||
|
|
||||||
#### Ports TCP ouverts
|
#### Ports TCP ouverts
|
||||||
HAVE_BACK_ACCESS : Doit accéder à des conteneurs qui sont sur des interfaces secondaires
|
- HAVE_BACK_ACCESS : Doit accéder à des conteneurs qui sont sur des interfaces secondaires
|
||||||
HAVE_BACK_REQUEST : Doit être accessible depuis des conteneurs qui sont sur des interfaces secondaires
|
- HAVE_BACK_REQUEST : Doit être accessible depuis des conteneurs qui sont sur des interfaces secondaires
|
||||||
OPEN_PORT_FRONT : Liste des ports TCP à ouvrir en entrée sur l'interface principale
|
- OPEN_PORT_FRONT : Liste des ports TCP à ouvrir en entrée sur l'interface principale
|
||||||
OPEN_PORT_BACK_REQUEST : Liste des ports TCP à ouvrir en entrée sur les interfaces secondaires
|
- OPEN_PORT_BACK_REQUEST : Liste des ports TCP à ouvrir en entrée sur les interfaces secondaires
|
||||||
OPEN_PORT_BACK_ACCESS : Liste des ports TCP à ouvrir en sortie sur les interfaces secondaires
|
- OPEN_PORT_BACK_ACCESS : Liste des ports TCP à ouvrir en sortie sur les interfaces secondaires
|
||||||
|
|
||||||
#### Ports UDP ouverts
|
#### Ports UDP ouverts
|
||||||
NEED_UDP_* : 0 si pas besoin d'ouvrir un port UDP 1 sinon
|
- NEED_UDP_* : 0 si pas besoin d'ouvrir un port UDP 1 sinon
|
||||||
UDP_OPEN_PORT_FRONT : Liste des ports UDP à ouvrir en entrée sur l'interface principale
|
- UDP_OPEN_PORT_FRONT : Liste des ports UDP à ouvrir en entrée sur l'interface principale
|
||||||
UDP_OPEN_PORT_BACK_ACCESS : Liste des ports UDP à ouvrir en sortie sur les interfaces secondaires
|
- UDP_OPEN_PORT_BACK_ACCESS : Liste des ports UDP à ouvrir en sortie sur les interfaces secondaires
|
||||||
UDP_OPEN_PORT_BACK_REQUEST : Liste des ports UDP à ouvrir en entrée sur les interfaces secondaires
|
- UDP_OPEN_PORT_BACK_REQUEST : Liste des ports UDP à ouvrir en entrée sur les interfaces secondaires
|
||||||
|
|
||||||
Les règles restrictives en sortie permettent d'éviter qu'un attaquant puisse accéder à tout le rester du réseau.
|
Les règles restrictives en sortie permettent d'éviter qu'un attaquant puisse accéder à tout le rester du réseau.
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ Switch Interne VLAN 30
|
||||||
- Nginx Public Beta : 10.0.2.5
|
- Nginx Public Beta : 10.0.2.5
|
||||||
- Mail Frontend : 10.0.2.10
|
- Mail Frontend : 10.0.2.10
|
||||||
- Mail Backend : 10.0.2.11
|
- Mail Backend : 10.0.2.11
|
||||||
|
- Nextcloud : 10.0.2.20
|
||||||
|
- Gitea : 10.0.2.21
|
||||||
- [...]
|
- [...]
|
||||||
- Firewall Alpha : 10.0.2.250
|
- Firewall Alpha : 10.0.2.250
|
||||||
- Firewall Bêta : 10.0.2.251
|
- Firewall Bêta : 10.0.2.251
|
||||||
|
|
Loading…
Reference in New Issue