From 60fafed9cd460b24c6d73f0cd1bfb4a1dd651b08 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Sat, 9 Dec 2023 13:04:07 -0500 Subject: [PATCH] Update forward-ssh.sh script for Swarm support - Address limitations in Swarm with loopback binding - Ensure compatibility with localhost DNS wildcard A record - Enable port forwarding on 80 and 443 using VM IP for Swarm compatibility - Retain 8443:localhost:8443 for non-Swarm setups --- forward-ssh.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forward-ssh.sh b/forward-ssh.sh index da1638a..7b89430 100755 --- a/forward-ssh.sh +++ b/forward-ssh.sh @@ -41,8 +41,8 @@ function ssh_connect { printf "[INFO]: Starting new vagrant SSH tunnel on PID " sudo -u "$USER" ssh -fNT -i "$PRIVATE_KEY" \ -L 22:localhost:22 \ - -L 80:localhost:80 \ - -L 443:localhost:443 \ + -L 80:"$HOST_IP":80 \ + -L 443:"$HOST_IP":443 \ -L 8443:localhost:8443 \ -o UserKnownHostsFile=/dev/null \ -o StrictHostKeyChecking=no \