Merge branch 'routing' into 'newinfra'

[sysctl-fowarding] Enable IP forwarding on routers

See merge request nounous/ansible!50
certbot_on_virtu
_benjamin 2020-08-16 10:24:35 +02:00
commit 59026f8151
3 changed files with 16 additions and 1 deletions

View File

@ -1,9 +1,10 @@
#!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
--- ---
# Deploy iproute2 config file # Deploy iproute2 and sysctl config files
- hosts: crans_routeurs - hosts: crans_routeurs
roles: roles:
- iproute2 - iproute2
- sysctl-forwarding
# Deploy firewall # Deploy firewall
- hosts: crans_routeurs - hosts: crans_routeurs

View File

@ -0,0 +1,5 @@
---
- name: Deploy sysctl configuration
template:
src: sysctl.d/10-forwarding.conf.j2
dest: /etc/sysctl.d/10-forwarding.conf

View File

@ -0,0 +1,9 @@
{{ ansible_header | comment }}
# Enable packet forwarding for IPv4
net.ipv4.ip_forward=1
# Enable packet forwarding for IPv6
# Enabling this option disables Stateless Address Autoconfiguration
# based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1