Hi, I tried SSH tunnelling several times, but never made it to work, so might be time to start from scratch... I have in my office desktop running TW, at home notebook running TW, and in the office also Synology NAS running some (Debian- based?) Linux. The NAS has public as well as internal IP and I have fully admin control over it. I can SSH to the NAS and from it to the desktop. Fine. But I'd prefer direct connection (let's disregard VPN for a moment). I vaguely remember I'd have to open new SSH port on the NAS, but I'm not sure if I need there also extra SSH service...? And how I then tunnel from notebook to the desktop via NAS...? Thanks, V. -- Vojtěch Zeisek https://trapa.cz/ Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/
Hello Vojtěch, Am Dienstag, 30. November 2021, 11:04:09 CET schrieb Vojtěch Zeisek:
I tried SSH tunnelling several times, but never made it to work, so might be time to start from scratch... I have in my office desktop running TW, at home notebook running TW, and in the office also Synology NAS running some (Debian- based?) Linux. The NAS has public as well as internal IP and I have fully admin control over it. I can SSH to the NAS and from it to the desktop. Fine. But I'd prefer direct connection (let's disregard VPN for a moment). I vaguely remember I'd have to open new SSH port on the NAS, but I'm not sure if I need there also extra SSH service...? And how I then tunnel from notebook to the desktop via NAS...?
Have you tried port forwarding? Cheers Axel
Hello Dne úterý 30. listopadu 2021 11:19:39 CET jste napsal(a):
Hello Vojtěch,
Am Dienstag, 30. November 2021, 11:04:09 CET schrieb Vojtěch Zeisek:
I tried SSH tunnelling several times, but never made it to work, so might be time to start from scratch... I have in my office desktop running TW, at home notebook running TW, and in the office also Synology NAS running some (Debian- based?) Linux. The NAS has public as well as internal IP and I have fully admin control over it. I can SSH to the NAS and from it to the desktop. Fine. But I'd prefer direct connection (let's disregard VPN for a moment). I vaguely remember I'd have to open new SSH port on the NAS, but I'm not sure if I need there also extra SSH service...? And how I then tunnel from notebook to the desktop via NAS...?
Have you tried port forwarding?
This option didn't came to my mind, looks interesting, it could be simple. If I look correctly at the documentation. But if I read <https://kb.synology.com/ en-global/DSM/help/DSM/AdminCenter/connection_routerconf?version=7> correctly it's rather about tunnelling via another network router, not about using the Synology as the tunnelling thing. I can do nothing with network router. So I'm not sure if it's doable... -- Vojtěch Zeisek https://trapa.cz/ Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/
W dniu 30.11.2021 o 11:04, Vojtěch Zeisek pisze:
Hi, I tried SSH tunnelling several times, but never made it to work, so might be time to start from scratch... I have in my office desktop running TW, at home notebook running TW, and in the office also Synology NAS running some (Debian- based?) Linux. The NAS has public as well as internal IP and I have fully admin control over it. I can SSH to the NAS and from it to the desktop. Fine. But I'd prefer direct connection (let's disregard VPN for a moment). I vaguely remember I'd have to open new SSH port on the NAS, but I'm not sure if I need there also extra SSH service...? And how I then tunnel from notebook to the desktop via NAS...? Thanks, V.
You cannot have a "direct" connection (there's always be some kind of tunneling, whether it's ssh or vpn). But you can emulate one by using "ssh -J" or ProxyJump in .ssh/config. In your case it will look like this: ssh -J nas_public_ip desktop_private_ip or in .ssh/config Host desktop HostName desktop_private_ip ProxyJump nas_public_ip
Dne úterý 30. listopadu 2021 13:29:50 CET, Adam Mizerski napsal(a):
W dniu 30.11.2021 o 11:04, Vojtěch Zeisek pisze:
I tried SSH tunnelling several times, but never made it to work, so might be time to start from scratch... I have in my office desktop running TW, at home notebook running TW, and in the office also Synology NAS running some (Debian- based?) Linux. The NAS has public as well as internal IP and I have fully admin control over it. I can SSH to the NAS and from it to the desktop. Fine. But I'd prefer direct connection (let's disregard VPN for a moment). I vaguely remember I'd have to open new SSH port on the NAS, but I'm not sure if I need there also extra SSH service...? And how I then tunnel from notebook to the desktop via NAS...?
You cannot have a "direct" connection (there's always be some kind of tunneling, whether it's ssh or vpn). But you can emulate one by using "ssh -J" or ProxyJump in .ssh/config.
In your case it will look like this: ssh -J nas_public_ip desktop_private_ip
or in .ssh/config Host desktop HostName desktop_private_ip ProxyJump nas_public_ip
This is perfect trick! Works fantastically! Thank You! -- Vojtěch Zeisek https://trapa.cz/ Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/
participants (3)
-
Adam Mizerski
-
Axel Braun
-
Vojtěch Zeisek