Hi!
I have several white IP getting from IPS.
Host setup:
My host get's IP and several LXC contaner gets their IP via vmbr0 bridge.
How can I provide host IP to one LXC for network?
I'll try add this section to /etc/network/interfaces
but after
I lost ping to all existing LCX.
What I am doing wrong?
I have several white IP getting from IPS.
Host setup:
Code:
root@pve:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug enp0s31f6
auto vmbr0
iface vmbr0 inet dhcp
bridge_ports enp0s31f6
bridge_stp off
bridge_fd 0
My host get's IP and several LXC contaner gets their IP via vmbr0 bridge.
How can I provide host IP to one LXC for network?
I'll try add this section to /etc/network/interfaces
Code:
auto vmbr1
iface vmbr1 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
but after
Code:
systemctl restart networking
What I am doing wrong?
Last edited: