• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Can someone please check my VPN DNS setup

Scheduled Pinned Locked Moved OpenVPN
8 Posts 4 Posters 982 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    gregeeh
    last edited by Apr 29, 2018, 7:03 AM Apr 29, 2018, 7:00 AM

    Hi all,

    I'm new to pfSense and have setup a VPN Client to connect with my VPN Provider.  All LAN traffic is going via the VPN.  It is all working but I'm concerned about if I have setup the DNS correctly.  Below are the settings.

    The DNS Leak Test looks fine to me, however I have entries like below in Syslog which seems to suggest the OpenDNS Servers are being used and not those from my VPN Provider as shown in the DNS Leak Test Results.

    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: query[PTR] 1.10.168.192.in-addr.arpa from 192.168.10.2
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: /etc/hosts 192.168.10.1 is pfsense.localdomain
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: query[A] app.bitly.com from 192.168.10.13
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: forwarded app.bitly.com to 208.67.222.222
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: forwarded app.bitly.com to 208.67.222.220
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: reply app.bitly.com is <cname>
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: reply bitly.com is 67.199.248.14
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: reply bitly.com is 67.199.248.15
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: query[AAAA] bitly.com from 192.168.10.13
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: forwarded bitly.com to 208.67.222.222
    <30>1 2018-04-29T16:34:02+10:00 pfsense.localdomain dnsmasq 17991 - - dnsmasq[17991]: forwarded bitly.com to 208.67.222.220</cname>
    

    Comments greatly appreciated.

    TIA

    Greg

    PfSense running on Qotom mini PC
    CPU N3150, 2 GB memory, 32 GB SSD & 2 Realtek Gb Ethernet ports.
    UniFi AC-Lite access point

    1 Reply Last reply Reply Quote 0
    • D
      Derelict LAYER 8 Netgate
      last edited by Apr 29, 2018, 5:24 PM

      When you query the local DNS server and it has to go out to the internet to get an answer that query is NOT policy routed because it does NOT arrive into the LAN interface. It originates on the firewall itself.

      You only gave about half the information needed. You left out what DNS servers the clients are actually told to use.

      If quelling "DNS leaks" is your goal, the best thing to do is to have the clients being routed out the VPN use DNS servers out on the internet and not anything on pfSense itself. This would be set statically on each client, in the DHCP server they use, or in a DHCP static mapping for certain hosts.

      Chattanooga, Tennessee, USA
      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
      Do Not Chat For Help! NO_WAN_EGRESS(TM)

      1 Reply Last reply Reply Quote 0
      • G
        gregeeh
        last edited by Apr 29, 2018, 9:19 PM

        @Derelict:

        You only gave about half the information needed. You left out what DNS servers the clients are actually told to use.

        The clients are using the IP of pfSense as their DNS Servers.  Sorry about not stating this.

        PfSense running on Qotom mini PC
        CPU N3150, 2 GB memory, 32 GB SSD & 2 Realtek Gb Ethernet ports.
        UniFi AC-Lite access point

        1 Reply Last reply Reply Quote 0
        • D
          Derelict LAYER 8 Netgate
          last edited by Apr 29, 2018, 9:55 PM

          Then that's your problem. Set them to use external DNS servers or tell them to use an inside DNS server (as in not on the firewall itself) and policy route the queries from that server out the VPN.

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • G
            gregeeh
            last edited by Apr 29, 2018, 11:00 PM

            @Derelict:

            Then that's your problem. Set them to use external DNS servers or tell them to use an inside DNS server (as in not on the firewall itself) and policy route the queries from that server out the VPN.

            Thank you for your time and your explaination it is greatly appreciated.  As my VPN is with VPN.AC I followed their instructions :
            https://vpn.ac/knowledgebase/63/OpenVPN-on-pfSense.html

            Sorry for the noob question but I still do not understand why the DNS Leak Test websites pass if I have set this up incorrectly.  :-[

            PfSense running on Qotom mini PC
            CPU N3150, 2 GB memory, 32 GB SSD & 2 Realtek Gb Ethernet ports.
            UniFi AC-Lite access point

            1 Reply Last reply Reply Quote 0
            • D
              Derelict LAYER 8 Netgate
              last edited by Apr 29, 2018, 11:49 PM

              That DNS test you posted was NOT passing correctly so what are you talking about?

              Man, am I tired of these DNS leak threads.

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • J
                johnpoz LAYER 8 Global Moderator
                last edited by Apr 30, 2018, 10:12 AM

                "Man, am I tired of these DNS leak threads."

                You can say that again ;)

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • B
                  bcruze
                  last edited by Apr 30, 2018, 12:40 PM Apr 30, 2018, 12:25 PM

                  try viewing this website for the PIA DNS servers: https://helpdesk.privateinternetaccess.com/hc/en-us/articles/219460397-How-to-change-DNS-settings-in-Windows

                  then go to system > general.  and add them there

                  THEN go to services > dhcp server > servers / DNS.  add them there

                  post again after you have rebooted the pfsense router

                  i have found adding DNS to the general tab is what causes the leaks.. when i use the PIA DNS servers on the actual SERVER DNS it fixes leaks for me.

                  this is for PIA and AIRVPN… i also do not use the DNS forwarding tab. its disabled,  i use the DNS resolver tab

                  not a pro, just sharing my experience with my setup

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received