Netgate SG-1000 microFirewall

Author Topic: Add PTR and NS Records to DNS Resolver possible?  (Read 2641 times)

0 Members and 1 Guest are viewing this topic.

Offline thehammer86

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +1/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #45 on: October 10, 2017, 08:20:59 pm »
I did exactly that.

However, I'm not sure if the following makes a difference.

-papercut and mobility print are on the same machine
-printrr is on same subnet as above
-android phone is on a different subnet

Offline mobility_dev

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #46 on: October 10, 2017, 09:23:07 pm »
Hi thehammer86,
Can you access the URL http://rpc.pc-printer-discovery:9163/printers from a browser on your Android device?
It should return to you some JSON if you have some printers on your Mobility Print server.

Offline thehammer86

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +1/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #47 on: October 10, 2017, 09:25:29 pm »
It returns JSON if I add .example.com.

I must be missing something in my unbound config?

Offline mobility_dev

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #48 on: October 10, 2017, 09:32:45 pm »
What is the search domain (DNS suffix) on your Android device?

Offline thehammer86

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +1/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #49 on: October 10, 2017, 09:38:26 pm »
I don't seem to have that option available in my wifi.  Running Android 6.0.1.

I have my search domain set in my DHCP server on pfSense.

I've also manually added it to my windows PCs.  For the windows PCs I know the search domain is working because I don't have to add the example.xom part when I do an NS lookup.

Offline Selo

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #50 on: January 16, 2018, 08:07:16 am »
Hello everybody,

I was wondering: was this issue solved in the end?
We are facing the same problem configuring Resolver with the Mobility records.
Checking the records using the Mobility application, we keep getting errors on the PTR records (the other 2 are working fine).
Screenshot of working DNS entries would be really great!

Offline thehammer86

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +1/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #51 on: January 16, 2018, 08:20:34 am »
Not yet with the Unbound resolver.  I ended up setting up a separate sever just for bind9.  I have everything working with that setup.
« Last Edit: January 16, 2018, 09:11:23 am by thehammer86 »

Offline Selo

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #52 on: January 16, 2018, 09:10:10 am »
Is it possible to post the actual records you used (as an example/syntax)?
Screenshot of dns settings?
thanks!

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 15188
  • Karma: +1414/-206
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #53 on: January 16, 2018, 09:31:30 am »
And what did you setup exactly -- that has been the whole question... See you can for sure setup PTR records on unbound...

The person from Mobility print was suppose to be answering those questions.. Which I do not recall ever got answered.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline Selo

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #54 on: January 16, 2018, 11:22:35 am »
I can tell this:

we are working on this issue with 2 experienced engineers. We have setup the 4 records as requested by the mobility print software.
nslookup confirms the 4 records are active and correct. After checking the records with the mobility software, we keep getting an error on the PTR records.
Fortunately we have an active Papercut license (it is a new install with 150 users), we created a support ticket...hope to get quick response.
If anyone has fixed this PTR issue, I would really like to see the DNS entries...
We also suggested a change to the mobility print client: a possibility to enter an ip-address instead of using the autodiscover option...

Offline thehammer86

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +1/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #55 on: January 16, 2018, 11:28:37 am »
Posting my named.conf file shortly for bind. Just obfuscating the IPs and domains.

Also, tech support was kind enough a few weeks ago to spend 2-3 hours on the phone with me to try an figure out the problem with unbound.  I found something in Mobility Print's log files that may be of use.

Hold tight.

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 15188
  • Karma: +1414/-206
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #56 on: January 16, 2018, 11:33:22 am »
From what I recall the client was not looking for what they said to create on their website.. But I can till you for fact is that unbound can create PTR records...

Here is simple PTR query for IP on unbound... Answers just fine...

Code: [Select]
> dig -x 192.168.9.8

; <<>> DiG 9.11.2 <<>> -x 192.168.9.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37198
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;8.9.168.192.in-addr.arpa.      IN      PTR

;; ANSWER SECTION:
8.9.168.192.in-addr.arpa. 1635  IN      PTR     Storage.local.lan.

;; Query time: 9 msec
;; SERVER: 192.168.3.10#53(192.168.3.10)
;; WHEN: Tue Jan 16 11:31:45 Central Standard Time 2018
;; MSG SIZE  rcvd: 84

What exactly is going to be queried and what should be the answer and we can validate whatever that something is can be entered into unbound.  But 100% for sure unbound can answer for a PTR query.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline Selo

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #57 on: January 17, 2018, 07:25:52 am »
OK, letīs wait for the named.conf file thehammer86 was going to post...
Also curious about this: "I found something in Mobility Print's log files that may be of use."

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 15188
  • Karma: +1414/-206
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #58 on: January 17, 2018, 07:29:25 am »
I played with this for a bit - I could never get the client to actually do a ptr query like they said it should.. Their docs from what I remember are not very clear.  My trial ran out and attempted to run the mobility client on the same box the server was run on. 

I could try to setup it up again on some other machines - But once we know what actual query be it PTR or some other we can work out how to setup (if possible) for unbound to respond.  What I can tell you for 100% fact is the unbound can respond with a PTR... And NS records, so there is something missing in the puzzle here.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline thehammer86

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +1/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #59 on: January 17, 2018, 07:53:43 am »
Here's the relevent config from a bare-metal machine I installed bind9 on.  Please make sure the domain and search list your dhcp server is handing out matches your domain for the mobility print entries.  Three different files below:

/etc/bind/named.conf


options {
   directory "/etc/bind";
   pid-file "/var/run/bind/run/named.pid /var/run/named.pid /var/run/named/named.pid /var/run/bind/run/named/named.pid";
   forwarders {
      208.67.220.220;
      208.67.222.222;
      2620:0:ccd::2;
      2620:0:ccc::2;
      };
   forward first;
   allow-query {
      192.168.0.0/16;
      };
   };

zone "." {
   type hint;
   file "/etc/bind/db.cache";
   };

zone "168.192.in-addr.arpa" {
   type master;
   file "/var/lib/bind/192.168.rev";
   };
key rndc-key {
   algorithm hmac-md5;
   secret "XXXXXXXXXXXXXXXXXXXXXX==";
   };
controls {
   inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; };
   };
zone "example.com" {
   type master;
   file "/var/lib/bind/example.com.hosts";
   };

/var/lib/bind/192.168.rev

168.192.in-addr.arpa.   IN      SOA     cloud1.example.com. admin.example.com. (
                        1513635071
                        10800
                        3600
                        604800
                        38400 )
168.192.in-addr.arpa.   IN      NS      cloud1.example.com.
3.71.168.192.in-addr.arpa.      IN      PTR     cloud5.example.com.

/var/lib/bind/example.com.hosts

$ttl 38400
example.com.       IN      SOA     cloud1.example.com. admin.example.com. (
                        1513706509
                        10800
                        3600
                        604800
                        38400 )
example.com.       IN      NS      cloud1.example.com.
cloud5.example.com.        IN      A       192.168.71.3
cloud1.example.com.        IN      A       192.168.71.4
pc-printer-discovery.example.com.  IN      NS      cloud5.example.com.
b._dns-sd._udp.example.com.        IN      PTR     pc-printer-discovery.example.com.
lb._dns-sd._udp.example.com.       IN      PTR     pc-printer-discovery.example.com.
« Last Edit: January 17, 2018, 07:57:31 am by thehammer86 »