iptables: use datacenter==phx2 for vpn-detection
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
eb45e4ef7c
commit
03f9a74f8d
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@
|
||||||
{% if proxy_tcp_ports is defined %}
|
{% if proxy_tcp_ports is defined %}
|
||||||
{% for port in proxy_tcp_ports %}
|
{% for port in proxy_tcp_ports %}
|
||||||
{% for proxy in (groups['proxies'] + groups['proxies-internal']) %}
|
{% for proxy in (groups['proxies'] + groups['proxies-internal']) %}
|
||||||
{% if hostvars[proxy]['vpn'] %}
|
{% if hostvars[proxy]['datacenter'] == "phx2" %}
|
||||||
-A INPUT -p tcp -m tcp --dport {{ port }} --src {{ hostvars[proxy]['ansible_tun0']['ipv4']['address'] }} -j ACCEPT
|
-A INPUT -p tcp -m tcp --dport {{ port }} --src {{ hostvars[proxy]['ansible_tun0']['ipv4']['address'] }} -j ACCEPT
|
||||||
{% else %}
|
{% else %}
|
||||||
-A INPUT -p tcp -m tcp --dport {{ port }} --src {{ hostvars[proxy]['ansible_eth0']['ipv4']['address'] }} -j ACCEPT
|
-A INPUT -p tcp -m tcp --dport {{ port }} --src {{ hostvars[proxy]['ansible_eth0']['ipv4']['address'] }} -j ACCEPT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue