exit-ip: explicitly enable IPv4 forwarding for the primary interface

This commit is contained in:
Markus 2020-02-20 09:45:46 +01:00
parent d68d29e0eb
commit aec38f1dd4
1 changed files with 4 additions and 1 deletions

View File

@ -3,9 +3,12 @@
- name: Install iptables-persistent
apt: name=iptables-persistent
- name: Enable IPv4 routing
- name: Enable IPv4 routing (globally)
sysctl: name=net.ipv4.ip_forward value=1 state=present
- name: Enable IPv4 routing (primary interface)
sysctl: name=net.ipv4.conf.{{ ansible_default_ipv4.interface }}.forwarding value=1 state=present
- name: Load nf_conntrack module
modprobe: name=nf_conntrack