Is anybody using only IPv6 in their home lab? I keep running into weird problems where some services use only IPv6 and are “invisible” to everyone (I’m looking at you, Java!) I end up disabling IPv6 to force everything to the same protocol, but I started wondering, “why not disable IPv4 instead?” I’d have half as many firewall rules, routes and configurations. What are the risks?

  • i_am_not_a_robot@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 年前

    Trying IPv6 and failing is normal. Modern software that supports both is supposed to try both, but sometimes people mess it up…

    In general, if you write code that connects to another computer over the network, you want to be connecting to a string, not an IP address. If you write something like connect("lemmy.world", 443), it should connect over either IPv6 or IPv4. However, if you write something like connect(getHostByName("lemmy.world"), 443), that usually will return a single IP address and if that address doesn’t work then the connection fails.

    The Java documentation says it should just work “if everything has been done appropriately.” https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/