Ad Widget

Collapse

Disable IPv6 DNS request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • studero
    Member
    • Aug 2023
    • 84

    #1

    Disable IPv6 DNS request

    Hi,

    My Zabbix server run on RedHat 9 server without configuration of IPv6. IPv6 was totaly disable with apply the option into the grub config file.

    But when I sniff the network on the port 53 (DNS). I see some requestion with DNS IPv6.

    So I want to disable IPv6 into Zabbix server.

    I need help, regards
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Code:
    $ cat /etc/sysctl.d/disable-ipv6.conf
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.eno1.disable_ipv6 = 1
    net.ipv6.conf.eno2.disable_ipv6 = 1
    # don't disable on lo
    net.ipv6.conf.lo.disable_ipv6 = 0
    You may not need the entries for your NIC names (eno1 and eno2 in the example above). Once you have the file configured, reboot.

    Comment

    • studero
      Member
      • Aug 2023
      • 84

      #3
      Originally posted by tim.mooney
      Code:
      $ cat /etc/sysctl.d/disable-ipv6.conf
      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.eno1.disable_ipv6 = 1
      net.ipv6.conf.eno2.disable_ipv6 = 1
      # don't disable on lo
      net.ipv6.conf.lo.disable_ipv6 = 0
      You may not need the entries for your NIC names (eno1 and eno2 in the example above). Once you have the file configured, reboot.
      Hi,

      This is all ready done.

      The server is installed without IPv6.

      [root@svx-mon-02t ~]# sysctl -a |grep ipv6
      [root@svx-mon-02t ~]#

      I need more help​

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Studero-

        Sorry, I misunderstood your original question.

        I'm not sure how to answer your actual question, because it can depend upon a lot of things.

        If your Zabbix server's DNS resolver does a DNS lookup of a remote system, it may not even be possible to control whether it gets a response that contains both A records (IPv4) and AAAA records (IPv6). Some resolvers might allow you to control that, but some may not.

        Modern Linux systems have /etc/gai.conf (see "man gai.conf(5)") to control how getaddrinfo(3) works. That file can be used to change the preference for IPv6, as discussed in RFC 3484 (which has been obsoleted by RFC 6724). I don't know if that will influence whether your DNS resolver asks for both A and AAAA records for a host, though.

        If a remote host has both A and AAAA records, and your Zabbix server only has an IPv4 address, it can only select the IPv4 address for communication, though, so it's not clear to me what harm receiving the extra AAAA record would be.

        Comment

        • studero
          Member
          • Aug 2023
          • 84

          #5
          Originally posted by tim.mooney
          Studero-

          Sorry, I misunderstood your original question.

          I'm not sure how to answer your actual question, because it can depend upon a lot of things.

          If your Zabbix server's DNS resolver does a DNS lookup of a remote system, it may not even be possible to control whether it gets a response that contains both A records (IPv4) and AAAA records (IPv6). Some resolvers might allow you to control that, but some may not.

          Modern Linux systems have /etc/gai.conf (see "man gai.conf(5)") to control how getaddrinfo(3) works. That file can be used to change the preference for IPv6, as discussed in RFC 3484 (which has been obsoleted by RFC 6724). I don't know if that will influence whether your DNS resolver asks for both A and AAAA records for a host, though.

          If a remote host has both A and AAAA records, and your Zabbix server only has an IPv4 address, it can only select the IPv4 address for communication, though, so it's not clear to me what harm receiving the extra AAAA record would be.
          Hi,

          The server Zabbix run on RedHat 9.2. Do you have a solution to install and configure /etc/gain.conf on this Linux ?

          Comment


          • tim.mooney
            tim.mooney commented
            Editing a comment
            As I said in my comments, "I don't know if that [gai.conf] will influence whether your DNS resolver asks for both A and AAAA records for a host, though".
        • studero
          Member
          • Aug 2023
          • 84

          #6
          Originally posted by tim.mooney
          Studero-

          Sorry, I misunderstood your original question.

          I'm not sure how to answer your actual question, because it can depend upon a lot of things.

          If your Zabbix server's DNS resolver does a DNS lookup of a remote system, it may not even be possible to control whether it gets a response that contains both A records (IPv4) and AAAA records (IPv6). Some resolvers might allow you to control that, but some may not.

          Modern Linux systems have /etc/gai.conf (see "man gai.conf(5)") to control how getaddrinfo(3) works. That file can be used to change the preference for IPv6, as discussed in RFC 3484 (which has been obsoleted by RFC 6724). I don't know if that will influence whether your DNS resolver asks for both A and AAAA records for a host, though.

          If a remote host has both A and AAAA records, and your Zabbix server only has an IPv4 address, it can only select the IPv4 address for communication, though, so it's not clear to me what harm receiving the extra AAAA record would be.
          Hi again,

          I want that Zabbix server does not made DNS request in IPv6 because in my company IPv6 is not use and not configured.

          Comment

          • tim.mooney
            Senior Member
            • Dec 2012
            • 1427

            #7
            Originally posted by studero

            I want that Zabbix server does not made DNS request in IPv6 because in my company IPv6 is not use and not configured.
            I understand (now) what you're trying to do, but what I'm saying is I don't know if what you want to do is even possible.

            If you understand DNS, you also must realize that even if your company doesn't use IPv6, your systems may still see external IPv6 addresses in results.

            Comment

            • studero
              Member
              • Aug 2023
              • 84

              #8
              Originally posted by tim.mooney

              I understand (now) what you're trying to do, but what I'm saying is I don't know if what you want to do is even possible.

              If you understand DNS, you also must realize that even if your company doesn't use IPv6, your systems may still see external IPv6 addresses in results.
              Hi,

              This is the Zabbix system that made DNS request in IPv6 mode. I have see if I install Zabbix from the source package, they are a parameter to set IPv6. This is "--enable-ipv6" and see the page 3 Installation from sources (zabbix.com)​.

              How can verify if the Zabbix package contians this parameter ? May be, that's can resolv my problem with request DNS in IPv6 mode. What do you think ?

              Comment

              Working...