My understanding of what
ip netns does (and general networking) is fuzzy, so maybe what I'm asking for isn't even possible.
So, what I have. Three global interfaces, let's call them
eth0 is used to access Internet,
tun0 is an interface created by
openconnect for the purpose of connecting to company's VPN.
For reasons I don't understand1, some company's resources are only accessible when the machine is not connected to VPN. I've established this by killing
openconnect process, which subsequently removed the
What I hoped to be able to achieve:
- Create a dedicated
- Create virtual interface pair
veth0to handle addresses of
- Run browser using something like
ip netns exec novpn firefox.
But it didn't do what I expected. The browser run in such a way was still able to access VPN network resources.
So, is it even possible to create two namespaces, one that is connected to VPN and the other one that isn't?
1 - It is trying to access a third-party authentication provider, but, probably, the resource being accessed is different based on whether the machine is connected to VPN or not, or maybe it's looking for the source IP in the outgoing traffic... your guess is as good as any.