![]() |
Reference Manual |
NAME
setns - interact with DNS settingsSYNOPSIS
setns [IPaddr | dx | ex]DESCRIPTION
setwns [IPaddr]+
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).NOTESFor 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.
The extra features are summarized below:SEE ALSO
- A DNS query from a private machine for nat32.win returns the Windows IP address of the NAT32 machine.
- A DNS query from a private machine for nat32.box returns the NAT32 IP address of the NAT32 machine.
- A DNS query from a private machine for nas.box returns the IP address contained in the nas environment variable.
- If the extra level is set to 2, a local DNS cache is used to resolve names and addresses. The cache contents can be viewed with command: dnscache.
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.
dnsmap, httpd, netcfg, ns, setd