I am looking to setup a public DNS server and I found this DNS server

https://technitium.com/dns/

Does anyone know what the risks are of exposing the DNS port to the internet? How likely am I to get compromised? Is this a really bad idea?

  • AtariDump@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    ·
    edit-2
    9 months ago

    Do. Not. Open. Port. 53. To. The. Internet.

    Just Don’t.

    This is a really bad idea.

    If you’re trying to reach something on your network, VPN back in.

    • Nik282000@lemmy.ca
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 months ago

      I ran my ssh behind 53 for a while because it’s rarely blocked. A few bots even got it right and figured out it was ssh.

      • Encrypt-Keeper@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        9 months ago

        This is why the concept of running services until different ports than default isn’t a real security measure, it doesn’t actually take any effort to figure out what kind of service is running on a port.

      • 𝕽𝖔𝖔𝖙𝖎𝖊𝖘𝖙@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        9 months ago

        I use a DNS server on my local network, and then I also use Tailscale.

        I have my private DNS server configured in tailscale so whether on or off my local network everything uses my DNS server.

        This way I don’t have to change any DNS settings no matter where I am and all my domains work properly.

        And my phone always has DNS adblocking even on cell data or public Wi-Fi

        The other advantage is you can configure the reverse proxy of some services to only accept connections originating from your tailscale network to effectively make them only privately accessible or behave differently when accessed from specific devices

      • ikidd@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        edit-2
        9 months ago

        From outside? Set up a Cloudflare account and point the NS from your registrar to it.

        From inside? Set up unbound on a docker host and don’t open it to the internet. Use that one when you’re local and the normal public DNS when you’re outside. But everything I’m seeing in here makes me sure you shouldn’t even consider opening ports in your firewall to expose inside host services. Use a VPN when you’re roaming, and only use your DNS for local servers/hosts via that VPN. The only use for your outside domain name should be to point a single hostname to your outside IP address so you can use it for your VPN endpoint.

        Use DNS challenges for LetsEncrypt cert requests and remove host entries from your Cloudflare after you get your cert.

    • Shdwdrgn@mander.xyz
      link
      fedilink
      English
      arrow-up
      12
      ·
      9 months ago

      This right here. As a member of the OpenNIC project, I used to run an open resolver and this required a lot of hands-on maintenance. Basically what happens is someone sends a very small packet requesting the lookup of something which returns a huge amount of data (like DNSSEC records). They can make thousands of these requests in a short period, attempting to flood out the target domain’s DNS servers and effectively take them offline, by using your open server as the attacker.

      At the very least, you need to have strict rate-limiting controls on DNS lookups. And since the requests come in through UDP, they can spoof their IP address so you can’t simply block an attacker. When I ran into this issue, I wrote up scripts to monitor for a lot of requests to the same domain name and outright block those until the attack stopped. It wasn’t a great solution, but it did at least make sure my system wasn’t contributing to an attack.

      Your best bet is to only respond to DNS requests for your own domain(s). If you really want an open resolver, think about limiting it by creating some sort of sign-up method (for instance, ddns servers use a specific URL to register the changing IP of known users), but still keep the rate-limiting in place.

  • Moonrise2473@feddit.it
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 months ago

    I use technitium but it’s like pihole, designed for a few concurrent users in a local network? Instead you want that anyone in the world can use your DNS?

    But you would only attract bad actors, normal users won’t use a random DNS server as it could redirect specific sites to phishing pages

      • Moonrise2473@feddit.it
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        Ah you want to host a name server

        That’s the hardest thing ever to self host, can’t just use the free name server service from the registrar or cloudflare?

        IMHO even the most dedicated sysadmin wouldn’t even think to self host that

  • ninjan@lemmy.mildgrim.com
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    3
    ·
    9 months ago

    DNS is plenty secure due to its simplicity and age. From the perspective of securing your server that is. DNS has numerous flaws when it comes to security in terms of can you trust the resolved name. But that is another matter.

    I’d be more worried about the gui, keep that behind a secure proxy or don’t expose it to the internet at all if we’re talking a server at home.

    I run my own DNS and it’s virtually a prerequisite if you want to host stuff under a personal domain in a smooth fashion. At least if you don’t want to rely on a big player like say Cloudflare.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    8 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DNS Domain Name Service/System
    IP Internet Protocol
    UDP User Datagram Protocol, for real-time communications
    VPN Virtual Private Network

    [Thread #438 for this sub, first seen 19th Jan 2024, 00:35] [FAQ] [Full list] [Contact] [Source code]