/
IPv6 Support in Kasm

IPv6 Support in Kasm

By default Kasm does not support IPv6 communication. To enable IPv6 support please follow the procedure below. These steps assume that the VM provider and the provider’s virtual network also has both IPv4 and IPv6 support enabled. Typically enabling IPv6 support for a VCN (virtual cloud network) must be done at the time of VNC creation.

 Instructions

  1. Ensure that the subnet that has both IPv4 and IPv6 subnets associated with it.

  2. Deploy a VM instance and install Kasm.

  3. Stop Kasm services before enabling IPv6 for Docker and Kasm.

    • /opt/kasm/bin/stop

  4. Remove any existing docker containers.

    • sudo docker rm $(sudo docker ps -aq)

  5. Add this to the /etc/docker/daemon.json file and restart docker. Create the file if it does not exist.

    • { "experimental": true, "ip6tables": true }
  6. Restart the docker daemon.

    • sudo systemctl restart docker

  7. Delete the kasm_default_network, recreate it with IPv6 support, and reapply dhclient. The IPv6 subnet can be any valid RFC4193 ULA (Unique Local Address).

    • sudo docker network rm kasm_default_network sudo docker network create --ipv6 --subnet fc00:0:0:1::/64 kasm_default_network sudo dhclient
  8. Confirm the kasm_default_network is recreated for docker with IPv6 enabled.

    1. This command uses the “jq” utility.

      1. docker network inspect kasm_default_network | jq '.[] | {"Name":.Name, "EnableIPv6":.EnableIPv6}'

    2. This alternate command uses egrep instead of the jq utility.

      1. docker network inspect kasm_default_network | egrep 'Name|EnableIPv6'

  9. Edit the /opt/kasm/current/docker/docker-compose.yaml file to enable ipv6 for the Kasm network. Add key-value pair “enable_ipv6: true" under the networks.kasm_default_network section.

    • networks: kasm_default_network: external: true enable_ipv6: true
  10. Confirm the kasm_default_network is recreated for Kasm with IPv6 enabled.

    • cat /opt/kasm/current/docker/docker-compose.yaml | grep -B5 'enable_ipv6'

  11. Restart Kasm.

    • sudo /opt/kasm/bin/start

       

From this point on workspaces deployed in the kasm_default_network will get both IPv4 and IPv6 addresses. 

 

Testing

To validate your changes launch a workspace, then run the following docker inspect command on the kasm agent to view the configuration details of the workspace.

  1. Launch a workspace

  2. Use command sudo docker ps -a to get the “container ID” or “container Name”.

  3. Use the following command to view the network configurations for the container.

    1. This command uses the “jq” utility.

      1. sudo docker container inspect CONTAINER_ID | jq '.[].NetworkSettings'

    2. This alternate command uses egrep instead of the jq utility.

      1. sudo docker container inspect CONTAINER_ID | egrep 'IPv6'

    3. The “GlobalIPv6Address” and “IPv6Gateway” should be set to an IPv6 address within the subnet specified for the “kasm_default_network” docker network.

 

 


Related Docs:

  • Links to related docs in the kasm_docs project

 Related articles

  • Links to related kb articles in the Confluence project

 

Related content