Openbsd

如何在 OpenBSD 上禁用 IPv6?

  • February 12, 2020

我確信在我的網路中我不會只使用 IPv6 的 IPv4。所以根據KISS 原則,我需要禁用它。我該怎麼做?作業系統是 OpenBSD 5.1。

-inet6          Disable inet6(4) on the given interface and remove all
                configured inet6(4) addresses, including the link-local
                ones.  To turn it on again, assign any inet6 address or
                run rtsol(8).

如果來自“man ifconfig”。

family      Specify which type of Internet protocol family to prefer, if
            a host is reachable using different address families.  By
            default IPv4 addresses are queried first, and then IPv6
            addresses.  The syntax is:

                  family family1 [family2]

            A maximum of two families can be specified, where family can
            be any of:

                  inet4     IPv4 queries.
                  inet6     IPv6 queries.

這是來自“man resolv.conf”

自定義核心不是 OpenBSD 要走的路!永遠不要尋求自定義核心的幫助,反正你也不了解技術細節 :)

引用自:https://unix.stackexchange.com/questions/38185