add route für all LXC/VM of vmbr0

fruchtzwerg

Member
Apr 3, 2023
40
2
13
I want to add a route for the pve and all LXC/VM within vmbr0. 192.168.178.100is the gateway for entering the the network 192.168.0.0/24

I tried this in the /etc/network/interfaces

Code:
auto vmbr0
iface vmbr0 inet static
        address 192.168.178.2/24
        gateway 192.168.178.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up ip route add 192.168.0.0/24 via 192.168.178.100

This works from the host (192.168.178.1) and the gateway (192.168.178.100 . But not in all the other containers of 192.168.178.0/24

How can I attach the route to them?
 
Ich habe den Wunsch mittlerweile aufgegeben.
Die Route übergebe ich nun an den Router (gateway 192.168.178.1).
Das heißt, dass nun nicht nur der host und seine LXC/VM in das entfernte Netz kommen, sondern alle Geräte im gesamten Netz 192.168.178.0/24.
Das wollte ich eigentlich vermeiden, aber was soll's.