Is ip possible to disable ipv6 for a certain network namespace?

2

I'm looking closely at network namespaces and because of a network setup with multiple gateways where only some of them are ipv6 enabled, I need to disable ipv6 for a certain network namespace that will be using one of the ipv4 only gateways.

The host of the NS still needs to be ipv6 enabled as it's using an ipv6 enabled gateway.

marius-O

Posted 2019-11-22T09:14:22.137

Reputation: 336

I don't know if it's possible, I had the same problem and I couldn't find the answer after 4 days of looking. But I asked a friend of mine for an older router that only uses ipv4 and that forced it to work. – Emile – 2019-11-22T13:55:26.100

Sneaky, but won't work for me. The namespace gets its configuration from a DHCPv6 enabled router, which needs to stay like that. It's default gateway however is only ipv4. I endup with a split configuration where ipv4 goes via the desired router but ipv6 goes via the router specified by DHCPv6 (which is a different router). – marius-O – 2019-11-22T14:08:21.760

Probably the best way, reading some articles on disabling ipv6 that talk about worsening your network security. Still seems to me it can only be done if there's an actual checkbox that says disable Ipv6. – Emile – 2019-11-22T14:39:14.523

Ended up restricting IPv6 forwarding on the ipv6 enabled routers. There was another option to delete the IPv6 address on the virtual itnerface, but somehow it didn't feel that safe to me :). – marius-O – 2019-11-27T12:16:30.903

No answers