minor correction in LocalForward

This commit is contained in:
Philip (a-0) 2023-01-09 13:34:43 +01:00
parent c91f34e0b4
commit 813548bba5
2 changed files with 2 additions and 2 deletions

View file

@ -17,6 +17,6 @@ An ansible role to set up an ssh tunnel and port forwardings from the remote mac
``` ```
local_forward: local_forward:
- local_port: 1234 # port bound on local machine, IP is automatically queried as A-record of inventory_hostname - local_port: 1234 # port bound on local machine, IP is automatically queried as A-record of inventory_hostname
remote_host: the-remote-server.domain.tld # remote server to forward to remote_bind_ip: 127.0.0.98 # the IP some service on the remote machine is listening on
remote_port: the remote machine's port to forward the traffic to remote_port: the remote machine's port to forward the traffic to
``` ```

View file

@ -11,5 +11,5 @@ Host gateway
RemoteForward localhost:{{ forwarding.ephemeral_port }} {{ forwarding.dest_host }}:{{ forwarding.dest_port }} RemoteForward localhost:{{ forwarding.ephemeral_port }} {{ forwarding.dest_host }}:{{ forwarding.dest_port }}
{% endfor %} {% endfor %}
{% for forwarding in local_forward %} {% for forwarding in local_forward %}
LocalForward {{ query('community.general.dig', inventory_hostname, 'qtype=A') | first }}:{{ forwarding.local_port }} {{ forwarding.remote_host }}:{{ forwarding.remote_port }} LocalForward {{ query('community.general.dig', inventory_hostname, 'qtype=A') | first }}:{{ forwarding.local_port }} {{ forwarding.remote_bind_ip }}:{{ forwarding.remote_port }}
{% endfor %} {% endfor %}