From 3fafa03aeb3640a86d9cd8c639d085df6a8d085d Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 20 May 2016 01:19:27 +0200 Subject: Set up IPSec tunnels between each pair of hosts. We use a dedicated, non-routable, IPv4 subnet for IPSec. Furthermore the subnet is nullrouted in the absence of xfrm lookup (i.e., when there is no matching IPSec Security Association) to avoid data leaks. Each host is associated with an IP in that subnet (thus only reachble within that subnet, either by the host itself or by its IPSec peers). The peers authenticate each other using RSA public key authentication. Kernel traps are used to ensure that connections are only established when traffic is detected between the peers; after 30m of inactivity (this value needs to be less than the rekeying period) the connection is brought down and a kernel trap is installed. --- roles/common/handlers/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'roles/common/handlers') diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index ebb40a0..6ca53be 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -17,9 +17,15 @@ - name: Update rkhunter's data file command: /usr/bin/rkhunter --propupd +- name: Update firewall + command: /usr/local/sbin/update-firewall.sh -c + - name: Restart fail2ban service: name=fail2ban state=restarted +- name: Restart IPSec + service: name=ipsec state=restarted + - name: Reload networking # /etc/init.d/networking doesn't answer the status command; but since # it should be "up" whenever ansible has access to the machine, we use -- cgit v1.2.3