![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, This is a bit of Ruby and a bit of Linux, but because I'm working on this in a Rails environment, I've decided to post it here. I use the net-dns gem to make SOA queries like the following: def query_domain(domain) require 'Net/DNS' res = Net: NS::Resolver.newresult = res.query(domain, 'SOA') return result.answer end This works fine and I'm happy with the results. However, this is part of a server management setup that changes values in certain nameservers. We also want to monitor these changes, but most of these nameservers have a TTL of 4 hours for their domains. We can't have the system wait for 4 hours before checking whether the procedure worked, so I need a way to get the server at the other end to return the result again, just a few seconds later. Is this possible? Is there a way to make the queried DNS flush the results and request them again? How about just querying the authorative nameservers directly with: |
NS::Resolver.new
NS::SOA)
NS::Resolver.new(:nameservers => '....').query(domain, Net:
NA::SOA).answer
#3
| |||
| |||
|
|
Quoting jhaagmans <jaap.haagm... (AT) gmail (DOT) com>: Hi, This is a bit of Ruby and a bit of Linux, but because I'm working on this in a Rails environment, I've decided to post it here. I use the net-dns gem to make SOA queries like the following: def query_domain(domain) * require 'Net/DNS' * res * = Net: NS::Resolver.new* result = res.query(domain, 'SOA') * return result.answer end This works fine and I'm happy with the results. However, this is part of a server management setup that changes values in certain nameservers. We also want to monitor these changes, but most of these nameservers have a TTL of 4 hours for their domains. We can't have the system wait for 4 hours before checking whether the procedure worked, so I need a way to get the server at the other end to return the result again, just a few seconds later. Is this possible? Is there a way to make the queried DNS flush the results and request them again? How about just querying the authorative nameservers directly with: res = Net: NS::Resolver.newres.nameserver = '......' result = res.query(domain, Net: NS::SOA)or even (if I understand the docs right) return Net: NS::Resolver.new(:nameservers => '....').query(domain, Net: NA::SOA).answerHTH, * Jeffrey --~--~---------~--~----~------------~-------~--~----~ |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |