Hello people,
I have been trying to figure out why the following network setup does not work on my new server (Hetzner).
Can you see where am I making a mistake?
If have tried several other settings but no luck.
KVMs with public IPs connected via vmbr0 are working OK.
KVMs with internal IPs (192.168.0.xxx) connected via vmbr1 cannot reach the Internet.
Any help is welcome!
Thanks
Nikole
# network interface settings (IPs ARE CHANGED)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 6.10.66.48
netmask 255.255.255.224
gateway 6.10.66.34
broadcast 6.10.66.64
auto vmbr0
iface vmbr0 inet static
address 79.48.219.72
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.0.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 '192.168.0.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eth0 -j MASQUERADE
>>>>>
File /etc/sysctl.conf on Host:
# sysctl config
#net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
>>>>>
Settings in KVM:
##########################
auto lo
iface lo inet loopback
auto eth0
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
pointopoint 192.168.0.1
##########################
KVMs with internal IPs are bridged to vmbr1
I have been trying to figure out why the following network setup does not work on my new server (Hetzner).
Can you see where am I making a mistake?
If have tried several other settings but no luck.
KVMs with public IPs connected via vmbr0 are working OK.
KVMs with internal IPs (192.168.0.xxx) connected via vmbr1 cannot reach the Internet.
Any help is welcome!
Thanks
Nikole
# network interface settings (IPs ARE CHANGED)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 6.10.66.48
netmask 255.255.255.224
gateway 6.10.66.34
broadcast 6.10.66.64
auto vmbr0
iface vmbr0 inet static
address 79.48.219.72
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.0.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 '192.168.0.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eth0 -j MASQUERADE
>>>>>
File /etc/sysctl.conf on Host:
# sysctl config
#net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
>>>>>
Settings in KVM:
##########################
auto lo
iface lo inet loopback
auto eth0
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
pointopoint 192.168.0.1
##########################
KVMs with internal IPs are bridged to vmbr1