Hostnames not resolving through OpenVPN connection

Hello,
when in LAN I can connect to my NAS with either hostname \\My-NAS or IP 192.168.2.100. But when I connect through OpenVPN, only IP works. Is there a way for OpenVPN client to have access to hostnames as well? Likes the ones you can add through Luci > Network > Hostnames.

I think you will have to add correct entry in /etc/hosts (on the OpenVPN client device) for the NAS:
e.g.
127.0.0.1 localhost
192.168.2.100 nas

But could I ask you about your firewall config (zones/port forwarding)?
I also use VPN but I cannot reach other hosts in my local network via OpenVPN.

I set it up entirely in Foris and use official OpenVPN clients for Windows and Android and it just works :). There must be some kind of option or switch to give VPN clients access to hostnames. Hardcoding IPs in hosts would defeat their purpose to resolve even if IP changes. I want that freedom to be able to avoid setting every device with static IP or at least have full control in Turris instead of updating all clients manually with every IP change.

1 Like

Check also DNS tab in Foris and enable “Enable DHCP clients in DNS”

1 Like

This did it thanks! Have to append suffix for it to work \\My-NAS.lan

This is done by LuCi “DHCP and DNS” section in general settings.