如何在 OpenBSD 上禁用 IPv6?

gas*_*ter 6 openbsd ipv6

我确信在我的网络中我不会只使用 IPv6 和 IPv4。所以根据KISS 原则,我需要禁用它。我该怎么做?操作系统是 OpenBSD 5.1。

jir*_*rib 3

 -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).
Run Code Online (Sandbox Code Playgroud)

这个 if 来自 `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.
Run Code Online (Sandbox Code Playgroud)

这是来自“man resolv.conf”

定制内核不是 OpenBSD 的出路!永远不要寻求有关自定义内核的帮助,无论如何你都不了解技术细节:)

  • 虽然您对技术细节部分的看法可能是正确的,但我不认为这种精英主义会对任何人有帮助。 (2认同)