Hostname Resolution over OpenVPN



  • When we are VPN'd into our network we can access the network computers by using the IP addresses. However, we cannot use hostnames to access them. For example, \192.168.1.9 goes to our file server just fine but \server does not.

    What settings do I need to change to get that working?



  • If your servers DNS server is for example: 192.168.1.1 than your OpenVPN' DNS server should be 192.168.1.1, too. than it should work.



  • @Nachtfalke:

    If your servers DNS server is for example: 192.168.1.1 than your OpenVPN' DNS server should be 192.168.1.1, too. than it should work.

    In the OpenVPN server settings, we have 'Provide DNS server list to clients' checked and listed our pfSense box IP and it's not working.



  • Do your web-servers , files-servers and so on all use the pfsense DNS as their primary DNS, too ?

    Did you try to connect to your servers using the FQDN ?
    \my-server.my.domain\share



  • @Nachtfalke:

    Do your web-servers , files-servers and so on all use the pfsense DNS as their primary DNS, too ?

    Did you try to connect to your servers using the FQDN ?
    \my-server.my.domain\share

    FQDN does not work either. They are all using our pfSense box as the DNS server.


  • LAYER 8 Global Moderator

    Well if your saying your asking pfsense dns for fqdn of your servers, and it does not answer that has nothing to do with openvpn.

    If your not on the vpn, and you query your pfsense for your fqdn servers?  Example my pfsense box is 192.168.1.253

    
    ; <<>> DiG 9.8.1 <<>> @192.168.1.253 ubuntu.local.lan
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46521
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;ubuntu.local.lan.              IN      A
    
    ;; ANSWER SECTION:
    ubuntu.local.lan.       3600    IN      A       192.168.1.7
    
    ;; Query time: 3 msec
    ;; SERVER: 192.168.1.253#53(192.168.1.253)
    ;; WHEN: Thu Sep 22 08:05:11 2011
    ;; MSG SIZE  rcvd: 50
    
    

    If you can not query your dns for your fqdn, then its never going to work while over the vpn.  If works local, then you prob have a firewall rule blocking access from your vpn to the pfsense dns.

    For example I run unbound, and had to allow for my openvpn segment to be able to query it. In the unbound ACLs, I had to allow for my 10.0.200.0/24 (openvpn ips) to query it.


Log in to reply