net_admin: enable IPv6 forwarding in the container

This commit is contained in:
Girish Ramakrishnan
2022-05-19 17:10:05 -07:00
parent 2596afa7b3
commit d366f3107d

View File

@@ -400,6 +400,7 @@ async function createSubcontainer(app, name, cmd, options) {
// ipv6 for new interfaces is disabled in the container. this prevents the openvpn tun device having ipv6
// See https://github.com/moby/moby/issues/20569 and https://github.com/moby/moby/issues/33099
containerOptions.HostConfig.Sysctls['net.ipv6.conf.all.disable_ipv6'] = '0';
containerOptions.HostConfig.Sysctls['net.ipv6.conf.all.forwarding'] = '1';
}
if (capabilities.includes('mlock')) containerOptions.HostConfig.CapAdd.push('IPC_LOCK'); // mlock prevents swapping
if (!capabilities.includes('ping')) containerOptions.HostConfig.CapDrop.push('NET_RAW'); // NET_RAW is included by default by Docker