security/tor: add VIPs to listening interfaces

PR: https://forum.opnsense.org/index.php?topic=6208.0
This commit is contained in:
Franco Fichtner 2017-10-20 19:04:08 +00:00
parent 9c363e6ebe
commit 463dd0b21a

View file

@ -25,6 +25,19 @@ SOCKSPort {{ interface_ip }}:{{ OPNsense.tor.general.socks_listen_port|default('
SOCKSPort [{{ interface_ip }}]:{{ OPNsense.tor.general.socks_listen_port|default('9050') }}
{% endif %}
{% endif %}
{% if helpers.exists('virtualip') %}
{% for intf_item in helpers.toList('virtualip.vip') %}
{% if intf_item.interface == listen_interface and intf_item.type == 'single' %}
{% if intf_item.subnet.find(':') > -1 %}
# {{ listen_interface }}: IPv6 VIP
SOCKSPort [{{ intf_item.subnet }}]:{{ OPNsense.tor.general.socks_listen_port|default('9050') }}
{% else %}
# {{ listen_interface }}: IPv4 VIP
SOCKSPort {{ intf_item.subnet }}:{{ OPNsense.tor.general.socks_listen_port|default('9050') }}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}