enabled IP forwarding
This commit is contained in:
@@ -31,6 +31,15 @@
|
|||||||
name: "wg-quick@{{ wg_interface }}"
|
name: "wg-quick@{{ wg_interface }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
- name: enable IP forwarding
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/sysctl.conf
|
||||||
|
regexp: "{{ item }}"
|
||||||
|
line: "{{ item }}=1"
|
||||||
|
with_items:
|
||||||
|
- net.ipv4.ip_forward
|
||||||
|
- net.ipv6.conf.all.forwarding
|
||||||
|
notify: reload sysconfig
|
||||||
handlers:
|
handlers:
|
||||||
- name: read wg config
|
- name: read wg config
|
||||||
service:
|
service:
|
||||||
@@ -40,6 +49,8 @@
|
|||||||
# command: "wg setconf {{ wg_interface }} /etc/wireguard/{{ wg_interface }}.conf"
|
# command: "wg setconf {{ wg_interface }} /etc/wireguard/{{ wg_interface }}.conf"
|
||||||
# - name: reload interface
|
# - name: reload interface
|
||||||
# shell: "ifdown {{ wg_interface }}; ifup {{ wg_interface }}"
|
# shell: "ifdown {{ wg_interface }}; ifup {{ wg_interface }}"
|
||||||
|
- name: reload sysconfig
|
||||||
|
command: sysctl -p /etc/sysctl.conf
|
||||||
- name: Generate client configs
|
- name: Generate client configs
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
tasks:
|
tasks:
|
||||||
|
|||||||
Reference in New Issue
Block a user