From 9d5316df241475aa0c64a77fdab2944cdb64dfc8 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Mon, 16 Feb 2026 14:21:46 +0100 Subject: [PATCH] feat: enable ipv4 and ipv6 forwarding via sysctl --- tasks/routing.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tasks/routing.yaml b/tasks/routing.yaml index 5a2da02..c37db8e 100644 --- a/tasks/routing.yaml +++ b/tasks/routing.yaml @@ -7,3 +7,17 @@ - "ip6tables" state: "present" update_cache: true + +- name: "enable ipv4 forwarding" + ansible.posix.sysctl: + name: "net.ipv4.ip_forward" + value: "1" + sysctl_set: true + state: present + +- name: "enable ipv6 forwarding" + ansible.posix.sysctl: + name: "net.ipv6.conf.all.forwarding" + value: "1" + sysctl_set: true + state: present