|
@@ -93,7 +93,7 @@
|
93
|
93
|
creates={{ openvpn_dhparam }}
|
94
|
94
|
|
95
|
95
|
- name: Copy rc.local with firewall and dnsmasq rules into place
|
96
|
|
- copy: src=etc_rc.local dest=/etc/rc.local
|
|
96
|
+ template: src=etc_rc.local dest=/etc/rc.local
|
97
|
97
|
|
98
|
98
|
- name: Enable IPv4 traffic forwarding
|
99
|
99
|
sysctl: name=net.ipv4.ip_forward value=1
|
|
@@ -104,7 +104,7 @@
|
104
|
104
|
- iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
105
|
105
|
- iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
|
106
|
106
|
- iptables -A FORWARD -j REJECT
|
107
|
|
- - iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
|
|
107
|
+ - iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o {{ ansible_default_ipv4.interface }} -j MASQUERADE
|
108
|
108
|
|
109
|
109
|
- name: Copy OpenVPN configuration file into place
|
110
|
110
|
template: src=etc_openvpn_server.conf.j2 dest=/etc/openvpn/server.conf
|