Hi to all.
I've a dedicated on Hetzner with main ip 178.63.50.218 used for Hypervisor and a second subnet 178.63.149.0/29 for VM/LXC.
For subnet Hetzner ask routed configuration without virtual macs.
Using several guides and some posts from this forum i've made this conf:
On Hypervisor i've set:
sysctl -w net.ipv4.conf.all.forwarding=1
After i've edited /etc/network/interfaces, with:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
auto vmbr0
iface vmbr0 inet static
address 178.63.50.218/26
gateway 178.63.50.193
bridge-ports eno1
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 178.63.149.0/29
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '178.63.149.0/29' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '178.63.149.0/29' -o vmbr0 -j MASQUERADE
It work with LXC but there is no way to have internet connection on VM...
Any ideas? Thanks.
I've a dedicated on Hetzner with main ip 178.63.50.218 used for Hypervisor and a second subnet 178.63.149.0/29 for VM/LXC.
For subnet Hetzner ask routed configuration without virtual macs.
Using several guides and some posts from this forum i've made this conf:
On Hypervisor i've set:
sysctl -w net.ipv4.conf.all.forwarding=1
After i've edited /etc/network/interfaces, with:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
auto vmbr0
iface vmbr0 inet static
address 178.63.50.218/26
gateway 178.63.50.193
bridge-ports eno1
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 178.63.149.0/29
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '178.63.149.0/29' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '178.63.149.0/29' -o vmbr0 -j MASQUERADE
It work with LXC but there is no way to have internet connection on VM...
Any ideas? Thanks.
Last edited: