[solved] DNS root request - rootserver doesn't response via udp

  • Hey Community,

    due to some requirements we would like to implement a separate unbound (with enabled full logging features) on a machine behind the pfsense. Unbound was not able to connect to the root servers via udp. After a few tests we identified the general problem:

    pfsense (somehow) don't get any response for dns root request, doesn't matter if they come from a client or directly from the pfsense:

    drill @ .

    tcpdump of this request:

    [2.2.5-RELEASE][admin@internet-fw.localdomain]/tmp: grep '199.7' log.udp 
    12:24:02.628288 IP > 45119+ A? . (17)
    12:24:07.709898 IP > 45119+ A? . (17)
    12:24:12.712889 IP > 45119+ A? . (17)

    Analysis we have done so far:

    1. The same request via tcp does work:

    drill -t @ .

    tcpdump of this request:

    [2.2.5-RELEASE][admin@internet-fw.localdomain]/tmp: grep '' log.tcp
    12:23:07.336688 IP > Flags [s], seq 2131652584, win 65228, options [mss 1452,nop,wscale 7,sackOK,TS val 15240744 ecr 0], length 0
    12:23:07.358575 IP > Flags [S.], seq 1548891628, ack 2131652585, win 14480, options [mss 1452,sackOK,TS val 2534769972 ecr 15240744,nop,wscale 7], length 0
    12:23:07.358623 IP > Flags [.], ack 1, win 517, options [nop,nop,TS val 15240766 ecr 2534769972], length 0
    12:23:07.358675 IP > Flags [P.], seq 1:20, ack 1, win 517, options [nop,nop,TS val 15240766 ecr 2534769972], length 1927848+ A? . (17)
    12:23:07.379791 IP > Flags [.], ack 20, win 114, options [nop,nop,TS val 2534769993 ecr 15240766], length 0
    12:23:07.379948 IP > Flags [P.], seq 1:95, ack 20, win 114, options [nop,nop,TS val 2534769993 ecr 15240766], length 9427848*- 0/1/0 (92)
    12:23:07.379978 IP > Flags [.], ack 95, win 516, options [nop,nop,TS val 15240787 ecr 2534769993], length 0
    12:23:07.380043 IP > Flags [F.], seq 20, ack 95, win 517, options [nop,nop,TS val 15240787 ecr 2534769993], length 0
    12:23:07.401486 IP > Flags [F.], seq 95, ack 21, win 114, options [nop,nop,TS val 2534770014 ecr 15240787], length 0
    12:23:07.401526 IP > Flags [.], ack 96, win 517, options [nop,nop,TS val 15240809 ecr 2534770014], length 0
    2\. Request for ".de" does also work:
    [code]drill @ de.[/code]
    [code][2.2.5-RELEASE][admin@internet-fw.localdomain]/tmp: grep '199.7' log.de.udp
    12:25:45.102826 IP > 35136+ A? de. (20)
    12:25:45.125961 IP > 35136- 0/6/10 (334)
    Does anyone have an idea why udp does not work?
    SYS-5018A-TN7B, http://www.supermicro.com/products/system/1U/5018/SYS-5018A-TN7B.cfm
    16 Gig of Ram
    80 Gig Intel SSD 
    Lan bypass deactivated
    PPPOE connection (50/10) via vdsl modem
    2.2.5-RELEASE (amd64)
    Mbuf set to 1000000
    Thank you

  • LAYER 8 Global Moderator

    Are you saying that pfsense itself can not query via udp?  Or a client behind pfsense can not?  Either way it points to udp being blocked somewhere between where your doing the query and where sending the query.

    Does pfsense have public IP on its wan, or is it behind a NAT?

    "PPPOE connection (50/10) via vdsl modem"  So pfsense gets public or rfc1918 address?

    I can tell you for sure that roots clearly answer udp queries ;)

  • Hey johnpoz,

    it does not matter if its a client or the pfsense it self. This explicit (but valid) request seems to be the problem. I have tried from pfsense via drill or from a client (ubuntu) via dig.
    In both scenarios it looks like the request is leaving the wan interface, but there is no answer.

    ubuntu client:

    dig @ .

    does not work.

    dig @ . +tcp


    dig @ de.

    does work.

    UDP is not blocked because

    drill @ de.

    does work like expected from pfsense and client.

    Pfsense does get a public ipv4 ip via PPPOE. In my first post it was ''.

    All i can imagine is, that the "network stack" or the network driver or my ISP discard the packet somehow. I cannot capture packets 'behind' the pppoe interface. Maybe i should set up a dns somewhere in the internet and perform the request towards this server.


  • LAYER 8 Global Moderator

    Can you query say ??  This is a public dns server..

    ; <<>> DiG 9.9.5-3ubuntu0.5-Ubuntu <<>> @ .
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57426
    ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

    ; EDNS: version: 0, flags:; udp: 512
    ;.                              IN      A

    .                      318    IN      SOA    a.root-servers.net. nstld.verisign-grs.com. 2015112700 1800 900 604800 86400

    ;; Query time: 39 msec
    ;; SERVER:
    ;; WHEN: Fri Nov 27 09:09:37 CST 2015
    ;; MSG SIZE  rcvd: 103

  • nope.

    Same problem. TCP (dig @ . +tcp) does work, UDP (dig @ .) does not.

  • LAYER 8 Global Moderator

    So udp is blocked upstream from were your doing query from either pfsense nar router in front of pfsense or isp

  • UDP is not blocked, feel free to scroll up and take a look at my examples, i have posted two of them. Only the UDP request for "." does not work.

  • LAYER 8 Netgate

    It really does look like something upstream is jacking with your traffic. You see the packet going out and nothing comes back.

  • Yep. That seems to be the case.

    I will do two steps now:

    1. setup a DNS in the Internet and perform this request towards this server. Then i will be able to see, if or how the request really do leave my "internet access".
    2. Post this case in the German subfolder because of the "non-starndard" configuration. I am using an IAD-Router as a pppoe modem. By using it in the "bridged mode" it do not forward the vlan tags. Maybe this might be somehow a problem.

    Thanks anyway :)

  • LAYER 8 Global Moderator

    "1. setup a DNS in the Internet and perform this request towards this server."

    What do you think the query to was??  There are plenty of public dns you could send your request too also, no need to setup anything..

    Does your isp expect you to use their dns?  Can you do anything UDP outbound?  NTP for example?  Query a public ntp server.. or just the ntp pool..

  • Dear johnpoz,

    at the moment i am not able to check the logfiles of the google dns. This might change in the future, but is not possible yet… ;)

    My idea is: As soon as i setup my own dns i will be able to see if this damn request reached the server or got caught somewhere between the pfSense and my own dns.

    In this case i don't want to use the dns of my isp. The use case is to monitor malicious hostnames (means hostnames which where used for "bad stuff") and detect modifications. Based on this modifications it is sometimes possible to identify some hints about future attacks or attack vectors.

    Outbound UDP is working without any problem. I will try to create very small ntp and snmp packets tomorrow.


  • Problem solved. Since i have replaced the vdsl modem and configured pfSense to use the vlans on wan interface the problem did not appear anymore.

Log in to reply