My issue is that many of my remote desktop apps require knowing the IP adress of the other PC. I’m looking for a VPN that auto-discovers other devices on the same network. That way I could just “ssh” into the same IP every time, because it would be IP inside of a virtual network. Ideally I am looking a solution that does not require internet connection.

Thanks.

Edit: I should probably specify my usecase. I have a portable desktop and use VNC from a laptop to connect to it. To do that I need the IP of the desktop but that’s different on a different network. This can be solved by using hostname.local as the “IP”. (hostname is the “ubuntu” in “bob@ubuntu$:~/Documents”) The solution is quite simple, I just haven’t known about it.

15 points

I don’t think you need a VPN here since you’re using an already secure protocol. Sounds like you’re mostly wanting a static IP address. You can configure the local router to hand out static IPs. Local DNS works too.

permalink
report
reply
0 points

Static IPs are not a thing in most countries. You need an overlay network or dynamic DNS like NoIP.

permalink
report
parent
reply
9 points

Static IPs handed out by your local router are not dependent on having a static IP from your ISP. You do not need one to have the other. You can always have static IPs on your local network.

permalink
report
parent
reply
2 points

Ah okay but is that useful in many cases? Only when you are home.

permalink
report
parent
reply
8 points

DNS hostnames

permalink
report
reply

I don’t want to be mean but searching “DNS hostnames” just gives generic AI generated “DNS explained” articles. This answer is helpful only if you already know that mDNS exists.

permalink
report
parent
reply
3 points

Sorry was busy but wanted to make the comment at least earlier. I think .local is specific to mDNS, but using just the hostname (ie; mypcname) should work as well.

permalink
report
parent
reply

mDNS solves this. It may actually work out of the box. Try ssh’ing into your-device-name.local. If that fails, check your devices’ names and if they have Avahi/Bonjour/mDNS enabled.

Something like Tailscale will set up a VPN with hostnames and IP addresses for you (and you can host your own entry server if you don’t want to use the cloud stuff). That’ll work across networks. It’ll also add overhead and it’s probably overkill for your use case, though.

permalink
report
reply

Thanks, it does indeed work. I guess I’ll add a wireguard tunnel so that I won’t have to bother with the “do you trust the fingerprint?” every time I’m on a different network or when the IP changes.

permalink
report
parent
reply

If you use the .local syntax, and the device name stays the same, I think the domain name based fingerprint should prevent the “do you trust this fingerprint” problem.

If you want to avoid the question all together, you could set up an SSH certificate authority (quick guide here, less dense guides are available on the internet). By signing the servers’ host keys, you can prevent the trust on first use prompt entirely, even for servers you may not have logged into before.

permalink
report
parent
reply

Actually I want to use the wireguard tunnel regardless because right now I am tunneling VNC through SSH, which is laggy because it’s TCP. But thanks either way.

permalink
report
parent
reply
7 points

You can configure wireguard to achieve this solution.

You can always enable mDNS/DNS-SD (aka zeroconf) protocol as well

permalink
report
reply

Thanks, I did not know about mDNS. I will use this.

permalink
report
parent
reply
7 points

couldnt you use device / hostname instead?

permalink
report
reply

Unfortunately the router at my gf’s house does not resolve the hostname, so no. Though thanks for the suggestion, I feel kinda stupid for not trying that.

Edit: I’m a noob. Solved by adding “.local” suffix after the hostname.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.9K

    Monthly active users

  • 5.6K

    Posts

  • 154K

    Comments