Reference Manual

NAME

setns - interact with DNS settings
SYNOPSIS
setns [IPaddr | dx | ex]
setwns [IPaddr]+

Use ns to resolve a name or address.

DESCRIPTION
When invoked with no argument, setns prints the IP address of the current DNS Server, the first detected Name Server, the second detected Name Server and the configured DNS Domain (if known).

For each Interface, setns also prints the number of requests and responses, and a flag indicating whether or not a DNS change has taken place.

If no response from the current Name Server is received after 5 requests, the next detected Name Server becomes the current Name Server and the flag is set.

When invoked with argument IPaddr, setns sets the current DNS Server IP address to the specified value.

Argument d1 turns debugging output on, d0 turns it off.

Argument e1 or e2 turns extras on, e0 turns them off.

Command setwns prints the Windows DNS address list as extracted from the Registry. If one or more IPaddr arguments are specified, those addresses will replace the addresses currently in the Windows Registry.

Altered settings are not recorded in any configuration file. To make the settings permanent, the needed commands should be placed in file startup.

NOTES
The extra features are summarized below:

If DNS queries from private machines to NAT32 are to be resolved via Winsock lookups, command dnsrd on can be used to start a multithreaded DNS Resolver. Note that the resolver only receives traffic on interfaces for which DNS Mapping has been turned off.

The advantage of resolving names via Winsock is that if the HOSTS file under Windows contains ad-blocking entries, all private machines will also be protected, and network traffic will be significantly reduced.

A suitable HOSTS file is available here. This file will protect your machines from advertising, banners, 3rd party Cookies, 3rd party page counters, web bugs, and most hijackers.

SEE ALSO
dnsmap, httpd, netcfg, ns, setd