Hi!
I have a NAS at home running dockerised mailcow. It’s connected to a VPS with a public IPv4 address via a reverse SSH tunnel. The setup works fine for the most part, however mailcow thinks it’s IP address is the local address rather than the VPS’ public address. Here’s the tunnel setup, so we’re all on the same page:
[Unit]
Description=Reverse SSH Tunnel for Privileged Mail Ports to VPS (as root)
After=network-online.target
Wants=network-online.target
[Service]
User=malik
Environment=HOME=/home/malik
ExecStart=/usr/bin/autossh -M 0 -N \
-o "ServerAliveInterval=60" -o "ServerAliveCountMax=3" \
-i /home/malik/.ssh/vps_autossh \
-R 127.0.0.1:25:localhost:25 \
-R 127.0.0.1:465:localhost:465 \
-R 127.0.0.1:587:localhost:587 \
-R 127.0.0.1:143:localhost:143 \
-R 127.0.0.1:993:localhost:993 \
-R 127.0.0.1:110:localhost:110 \
-R 127.0.0.1:995:localhost:995 \
-R 127.0.0.1:4190:localhost:4190 \
root@212.227.63.142
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Any ideas on how to fix this?