Connect vici socket to a particular network namespace

426 views Asked by At

I am able to use python3-vici in the global namespace, suppose I want to route it through a particular namespace say, /var/run/x/x/vpn, how do I do that? I have charon.ctl, charon.pid, ipsec.conf, ipsec.d, starter.charon.pid, strongswan.conf files in the vpn folder but not charon.vici. I tried installing vici in the namespace, but I don't see a charon.vici file there. Anything I'm missing here?

Another thing: I'm not able to map the certificates I have loaded using vici.Session().load_cert() with a particular connection. Using a 'cert' attribute in a connection dictionary inside 'local' throws an error like:

vici.exception.CommandException: Command failed: b'unknown option: certs, config discarded'

Although, if you load the connection using swanctl.conf, and then retrieve information using vici, you can see the cert field being populated on doing a list_conns().

0

There are 0 answers