From 813548bba58e9d605dac3761e16d3117f5c9947f Mon Sep 17 00:00:00 2001 From: "Philip (a-0)" <@ph:a-0.me> Date: Mon, 9 Jan 2023 13:34:43 +0100 Subject: [PATCH] minor correction in LocalForward --- README.md | 2 +- templates/local/ssh_config.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b92249f..a5edfc1 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,6 @@ An ansible role to set up an ssh tunnel and port forwardings from the remote mac ``` local_forward: - 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 ``` \ No newline at end of file diff --git a/templates/local/ssh_config.j2 b/templates/local/ssh_config.j2 index 141fa37..ab9dba0 100644 --- a/templates/local/ssh_config.j2 +++ b/templates/local/ssh_config.j2 @@ -11,5 +11,5 @@ Host gateway 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 }} + LocalForward {{ query('community.general.dig', inventory_hostname, 'qtype=A') | first }}:{{ forwarding.local_port }} {{ forwarding.remote_bind_ip }}:{{ forwarding.remote_port }} {% endfor %} \ No newline at end of file