Linux – Are spurious TCP connections on port 53 a problem

domain-name-systemlinux

I run a server which amongst other things uses tinydns for DNS and axfrdns for handling transfer requests from our secondary DNS (another system).
I understand that tinydns uses port 53 on UDP and axfrdns uses port 53 on TCP.

I've configured axfrdns to only allow connections from my agreed secondary host.
I run logcheck to monitor my logs and every day I see spurious connections on port 53 (TCP) from seemingly random hosts. They usually turn out to be from ADSL connections.

My question is; are these innocent requests or a security risk?
I am happy to block repeat offenders using iptables but don't want to block innocent users of one of the websites I host.

Thanks, Darren.

Best Answer

I assume you are using the server as an authoritive DNS server for a domain name. If that is the case any client that would need to resolve a name that your server has authority for would only need to use UDP. TCP is to be used for zone transfers.

And i also asume that you do not want the world to be able to do zone transfers. While not a security risk in itself zone transfers are usually only allowed to the secondary/backup dns servers. Most dns software also has ACL's to controll wich server is allowed to do zone transfers so you also have a second method of restricting that. But since i see security as allow only what is needed i suggest that you block tcp on port 53 for hosts that dont need to do zone transfers from you.

As a side note, tcp connections from random adsl hosts on tcp port 53 have malicious intent. This is because no legit client should need to do zone transfers from you. They might be trying to access confidential information related to your network, or to explit vulnerabilities to certain DNS software.

While that is not something to be paranoid about it is something that you should be aware of.