2022-07-13 12:52:07 +02:00
|
|
|
Host gateway
|
|
|
|
HostName tunnel-end.a-0.me
|
|
|
|
User ssh-tunnel
|
|
|
|
Port 22
|
|
|
|
IdentityFile /home/autossh/.ssh/tunnel-key
|
|
|
|
IdentitiesOnly yes
|
|
|
|
ExitOnForwardFailure yes
|
|
|
|
ServerAliveInterval 5
|
|
|
|
ServerAliveCountMax 3
|
2023-01-09 13:32:32 +01:00
|
|
|
{% for forwarding in remote_forward %}
|
2022-07-13 12:52:07 +02:00
|
|
|
RemoteForward localhost:{{ forwarding.ephemeral_port }} {{ forwarding.dest_host }}:{{ forwarding.dest_port }}
|
2023-01-09 13:32:32 +01:00
|
|
|
{% 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 }}
|
2022-07-13 12:52:07 +02:00
|
|
|
{% endfor %}
|