NETGATE 2100 OPENVPN DNS QUESTION
-
Hey guys I'm sure this is a stupid question. I'm self-taught here so don't beat me up too much. I setup an open vpn to connect to my small business from my laptop and so forth. All that works I can connect and ping what devices I need to. The issue I'm having is I can ping by ip address but not by name. I had maybe once or twice it actually pinged by name. I'm assuming I'm having a DNS issue. The openvpn tunnel address are 10.0.30.0/24 my inside office lan is 192.168.1.0/24 my netgate is 192.168.1.1. Ive read for hours and tried all kinds of things others with the same issue with no difference. Can anyone offer any suggestions or help?? Thanks in advance
-
@turbogn87
Basically the client might reside in another domain and so you would have to attach the domain to the hostname (FQDN).But you can try to provide a DNS domain to the client by checking "DNS Default Domain" and entering the domain in the OpenVPN server settings.
Also you have to provide the local DNS server to the clients, of course, and allow the access to it. -
This is my VPN tunnel network :
My DNS VPN settings :
I accept all traffic coming from my remote OpenVPN client :
The resolver listens to all interfaces- and this includes the OpenVPN interface :
Let's check :
[24.11-RELEASE][root@pfSense.bhf.tld]/root: sockstat | grep 'unbound' unbound unbound 69172 3 udp6 *:53 *:* unbound unbound 69172 4 tcp6 *:53 *:* unbound unbound 69172 5 udp4 *:53 *:* unbound unbound 69172 6 tcp4 *:53 *:* .......
So, its listing on all interfaces using TCP and UDP, on port 53.
I connect my OpenVPN client, I checked the OpenVPN client log, where I can see :
...
[Dec 03, 2024, 09:34:11] NIP: adding DNS 192.168.3.1
...
so the connection uses 192.168.3.1 as its DNS.I use an app on my OpenVPN client device (a phone) to 'test' the DNS access :
I told the app the use "192.168.3.1" as the DNS (normally, it would use 192.168.3.1 anyway) :and I got an answer.
Was it from pfSense, the resolver ? Let's check :As I use pfBLockerng, I have access to the logged DNS requests the resolver receives :
Here is my OpenVPN client device, 192.168.3.2 asking for the www.google.com :