![]() |
Reference Manual |
NAME
setns - interact with DNS settingsSYNOPSIS
setns [IPaddr | dx | ex | fx]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.
Argument f1 or f2 selects Winsock or NAT32 resolution, f0 selects special resolution.
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 the dnscache command.
If DNS queries from private addresses to NAT32 are to be resolved (rather than forwarded) by NAT32, 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. If f1 was set, resolution is via a Winsock name lookup. If f2 was set, resolution is via a NAT32 name lookup. If f0 was set, only the special names listed above are resolved.
If NAT32 is sharing the Windows IP address of a private interface, DNS queries from private machines to NAT32 will fail because the Windows TCP/IP stack will respond with an ICMP Port Unreachable packet. This problem can be avoided by starting a Winsock version of the resolver with the command wdnsrd on. 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. However, large HOSTS files will slow down name resolution noticeably.
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.
User Administration, dnsmap, httpd, netcfg, ns, setd