Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DNS load balancing

    NAT
    2
    2
    590
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mixou
      last edited by

      Hello,

      I don't know if I'm on the right forum section, I didn't find the section for the load-balancing.

      I have a pool of public DNS and private DNS on a docker swarm. Public dns are listening on two ip adresses on  udp/tcp 530 port, private are listening on te port 531.

      To load balance and change the Dns port to 53 I plan to use the load-balancer functionality.

      But once implemented it doesn't work and I don't know how to troubleshoot the problem

      Some screenshots


      And the relyd.conf

      
      log updates 
      timeout 1000 
      table <mysqld>{
      	10.31.1.10 retry 5
      	10.31.1.40 retry 5
      }
      table <public-dns>{
      	10.33.1.10
      	10.33.1.20
      }
      dns protocol "dnsproto" {
      	tcp { nodelay, sack, socket buffer 1024, backlog 1000 }
      }
      redirect "mysqlserver" {
        listen on 10.31.1.100 port 3306
        forward to <mysqld>port 3306 check tcp 
      }
      relay "pubdns" {
        listen on 10.33.1.100 port 53
        protocol "dnsproto"
        forward to <public-dns>port 530 mode loadbalance check icmp 
      }</public-dns></mysqld></public-dns></mysqld> 
      

      Thank you for the help

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        The DNS load balancing feature doesn't see much testing, it's possible there is an issue there, or it may just be a limit of relayd. Last time I tried it, it worked, but I also wasn't trying to have it hit a different internal port.

        How are you testing it to see if it works? Have you tried other monitoring types than ICMP?

        One major thing to be aware of, when relayd does dns balancing it acts like a proxy, so your DNS servers will only see the address of the firewall itself and not the clients. Depending on your DNS server config that may make a difference in how it handles the queries.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.