Netgate SG-1000 microFirewall

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

0 Members and 1 Guest are viewing this topic.

Offline posto587

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Add PTR and NS Records to DNS Resolver possible?
« on: May 27, 2017, 04:01:49 am »
Hi Guys,

we would like to install the papercut mobiity printing on our network with lots of vlan interfaces.
To get the printer discovery work across all subnets we have to add the following records to the DNS system:

;---------------- Mobility Print records --------------

b._dns-sd._udp       IN PTR pc-printer-discovery
lb._dns-sd._udp      IN PTR pc-printer-discovery
pc-printer-discovery IN NS  print-server-host
print-server-host    IN A   XXX.XXX.XXX.XXX

;--------------- End of Mobility Print records ---------

Is it possible to add these entrys to the DNS Resolver?
Or do I need to install BIND and configure the records there?

If possible I'd prefer to go with the Resolver since I haven't worked with BIND before.

Thanks,
John

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 #1 on: May 27, 2017, 04:44:26 am »
Sure you can add whatever records you want in the custom box..

https://doc.pfsense.org/index.php/Unbound_DNS_Resolver
« Last Edit: May 27, 2017, 04:52:18 am by johnpoz »
- 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 posto587

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #2 on: June 09, 2017, 06:00:57 am »
Thank you John for your answer, that helped a lot.
Now the basic delegation is working but the printer discovery is still not.

After lots of mails with the papercut support all DNS tests are passed but not this one:

Code: [Select]
nslookup -query=ptr _ipps._tcp.pc-printer-discovery.XXX.com.
I think because of the result (Non-existent domain) the discovery is not working.

Do you have an idea where this issue is coming from?
pfsense DNS server is only itself (127.0.0.1)

When I'm using a Windows DNS server the test is OK and printers can be discovered over all subnets.
But it would be great to get this working with the pfSense DNS Resolver.

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 #3 on: June 09, 2017, 09:44:37 am »
if your doing to do a PTR then you have to setup the ptr.. you do not have that in your example you posted.

Unbound is not going to be able to respond with info if the info is not there..
- 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 posto587

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #4 on: June 10, 2017, 09:54:17 am »
Hmm that's strange.
In the instructions on
https://www.papercut.com/products/ng/mobility-print/manual/dns-service-discovery-setup/#set-up-dns-discovery-for-a-zone-ending-in-local
they are saying, adding these four records as described in the first post are enough.

Which more records would I need to add?
Sorry for bothering you again.  :-[

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 #5 on: June 10, 2017, 09:55:58 am »
if your saying this is failing

"nslookup -query=ptr _ipps._tcp.pc-printer-discovery.XXX.com."

I would agree since its not in the instructions so how would it magically be resolvable?
- 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 posto587

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #6 on: June 14, 2017, 02:07:08 am »
Ok I'm sorry, I did forget to mention an important thing:

The print-server-host (Papercut Mobility Print Server) where I'm pointing the DNS records to, is a DNS server itself.

So what papercut says is basically:
Configure the four DNS records on your local DNS Server to point to the Mobility Print Server.
The Mobility Print Server will then make the printers discoverable over all subnets, via Airprint etc...


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 #7 on: June 14, 2017, 04:47:35 am »
"pc-printer-discovery IN NS  print-server-host"

That is the NS you point to for that domain..

But your PTR query is for this domain
"pc-printer-discovery.XXX.com."

That is not the same, so that NS record does not point you to the printserverhost..

Dude its very difficult to work with out the actual FQDN.. If you want more help from me your going to need to actual post what your putting in, not the template..
- 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 posto587

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #8 on: July 04, 2017, 11:06:25 am »
The DNS suffix from pfSense is: lew.wohnheim

The FQDN from pfSense is: gate.lew.wohnheim

The papercut support says, I need to add these DNS delegations:

An A record pointing to your server running Mobility Print    my-print-server IN A 10.1.1.4
A delegated subzone for pc-printer-discovery that points to the A record    pc-printer-discovery IN NS my-print-server
Two Pointer (PTR) records in root DNS that connect the server to the subzone    b._dns-sd._udp IN PTR pc-printer-discovery
lb._dns-sd._udp IN PTR pc-printer-discovery

So when adding the entries:

b._dns-sd._udp       IN PTR pc-printer-discovery
lb._dns-sd._udp      IN PTR pc-printer-discovery
pc-printer-discovery IN NS  mobility
mobility    IN A   10.100.15.34

the following lookup isn't working:

nslookup -query=ptr _ipps._tcp.pc-printer-discovery.lew.wohnheim.

Even when I'm adding these entries:

b._dns-sd._udp.lew.wohnheim       IN PTR pc-printer-discovery
lb._dns-sd._udp.lew.wohnheim      IN PTR pc-printer-discovery
pc-printer-discovery.lew.wohnheim IN NS  mobility
mobility.lew.wohnheim    IN A   10.100.15.34

the lookup isn't working.

Is this the right syntax for unbound? How do I add a delegated subzone?

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 #9 on: July 04, 2017, 05:40:43 pm »
that is the correct syntax I showed doing a query for those entries..

"pc-printer-discovery.lew.wohnheim IN NS  mobility"

This is not VALID... mobility is not a valid FQDN..  What is suppose to be the NS?  10.100.15.34?  For what domain?

"pc-printer-discovery IN NS  print-server-host"

Then it would be

pc-printer-discovery IN NS  mobility.lew.wohnheim
mobility.lew.wohnheim    IN A   10.100.15.34
- 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 #10 on: September 28, 2017, 07:25:04 pm »
So, I was interested in the product too.  I have it half working, meaning that two of the DNS requirements are met and only the PTR records remain to be configured.  However, apparently those are only needed for iOS and MacOS and not Android.  Yet, when I tried to discover the printer on Android nothing shows up.  The following entries I added to Unbound Resolver's custom options field:

server:
local-zone: "example.com." transparent
local-data: "mobility-print-host.example.com. A 192.168.71.3"
local-data: "pc-printer-discovery.example.com. NS mobility-print-host."

I'm not sure how important the periods are at the end of each subdomain.  Whether its "mobility-print-host." or "mobility-print-host" seems to work just fine in Mobility Print's eyes.

Working on the PTR records now and will update if I get anywhere.

Offline trentuk

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #11 on: October 02, 2017, 04:54:52 am »
Hi all,

I'm trying to get Mobility Print working with DNS Resolver too but without success, here are my custom options, all seem to be correct & present when doing a lookup from a client but I still can't see any printers in the Mobility Print app on Android or from any Apple iOS/OSX devices.

---------------------------------------------------------------------------------------
server:
local-data: "b._dns-sd._udp IN PTR pc-printer-discovery"
local-data: "lb._dns-sd._udp IN PTR pc-printer-discovery"
local-data: "_ipps._tcp IN PTR pc-printer-discovery"
local-data: "pc-printer-discovery IN NS lipa-printers.mydomain.removed"
local-data: "lipa-printers.mydomain.removed IN A 10.2.1.5"
---------------------------------------------------------------------------------------

Just to be clear, I've removed my actual domain and replaced with 'mydomain.removed'

Any thoughts, suggestions, offers of moral support gratefully received!  ;)

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 #12 on: October 02, 2017, 05:04:16 am »
"'mydomain.removed' "

What is the domain.. Did you set this zone as transparent?  Can not help you people your going to obfuscate and ask why it doesn't work.. My guess is the domain actually resolve on public and its looking for something you didn't put in so it gets back NX..

If all the stuff you put responds when you query unbound.. How is unbound not doing what you told it to do?


    b._dns-sd._udp IN PTR pc-printer-discovery
    lb._dns-sd._udp IN PTR pc-printer-discovery
    pc-printer-discovery IN NS print-server-host
    print-server-host IN A XXX.XXX.XXX.XXX

I don't see any . periods on the end of your entries..

What I would suggest is connect them for the setting up in unbound.  Keep in mind unbound is not really meant to be an authoritative dns..

This is suppose to be a delegated domain.. So what domain are you using local? yourdomain.com? what??

Says right on their site
"The name of the search domain(s) for your devices (eg. Android phone, Chromebook)"

So what FQDN are you using for pc-printer-discovery ???  Its suppose to be pc-printer-discovery.yourdomain.tld and your client is suppose to be using a search suffix to find that record!!!
« Last Edit: October 02, 2017, 05:18:32 am by johnpoz »
- 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 doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +962/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: Add PTR and NS Records to DNS Resolver possible?
« Reply #13 on: October 02, 2017, 05:18:13 am »
Code: [Select]
local-data: "b._dns-sd._udp IN PTR pc-printer-discovery"
local-data: "lb._dns-sd._udp IN PTR pc-printer-discovery"
local-data: "_ipps._tcp IN PTR pc-printer-discovery"

Dafuq?!
Do NOT PM for help!

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 #14 on: October 02, 2017, 05:19:57 am »
Exactly!!!
- 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)