Routing a network through specific interface ip alias

Hello,

I have two public IPV4 defined on a single network interface. I created a default Incus network bridge called ad0. I need all egress traffic from the containers added to that network to come specifically from one of the public IP.

What is the recommended way of doing so ?

I don’t think it’s possible with incus managed network:

I think you should create an unmanaged bridge using a vlan pointing to one of the public IP, then attach containers to it.

No hanks. I want to keep my Incus managed bridge.

I found how to do it :

incus network set gkbr0 ipv4.nat.address=[redacted IPV4]
incus network set gkbr0 ipv6.nat.address=[redacted IPV6]

It was in the documentation …

ipv4.nat.address: The source address used for outbound traffic from the bridge

1 Like