Can't resolve hostname when connected to computer via VPN

Viewed 199

I have computer with self hosted WireGuard VPN in docker container. When I'm in local network and I'm not connected trough VPN, it's possible to connect with machine using hostname instead ip address:

ssh username@computer_name

but when I'll connect trough VPN from external network then I have to use local ip addresess like

ssh username@xxx.xxx.x.x

because when I try use hostname I receive message:

ssh: Could not resolve hostname computer_name: Unknown host.

The machine with the VPN is the same machine I am trying to connect to via ssh using hostname.

0 Answers
Related