Adding a static route to ovn

I have a container running openvpn and I would like to configure my ovn network to route to it.

how would I configure this at the ovn network level?

eg my ovn network is
there is a vpn client network of that I would like to be able to access from the servers

Currently I have to add a static route to every container that I want to connect to the vpn client and that works. I would like a more global solution if posslble.


Hi there,

Try using ipv4.routes on the `ovn`` NIC device

This should add a static route to the virtual router forward traffic toward the instance NIC.

Outside of the OVN network, you can forward traffic to the virtual router’s address on the uplink network by looking for in lxc network show <ovn network>.

I would edit the routes on the vpn container nic correct?

What is the syntax for that route entry? The documentation could be a little more clear on that.


Yes, so say if the VPN’s internal subnet was then you could do:

lxc config device set <vpn container> eth0 ipv4.routes=

This will attract packets destined for hitting the OVN router to be forwarded toward the VPN container’s OVN NIC.

If you were adding multiple routes you would separate them by a comma:

Comma-delimited list of IPv4 static routes to route to the NIC