diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index b1e397a..f96a4b3 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -70,4 +70,13 @@ notify: - restart loopback -- meta: flush_handlers +- meta: flush_handlers + +- name: Enable packet forwarding for IPv4 + sysctl: name="{{ item }}" value=1 + with_items: + - net.ipv4.ip_forward + - net.ipv4.conf.all.forwarding + +- name: Enable packet forwarding for IPv6 + sysctl: name=net.ipv6.conf.all.forwarding value=1 diff --git a/roles/security/tasks/main.yml b/roles/security/tasks/main.yml index 1ef078a..fdd4818 100644 --- a/roles/security/tasks/main.yml +++ b/roles/security/tasks/main.yml @@ -90,12 +90,6 @@ notify: - flush routing cache -- name: Enable packet forwarding for IPv4 - sysctl: name=net.ipv4.ip_forward value=1 - -- name: Enable packet forwarding for IPv6 - sysctl: name=net.ipv6.conf.all.forwarding value=1 - - name: Do not send ICMP redirects (we are not a router) sysctl: name=net.ipv4.conf.all.send_redirects value=0