Is there a possiblity, to restrict a cgroup to a specific network interface? All packets from the cgroup should only be routed via a VPN connection, while other packets use the default route.
With unix users its possible with iptables "-m owner --set-mark" and then routing with "ip rule".
Is it possible to match a cgroup? iptables seems to have no support for this.
iptables support for -m cgroup has not yet been released, but you can easily build the extension yourself and install it on your system:
Use
-m cgroup
. Example:From: http://lwn.net/Articles/569678/