From 95f812e2a877fb4d66ccc6c66e50be9637c538c9 Mon Sep 17 00:00:00 2001 From: poulpe <poulpe@localhost.localdomain> Date: Sat, 8 Apr 2023 22:22:53 +0200 Subject: [PATCH] [Update] Test ping + config wireguard less permissive --- Config_Wireguard.yml | 4 +++- templates/wireguard_config_template_H1.j2 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Config_Wireguard.yml b/Config_Wireguard.yml index 3cbe7d6..7809c83 100644 --- a/Config_Wireguard.yml +++ b/Config_Wireguard.yml @@ -139,8 +139,10 @@ - name: Test connectivity from H1 to H2 hosts: H1 tasks: + - name: Ping form H1 to H2 - ansible.builtin.shell: "ping 10.0.0.1 -c 1" + ansible.netcommon.net_ping: + dest: 10.0.0.1 register: result - name: Print result diff --git a/templates/wireguard_config_template_H1.j2 b/templates/wireguard_config_template_H1.j2 index b17be71..faba16c 100644 --- a/templates/wireguard_config_template_H1.j2 +++ b/templates/wireguard_config_template_H1.j2 @@ -6,4 +6,4 @@ PrivateKey = {{ keys["H1PRIV"] }} [Peer] PublicKey = {{ keys["H2PUB"] }} Endpoint = 3.0.0.2:51820 -AllowedIPs = 0.0.0.0/0, ::/0 +AllowedIPs = 10.0.0.0/24 -- GitLab