ansible.fftdf.supernode/roles/01-vpn-offloader-setup/tasks/main.yml

45 lines
916 B
YAML
Raw Normal View History

2023-02-06 22:13:32 +00:00
---
2023-02-26 09:52:43 +00:00
- name: Setup NAT
ansible.builtin.iptables:
chain: POSTROUTING
table: nat
source: "{{ internal_network }}"
jump: MASQUERADE
2023-02-06 22:13:32 +00:00
- ansible.posix.sysctl:
name: kernel.panic
value: '1'
sysctl_file: /etc/sysctl.conf
- ansible.posix.sysctl:
name: net.ipv4.ip_forward
value: '1'
sysctl_set: true
state: present
reload: true
- ansible.posix.sysctl:
name: net.ipv6.conf.all.forwarding
value: '1'
sysctl_set: true
state: present
2023-03-02 19:25:22 +00:00
reload: true
- ansible.posix.sysctl:
name: net.ipv6.conf.ens19.proxy_ndp
value: '1'
sysctl_set: true
state: present
reload: true
- name: saveip6tables
shell: ip6tables-save > /etc/iptables/rules.v6
- name: saveip4tables
shell: iptables-save > /etc/iptables/rules.v4
- name: Create Routing Table 42
ansible.builtin.lineinfile:
path: /etc/iproute2/rt_tables
line: 42 ffrl
create: yes