Feature request: Specify DNS server per address range

Started by BogBeast

Feature request: Specify DNS server per address range   11 July 2018, 02:02

Hello.

I frequently scan IP ranges that my default DNS server does not resolve.

When defining a range to scan, would it be possible to nominate an optional DNS server IP to resolve hostnames against?

Many thanks!!

BogBeast
SoftPerfect Support forum - Andrew avatar image

Re: Feature Request: Specify DNS server per address range   11 July 2018, 10:30

Normally the Network Scanner app does not interact with DNS servers directly. Instead it uses system calls like getnameinfo() to resolve a name to IP address and vice versa, which uses system mechanisms and default DNS servers.

However it sounds like an interesting idea to be able to query custom DNS servers. Do you have many DNS servers there? I am thinking of just adding a customisable list of DNS servers and query them one by one until a response is received (that is not bound to a specific IP address range).

Re: Feature Request: Specify DNS server per address range   13 July 2018, 22:23

I don't have huge numbers. I VPN to 3 separate networks across the world. They are self-contained training environments, so each has it own private IP schema and DNS/DHCP .

A customisable list of DNS servers would work for me just fine, I was thinking on DNS server per range for maximum flexibility smile
SoftPerfect Support forum - Andrew avatar image

Re: Feature request: Specify DNS server per address range   16 July 2018, 15:23

Maximum flexibility is something we had in mind, so the DNS resolver was implemented as object that can be used from VB script.

If you download the latest version from the home page, go to Options - Remote Scripting - New and add the following code:
'Resolve a name or IP address via DNS
'This example performs a reverse lookup

'Create internal DNS object
set dnsObj = Internal.CreateObject("dns")

'Optionally set DNS server name
dnsObj.Server = "x.x.x.x"

'Get PTR record for the current IP address
name = dnsObj.GetName(Input.Current, "ptr")

'Print out resolved name
Output.Write name
Basically you can create an instance of the built-in DNS object and then resolve any name or address via any DNS server.

In your case it needs to be a local DNS server and any kind of conditional resolution can be implemented in the script.

Re: Feature request: Specify DNS server per address range   20 July 2018, 09:28

Great, works just fine for me - thanks!

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **    **  **     **  ********  **    **  ********  
 ***   **  **     **  **    **  **   **   **     ** 
 ****  **  **     **      **    **  **    **     ** 
 ** ** **  *********     **     *****     ********  
 **  ****  **     **    **      **  **    **     ** 
 **   ***  **     **    **      **   **   **     ** 
 **    **  **     **    **      **    **  ********  

Message: