Added LocalForward

This commit is contained in:
Philip (a-0) 2023-01-09 13:32:32 +01:00
parent 56581dd690
commit c91f34e0b4
3 changed files with 15 additions and 5 deletions

View file

@ -7,6 +7,9 @@ Host gateway
ExitOnForwardFailure yes
ServerAliveInterval 5
ServerAliveCountMax 3
{% for forwarding in tunneled_ports %}
{% for forwarding in remote_forward %}
RemoteForward localhost:{{ forwarding.ephemeral_port }} {{ forwarding.dest_host }}:{{ forwarding.dest_port }}
{% endfor %}
{% for forwarding in local_forward %}
LocalForward {{ query('community.general.dig', inventory_hostname, 'qtype=A') | first }}:{{ forwarding.local_port }} {{ forwarding.remote_host }}:{{ forwarding.remote_port }}
{% endfor %}