Skip to main content

DNS on nonstandard ports

Of course, everyone knows how to select an alternative DNS server.

Many people, however, fear that this step alone will fail to guarantee an uncensored (and unlogged) access of the web in the foreseeable future. They are afraid that providers will be forced to redirect all requests bound to port 53 to their own DNS servers, which will of course be censored, monitored and logged. This, it seems, is our dystopian reality, and we have to deal with it.

IMHO, the easiest way to query DNS servers on nonstandard ports is the installation of pdnsd (not related to pdns aka PowerDNS, but the pdnsd of Paul Rombouts) which should be available on the repositories of your distribution. Just install it, and do the following:

First of all, edit /etc/pdnsd.conf:

global {
#   pid_file = /var/run/;
    server_ip =;      # Use eth0 here if you want to allow other machines
                     on your network to query pdnsd.
    status_ctl = on;
    query_method=tcp_udp;       # pdnsd must be compiled with tcp query support for this to work.
    min_ttl=15m;            # Retain cached entries at least 15 minutes.
    max_ttl=4w;         # Four weeks.
    timeout=10;             # Global timeout option (10 seconds).
    neg_rrs_pol=on;         # see
    par_queries=1;          # see

# The following section is most appropriate for fixed connections to the Internet.
server {
    label= "uncensored";
    ip =,         # (Foebud,DE),      # (CCC, DE),      # (CCC, DE),       # (CCC, DE),       # (German Privacy Foundation, DE),        # (German Privacy Foundation. DE),      # (German Privacy Foundation, NL),        # (German Privacy Foundation, DE),       # (Nürnberger Internet eXchange, DE);        # (Universität der Künste, DE)
#   port = 110;         # German Privacy Foundation accepts queries on this nonstandard port ;)
    proxy_only=on;          # Do not query any name servers beside those above.
    timeout=4;              # Server timeout; this may be much shorter that the global timeout option.
    interval=10m;           # Check every 10 minutes.
    purge_cache=off;        # Keep stale cache entries in case the ISP's DNS servers go offline.

Second, edit your /etc/resolv.conf:


Third, and only if you'd like to have a nonvolatile DNS cache, issue 'chown -R pdnsd:pdnsd /var/cache/pdnsd'

Fourth, start the service. ;)

Fifth, you can check the status of your DNS cache by issuing 'pdnsd-ctl status' as root.

Update (08/09/09): included the nameservers in the ZDNet-List.

Second update (05/09/13): refreshed server list.

Contents © 2017 Cobra - Powered by Nikola