Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
OpenVPN local name resolution not working
« previous
next »
Print
Pages: [
1
]
Author
Topic: OpenVPN local name resolution not working (Read 2123 times)
patrick3000
Jr. Member
Posts: 87
Karma: 6
OpenVPN local name resolution not working
«
on:
April 16, 2023, 07:41:46 pm »
I have recently set up an OpenVPN server for access to my local network from the road. I followed this guide:
https://docs.opnsense.org/manual/how-tos/sslvpn_client.html
. It works except that there is no local name resolution when connecting over the VPN. In other words, I can resolve names on the public Internet, but not names on my local network.
I have tried several different things to fix this, including specifying the DNS server under "client settings" in the VPN server configuration as 192.168.1.1, which is the address of the server on the LAN interface, and adding the OpenVPN tunnel to the Unbound access list. I don't think it's a firewall problem, because I added a rule to allow everything from OpenVPN.
Does anyone know how to fix this and get DNS working for local name resolution over OpenVPN?
Logged
patrick3000
Jr. Member
Posts: 87
Karma: 6
Re: OpenVPN local name resolution not working
«
Reply #1 on:
April 16, 2023, 11:43:44 pm »
As sometimes happens, I solved this on my own. I am new to OPNsense but previously used PfSense for a while, and getting local DNS resolution to work over OpenVPN was always a struggle with PfSense, as I can see that it is likewise a struggle with OPNsense.
Here are some things I did to fix it. I'm not sure which of these steps were critical, so if you're in this situation, you can try some or all of these things.
In the OpenVPN server configuration, I selected "Force DNS cache update" and also selected "DNS Servers" and added the IP address of OPNsense on the Lan interface, which in my case is the default 192.168.1.1. Additionally, in the Unbound ACL (access list), I added the tunnel network. Those were the first things I tried, because I knew that they are also common steps to try to get DNS working over OpenVPN in Pfsense. However, these steps alone did not solve the problem.
What finally solved it and got local DNS working were some additional changes I made in the OpenVPN server configuration. Namely, I selected "prevent DNS leaks," which is only supposed to help with Windows clients whereas I am using a Linux client, and I also selected "NTP servers" and designated the LAN OPNsense interface, 192.168.1.1, as the NTP server. I'm not sure which of these final steps was the critical step, or if they both were, but with that, it finally worked.
«
Last Edit: April 17, 2023, 05:00:18 am by patrick3000
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
OpenVPN local name resolution not working