pfSense English Support > DHCP and DNS

Setting TTL for local for Unbound host overrides - Solved

(1/2) > >>

Hey Guys,

I've got a lot of static leases on my lan and I'm trying to migrate my setup with minimal downtime for the business. Essentially I need to separate my traffic to two vlans for pci compliance reasons, but my business is 24 hours so I can't go mucking up the network or it costs me dearly  :P

 My first step was to setup host over rides within DNS resolver(this way when I switch over to the vlans with new dhcp leases I don't need to reconfigure every machine in the biz), but right away I realized that I'm unable to set the TTL for these entries.  so once they are cached by local clients the TTL is set to 3600 as documented here

So I took a closer look at the Unbound Documentation and it shows that I should be able to enter a TTL with the "local-data-ptr" entry.  So my plan was to pull a full copy of the hosts_entries.conf and then manually edit all of the entries with the TTL as 60 so that when I start switching things around downtime's are minimized to one minute.

So is this the right approach?  are there any other gotcha's that I might be missing.

Just pull the record out of the gui host override section and put it in the advanced box... And you can set the ttl to whatever you want...

If you need a specific example.. just ask.

I'm currently on 2.4.2

I don't see an option in the GUI to "pull the record out of the GUI".  Note that I need to do this with close to 100 records which is part of why I'm eyeing the .conf file directly.

"the advanced box"->  I'm guessing you mean the Custom Options box?  There is no place  in the Advanced settings tab where I could enter this much info.

A specific example would be awesome.   :D

hehehe - if you have an entry in the gui remove it ;)  That is what I meant by pull it out..

You can past as many entries here that you want, or even just load a file that has all your entries in it..

So all of these entries are from dhcp or static reservations?

Anyway remove any entries you have in host overrides. See I created a AAtestttl.local.lan entry and it default to the 3600 ttl.  I removed that!!  And then put in a specific entry calling out the 60 second ttl in the entry.. And there you go when I query it ttl of 60 vs 3600.  Or if you really have a shitton of them you could just load them from a file.  So I removed that from the custom box.  Set it to include a file, edited the file to have my entries I wanted in it.. see screenshots

Excellent!  Thanks so much for the detailed response  :)


[0] Message Index

[#] Next page

Go to full version