Compare commits
15 Commits
v0.8.3-am
...
v0.8.6-tvi
Author | SHA1 | Date | |
---|---|---|---|
3b6da78d7c | |||
9a3f4d6a9f | |||
e771d47e79 | |||
a603ccd701 | |||
b14398b204 | |||
bdb484cc6e | |||
fa2dc0ed36 | |||
f8cf5f75d7 | |||
418676ee1e | |||
9d83f1894c | |||
c8fe45b95d | |||
98890660f8 | |||
53e5e4dc9e | |||
abd94f520c | |||
97e2d007d0 |
27
README.md
27
README.md
@ -12,4 +12,31 @@ prérequis : une machine Debian buster
|
|||||||
* r-int
|
* r-int
|
||||||
* r-ext
|
* r-ext
|
||||||
* s-proxy
|
* s-proxy
|
||||||
|
|
||||||
|
|
||||||
## Les playbooks
|
## Les playbooks
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
On utilisera l'image de machine virtuelle suivante :
|
||||||
|
* **debian-buster-gsb-2021b.ova** (2021-03-31)
|
||||||
|
* Bebian Buster 10.9 - 2 cartes - 1 Go - stockage 20 Go
|
||||||
|
|
||||||
|
|
||||||
|
### Machine s-adm
|
||||||
|
- créer la machine virtuelle **s-adm** en important l'image ova décrite plus haut
|
||||||
|
-
|
||||||
|
|
||||||
|
|
||||||
|
### Pour chaque machine
|
||||||
|
|
||||||
|
- importer la machine à partir du fichier **.ova**
|
||||||
|
- définir les cartes réseau en accord avec le plan d'adressage et le schéma
|
||||||
|
- donner le nom adapté (avec sed -i …)
|
||||||
|
- redémarrer
|
||||||
|
- mettre à jour les paquets : apt update && apt upgrade
|
||||||
|
- cloner le dépot : https://gitea.lyc-lecastel.fr/gadmin/gsb2021.git
|
||||||
|
|
||||||
|
|
||||||
|
curl depl/gsbboot|bash
|
@ -35,29 +35,6 @@
|
|||||||
name: nginx
|
name: nginx
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Copie de /etc/nginx/site-availables/proxy
|
|
||||||
copy:
|
|
||||||
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/proxy
|
|
||||||
dest: /etc/nginx/sites-available
|
|
||||||
|
|
||||||
- name: Suppression de /etc/nginx/sites-enabled/default
|
|
||||||
file:
|
|
||||||
path: /etc/nginx/sites-enabled/default
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Creation de lien symbolique avec /etc/nginx/sites-available/proxy dans /etc/nginx/sites-enabled/proxy
|
|
||||||
file:
|
|
||||||
src: /etc/nginx/sites-available/proxy
|
|
||||||
dest: /etc/nginx/sites-enabled/proxy
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
state: link
|
|
||||||
|
|
||||||
- name: Redemarage de Nginx
|
|
||||||
service:
|
|
||||||
name: nginx
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: Copie de config.php dans /root/nextcloud/nextcloud/config
|
- name: Copie de config.php dans /root/nextcloud/nextcloud/config
|
||||||
copy:
|
copy:
|
||||||
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/config.php
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/config.php
|
||||||
@ -87,3 +64,26 @@
|
|||||||
copy:
|
copy:
|
||||||
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/ssl-params.conf
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/ssl-params.conf
|
||||||
dest: /etc/nginx/snippets
|
dest: /etc/nginx/snippets
|
||||||
|
|
||||||
|
- name: Copie de /etc/nginx/site-availables/proxy
|
||||||
|
copy:
|
||||||
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/proxy
|
||||||
|
dest: /etc/nginx/sites-available
|
||||||
|
|
||||||
|
- name: Suppression de /etc/nginx/sites-enabled/default
|
||||||
|
file:
|
||||||
|
path: /etc/nginx/sites-enabled/default
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Creation de lien symbolique avec /etc/nginx/sites-available/proxy dans /etc/n$
|
||||||
|
file:
|
||||||
|
src: /etc/nginx/sites-available/proxy
|
||||||
|
dest: /etc/nginx/sites-enabled/proxy
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
state: link
|
||||||
|
|
||||||
|
- name: Redemarage de Nginx
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
@def $DEV_ADM = enp0s3;
|
@def $DEV_ADM = enp0s3;
|
||||||
@def $DEV_VPN = enp0s8;
|
@def $DEV_AG = enp0s8;
|
||||||
@def $DEV_EXT = enp0s9;
|
@def $DEV_VPN = enp0s9;
|
||||||
|
|
||||||
@def $NET_ADM=192.168.99.102/24;
|
@def $NET_ADM=192.168.99.102/24;
|
||||||
@def $NET_VPN=172.16.128.254/24;
|
@def $NET_AG=172.16.128.254/24;
|
||||||
@def $NET_EXT=192.168.0.52/30;
|
@def $NET_VPN=192.168.0.52/24;
|
||||||
|
|
||||||
table filter {
|
table filter {
|
||||||
chain INPUT {
|
chain INPUT {
|
||||||
@ -23,28 +23,21 @@ table filter {
|
|||||||
interface lo ACCEPT;
|
interface lo ACCEPT;
|
||||||
|
|
||||||
# allow SSH connections
|
# allow SSH connections
|
||||||
#interface ($DEV_ADM) {
|
|
||||||
proto tcp dport ssh ACCEPT;
|
proto tcp dport ssh ACCEPT;
|
||||||
#}
|
|
||||||
|
|
||||||
# allow DNS connections
|
# allow DNS connections
|
||||||
#interface ($DEV_INT) {
|
|
||||||
proto udp sport domain ACCEPT;
|
proto udp sport domain ACCEPT;
|
||||||
proto udp dport domain ACCEPT;
|
proto udp dport domain ACCEPT;
|
||||||
#}
|
|
||||||
|
|
||||||
# DHCP
|
|
||||||
proto udp dport (67 68) ACCEPT;
|
|
||||||
|
|
||||||
# allow IPsec
|
# allow IPsec
|
||||||
interface ($DEV_VPN $DEV_EXT) {
|
interface ($DEV_AG $DEV_VPN) {
|
||||||
proto udp sport 500 ACCEPT;
|
proto udp sport 500 ACCEPT;
|
||||||
proto udp dport 500 ACCEPT;
|
proto udp dport 500 ACCEPT;
|
||||||
proto esp ACCEPT;
|
proto esp ACCEPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Autoriser nat-t-ike
|
# Autoriser nat-t-ike
|
||||||
# interface ($DEV_VPN) {
|
# interface ($DEV_AG) {
|
||||||
proto udp sport 4500 ACCEPT;
|
proto udp sport 4500 ACCEPT;
|
||||||
proto udp dport 5500 ACCEPT;
|
proto udp dport 5500 ACCEPT;
|
||||||
# }
|
# }
|
||||||
@ -54,52 +47,16 @@ table filter {
|
|||||||
proto (udp tcp) dport domain ACCEPT;
|
proto (udp tcp) dport domain ACCEPT;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
# autoriser supervision
|
|
||||||
proto udp sport 161 ACCEPT;
|
|
||||||
|
|
||||||
# autoriser NTP
|
# autoriser NTP
|
||||||
proto udp sport 123 ACCEPT;
|
proto udp sport 123 ACCEPT;
|
||||||
|
|
||||||
# respond to ping
|
|
||||||
proto icmp mod limit limit 30/minut ACCEPT;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
chain OUTPUT {
|
chain OUTPUT {
|
||||||
policy DROP;
|
policy ACCEPT;
|
||||||
# interface ($DEV_PUB) {
|
|
||||||
|
|
||||||
# Autoriser SSH
|
|
||||||
proto tcp sport ssh ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser DNS
|
|
||||||
proto udp dport domain ACCEPT;
|
|
||||||
proto udp sport domain ACCEPT;
|
|
||||||
|
|
||||||
# DHCP
|
|
||||||
proto udp sport (67 68) ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser ipsec
|
|
||||||
proto udp dport 500 ACCEPT;
|
|
||||||
proto udp sport 500 ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser nat-t-ike
|
|
||||||
proto udp dport 4500 ACCEPT;
|
|
||||||
proto udp sport 4500 ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser supervision
|
|
||||||
proto udp dport 161 ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser NTP
|
|
||||||
proto udp dport 123 ACCEPT;
|
|
||||||
|
|
||||||
# respond to ping
|
|
||||||
proto icmp ACCEPT;
|
|
||||||
|
|
||||||
# }
|
|
||||||
|
|
||||||
# connection tracking
|
# connection tracking
|
||||||
#mod state state INVALID DROP;
|
# mod state state INVALID DROP;
|
||||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
# mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||||
}
|
}
|
||||||
chain FORWARD {
|
chain FORWARD {
|
||||||
policy ACCEPT;
|
policy ACCEPT;
|
||||||
@ -108,15 +65,4 @@ table filter {
|
|||||||
mod state state INVALID DROP;
|
mod state state INVALID DROP;
|
||||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# IPv6:
|
|
||||||
#domain ip6 {
|
|
||||||
# table filter {
|
|
||||||
# chain INPUT {
|
|
||||||
# policy ACCEPT;
|
|
||||||
# # ...
|
|
||||||
# }
|
|
||||||
# # ...
|
|
||||||
# }
|
|
||||||
#}
|
|
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
- name : installer ferm
|
- name : installer ferm
|
||||||
apt: name=ferm state=present
|
apt: name=ferm state=present
|
||||||
- name: fichier parefeu pour VPN
|
|
||||||
copy: src=ferm.conf dest=/etc/ferm/ferm.conf
|
- name: fichier parefeu pour VPN
|
||||||
notify:
|
copy: src=ferm.conf dest=/etc/ferm/ferm.conf
|
||||||
- Restart ferm
|
notify:
|
||||||
|
- Restart ferm
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
@def $NET_ADM=192.168.99.112/24;
|
@def $NET_ADM=192.168.99.112/24;
|
||||||
@def $NET_VPN=192.168.0.51/24;
|
@def $NET_VPN=192.168.0.51/24;
|
||||||
@def $NET_EXT=192.168.1.2/30;
|
@def $NET_EXT=192.168.1.2/24;
|
||||||
|
|
||||||
table filter {
|
table filter {
|
||||||
chain INPUT {
|
chain INPUT {
|
||||||
@ -23,15 +23,13 @@ table filter {
|
|||||||
interface lo ACCEPT;
|
interface lo ACCEPT;
|
||||||
|
|
||||||
# allow SSH connections
|
# allow SSH connections
|
||||||
#interface ($DEV_ADM) {
|
|
||||||
proto tcp dport ssh ACCEPT;
|
proto tcp dport ssh ACCEPT;
|
||||||
#}
|
|
||||||
|
|
||||||
# allow DNS connections
|
# allow DNS connections
|
||||||
#interface ($DEV_INT) {
|
|
||||||
proto udp sport domain ACCEPT;
|
proto udp sport domain ACCEPT;
|
||||||
proto udp dport domain ACCEPT;
|
proto udp dport domain ACCEPT;
|
||||||
#}
|
|
||||||
|
|
||||||
# allow IPsec
|
# allow IPsec
|
||||||
interface ($DEV_VPN) {
|
interface ($DEV_VPN) {
|
||||||
@ -51,49 +49,13 @@ table filter {
|
|||||||
# proto (udp tcp) dport domain ACCEPT;
|
# proto (udp tcp) dport domain ACCEPT;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
# autoriser supervision
|
|
||||||
proto udp sport 161 ACCEPT;
|
|
||||||
|
|
||||||
# autoriser NTP
|
# autoriser NTP
|
||||||
proto udp sport 123 ACCEPT;
|
proto udp sport 123 ACCEPT;
|
||||||
|
|
||||||
# respond to ping
|
|
||||||
proto icmp mod limit limit 30/minut ACCEPT;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
chain OUTPUT {
|
chain OUTPUT {
|
||||||
policy DROP;
|
policy ACCEPT;
|
||||||
# interface ($DEV_PUB) {
|
|
||||||
|
|
||||||
# Autoriser SSH
|
|
||||||
proto tcp sport ssh ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser DNS
|
|
||||||
proto udp dport domain ACCEPT;
|
|
||||||
proto udp sport domain ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser ipsec
|
|
||||||
proto udp dport 500 ACCEPT;
|
|
||||||
proto udp sport 500 ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser nat-t-ike
|
|
||||||
proto udp dport 4500 ACCEPT;
|
|
||||||
proto udp sport 4500 ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser supervision
|
|
||||||
proto udp dport 161 ACCEPT;
|
|
||||||
|
|
||||||
# Autoriser NTP
|
|
||||||
proto udp dport 123 ACCEPT;
|
|
||||||
|
|
||||||
# respond to ping
|
|
||||||
proto icmp ACCEPT;
|
|
||||||
|
|
||||||
# }
|
|
||||||
|
|
||||||
# connection tracking
|
|
||||||
#mod state state INVALID DROP;
|
|
||||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
|
||||||
}
|
}
|
||||||
chain FORWARD {
|
chain FORWARD {
|
||||||
policy ACCEPT;
|
policy ACCEPT;
|
||||||
@ -102,15 +64,4 @@ table filter {
|
|||||||
mod state state INVALID DROP;
|
mod state state INVALID DROP;
|
||||||
mod state state (ESTABLISHED RELATED) ACCEPT;
|
mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# IPv6:
|
|
||||||
#domain ip6 {
|
|
||||||
# table filter {
|
|
||||||
# chain INPUT {
|
|
||||||
# policy ACCEPT;
|
|
||||||
# # ...
|
|
||||||
# }
|
|
||||||
# # ...
|
|
||||||
# }
|
|
||||||
#}
|
|
@ -1,10 +1,8 @@
|
|||||||
---
|
---
|
||||||
- name : installer ferm
|
- name : installer ferm
|
||||||
apt: name=ferm state=present
|
apt: name=ferm state=present
|
||||||
|
|
||||||
- name: fichier parefeu pour VPN
|
- name: fichier parefeu pour VPN
|
||||||
copy: src=ferm.conf dest=/etc/ferm/ferm.conf
|
copy: src=ferm.conf dest=/etc/ferm/ferm.conf
|
||||||
|
notify:
|
||||||
- name: Restart ferm
|
- Restart ferm
|
||||||
name: ferm
|
|
||||||
state: restarted
|
|
@ -8,6 +8,7 @@
|
|||||||
get_url:
|
get_url:
|
||||||
url: "{{ depl_url }}/{{ depl_fog }}"
|
url: "{{ depl_url }}/{{ depl_fog }}"
|
||||||
dest: /root/fog
|
dest: /root/fog
|
||||||
|
remote_src: yes
|
||||||
|
|
||||||
- name: decompression du fichier d'installation de fog
|
- name: decompression du fichier d'installation de fog
|
||||||
unarchive:
|
unarchive:
|
||||||
|
Reference in New Issue
Block a user