|
|
|
|
@ -21,6 +21,7 @@
|
|
|
|
|
apt: |
|
|
|
|
name: [iptables, iptables-persistent] |
|
|
|
|
state: present |
|
|
|
|
when: do_routing |
|
|
|
|
|
|
|
|
|
- name: add DNAT rules for containers |
|
|
|
|
tags: routing |
|
|
|
|
@ -36,6 +37,7 @@
|
|
|
|
|
to_destination: "{{ hostvars[item]['internal_ip'] }}" |
|
|
|
|
become: yes |
|
|
|
|
with_items: "{{ groups['containers'] }}" |
|
|
|
|
when: do_routing |
|
|
|
|
|
|
|
|
|
- name: save DNAT rules on lxd host |
|
|
|
|
tags: routing |
|
|
|
|
@ -44,6 +46,7 @@
|
|
|
|
|
table: nat |
|
|
|
|
state: saved |
|
|
|
|
path: /etc/iptables/rules.v4 |
|
|
|
|
when: do_routing |
|
|
|
|
|
|
|
|
|
# TODO: add other dnat ports in above loop? |
|
|
|
|
#- name: add dokuwiki DNAT routing |
|
|
|
|
|