I have a KVM hypervisor and a few VMs in a bridged network. I use xinetd to forward ports from the public IP address to the proper VM.

Now I installed PowerDNS on a machine and I'd like to create a port forwarding rule for it. It looks like this:

service dns-switch
 disable = no
 type = UNLISTED
 socket_type = dgram
 protocol = udp
 wait = no
 redirect = 53
 bind = x.x.x.x
 port = 53
 user = nobody

After restarting xinetd I get the following message in /var/log/messages and the forwarding is not working:

Mar 12 15:12:57 server systemd: Starting Xinetd A Powerful Replacement For Inetd...
Mar 12 15:12:57 server xinetd[5037]: socket creation failed (Protocol not supported (errno = 93)). service = dns-switch
Mar 12 15:12:57 server xinetd[5037]: Service dns-switch failed to start and is deactivated.
Mar 12 15:12:57 server xinetd[5037]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking options compiled in.

Of course, nothing on netstat/ss. The host is a CentOS 7. The guest (PowerDNS) is Ubuntu 14.04.

Any idea/suggestion is welcome.

  • According to the man page, the UDP cannot be redirected: redirect: Allows a tcp service to be redirected to another host – Sergiu Tot Apr 1 '16 at 10:45

You could use dnsdist to forward your queries. It is extremely flexible but can also do this simple forwarding case.

  • I've never used it, but it looks simple to set up. I'll give it a try. Thank you! – Sergiu Tot May 10 '16 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.