Doorgaan naar de website
OCLC Support

DNS

Learn how to use the DNS config.txt directive to enable EZproxy to act as a DNS server.

DNS is a position-dependent config.txt command that uses information from the Name command and interacts with other DNS entries.

DNS enables EZproxy to act as a DNS server capable of responding to its own name and the name of any hostname in use by Proxy by Hostname. This feature can be used in place of a wildcard DNS entry to enable proxy by hostname.

In order to enable this feature, your DNS administrator must delegate control of the zone that matches your EZproxy server to your EZproxy server.

In the BIND name server, the entries would look similar to:

ezproxy.yourlib.org. IN A 68.15.177.100
ezproxy.yourlib.org. IN NS ezproxy.yourlib.org.

The A (address) entry allows the name of your EZproxy server to be resolved by your main DNS server, and also acts as the glue records required for the NS (name server) entry. The NS (name server) entry tells remote DNS servers that request for names that are or end with ezproxy.yourlib.org should be directed to your EZproxy server.

In Windows DNS, use these steps to establish the ezproxy.yourlib.org entry:

  1. Launch the DNS management console.
  2. Browse until you reach the ezproxy.com domain.
  3. Right-click on yourlib.org and select New Host.
  4. Type the name ezproxy and the IP address 68.15.177.100. The option to create the PTR record can be selected or unselected, depending on your preference.
  5. Click Add Host. Click OK to confirm the creation and then click Done.
  6. Right-click on yourlib.org and select New Delegation.
  7. For the delegated domain, type ezproxy, then click Next.
  8. For the name server, click Add, then in the New Resource Record window, browse to find the ezproxy.yourlib.org entry and click OK in both the Browse and New Resource Record windows.
  9. You should now be back in the Name Servers window with ezproxy.yourlib.org listed under Server Name. Click Next and then Finish.
  10. You can now exit from the DNS management console.

Examples

A basic example of DNS is:

DNS 68.14.889.198

On the EZproxy server, you must make an entry like this in config.txt:

DNS 192.168.10.15

If you are running EZproxy on Linux, you must start EZproxy as root for this line to be valid. This example is the simplest case. The IP address you supply must be valid on your EZproxy server. If you use Network Address Translation and have separate addresses for internal and external DNS, you might need a more complex entry like this:

DNS 10.125.200.14 68.15.177.100
DNS 10.125.200.14 10.125.200.14 10.0.0.0=10.255.255.255

This example tells EZproxy to listen on IP address 10.125.200.14. In general, it is to respond that the IP address of your EZproxy server is 68.15.177.100, but the second line indicates that EZproxy should provide its own internal address of 10.125.200.14 whenever the request comes from an internal address that starts with 10.

By default, EZproxy will only respond to host names that it is using. If you are running multiple copies of EZproxy on a single server, you may need to have EZproxy respond to any possible hostname to allow names used by other instances to be considered valid. To handle this case, add this line to config.txt.

Option AnyDNSHostname

This will allow any DNS hostname that end in the name of the EZproxy server to be considered valid. In this configuration, only one copy of EZproxy will have the DNS line. In this scenario, you might choose to have a single copy of EZproxy that does nothing but handle DNS.