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

    Dns query

    General pfSense Questions
    3
    14
    2.3k
    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.
    • T
      techy82
      last edited by

      I have openvpn setup with piano and I have setup some devices to bypass pia and go straight out via the wan connection however these devices are not getting Dns

      What do I have to do so Dns will work on devices that are going straight out the wan?

      Thanks very much

      1 Reply Last reply Reply Quote 0
      • V
        viragomann
        last edited by

        Just allow the access to the DNS server in firewall rules.

        1 Reply Last reply Reply Quote 0
        • T
          techy82
          last edited by

          thanks very much how would I do that?

          1 Reply Last reply Reply Quote 0
          • V
            viragomann
            last edited by

            That depends on the DNS server your devices are using. You gave no information about your setup.

            If the pfSense is your DNS add a rule to the interface the concerned devices are connected to and allow TCP/UDP protocol from them to the interface address with destination port 53.

            If the devices try to access a public DNS, enter the DNS IP at destination or just any. If the VPN client is your default gateway you have to select the WAN gateway in the advanced options in addition here.

            1 Reply Last reply Reply Quote 0
            • T
              techy82
              last edited by

              thanks very much

              I am using pfsense for dns, and openvpn (PIA) is set as the default gateway

              I setup a new rule with the devices IP to point to WAN instead of the OpenVPN connection, but it doesn't resolve dns, I shall try this.

              Thanks again

              1 Reply Last reply Reply Quote 0
              • T
                techy82
                last edited by

                Hi

                I have my ps4 lan rule to forward straight to the WAN, would I just add another rule on the lan interface to pass dns traffic to port 53?

                Thanks very much really appreciate the help!

                Capture.PNG
                Capture.PNG_thumb

                1 Reply Last reply Reply Quote 0
                • V
                  viragomann
                  last edited by

                  Yes, the rule for accessing the LAN interface must not have set a gateway.

                  Your PS4 rule allows only traffic to the WAN GW. Access to LAN address do not pass this. So you have to an additional rule for DNS using no gateway (set to default) and put it above the other PS4 rule.

                  1 Reply Last reply Reply Quote 0
                  • T
                    techy82
                    last edited by

                    thats great thanks very much, really appreciate your help! :-)

                    1 Reply Last reply Reply Quote 0
                    • T
                      techy82
                      last edited by

                      Hi

                      does the below set off rules look okay?

                      Thanks again!

                      Capture2.PNG
                      Capture2.PNG_thumb

                      1 Reply Last reply Reply Quote 0
                      • johnpozJ
                        johnpoz LAYER 8 Global Moderator
                        last edited by

                        Other than dns uses UDP, and sometimes - not very often tcp.  An you only have tcp vs udp/tcp on your dns rule.

                        And your Source port should be ANY.. not 53…  Your dest is 53, but you have no idea what port the client would use for a dns query.

                        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.7.2, 24.11

                        1 Reply Last reply Reply Quote 0
                        • V
                          viragomann
                          last edited by

                          I mentioned it above in Reply #3.
                          :)

                          1 Reply Last reply Reply Quote 0
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator
                            last edited by

                            You did - and clearly he didn't listen ;)

                            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.7.2, 24.11

                            1 Reply Last reply Reply Quote 0
                            • V
                              viragomann
                              last edited by

                              Sure, it won't be any risk if also other clients access the DNS server. Since you control all clients this is on you anyway.
                              You may also add an Alias for a group of granted host address (Firewall > Aliases > IP) and use this on in the firewall rule for source.

                              1 Reply Last reply Reply Quote 0
                              • T
                                techy82
                                last edited by

                                Thanks very much working great now appreciate your help  ;D

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.