Issue with KVM Networking Setup on Hetzner Server

opaxweb

Member
Oct 15, 2014
4
1
23
World Wide Web
www.opaxweb.com
Hello,

we got a new server from hetzner. Installed proxmox on it.
Host is running fine and in network with openvz guest machine but for kvm guest there are some problems.i want to run this server on public IP to use as a VPS.


I'm struck at assigning IPs to KVM machine.i am trying with bridge networking still not get success please suggest how to assign public IP to KVM guest machine to use as VPS in proxmox hetzner server.

my host machine settings for /etc/network/interface


### Hetzner Online AG - installimage
# Loopback device:
auto lo
iface lo inet loopback

# device: eth0
auto eth0
iface eth0 inet static
address 176.9.117.167
broadcast 176.9.117.191
netmask 255.255.255.224
gateway 176.9.117.161
# default route to access subnet
up route add -net 176.9.117.160 netmask 255.255.255.224 gw 176.9.117.161 eth0

auto vmbr0
iface vmbr0 inet static
address 176.9.117.167
netmask 255.255.255.224
gateway 176.9.117.167
bridge_ports none
bridge_stp off
bridge_fd 0

iface eth0 inet6 static
address 2a01:4f8:151:71ac::2
netmask 64
gateway fe80::1



Any help is greatly appreicated.
 
You cannot have the same address assigned to both eth0 and vmbr0. Try this instead

Code:
[COLOR=#333333]# device: eth0[/COLOR]
[COLOR=#333333]auto eth0[/COLOR]
[COLOR=#333333]iface eth0 inet manual

[/COLOR][COLOR=#333333]auto vmbr0[/COLOR]
[COLOR=#333333]iface vmbr0 inet static[/COLOR]
[COLOR=#333333]address 176.9.117.167[/COLOR]
[COLOR=#333333]broadcast 176.9.117.191[/COLOR]
[COLOR=#333333]netmask 255.255.255.224[/COLOR]
[COLOR=#333333]gateway 176.9.117.161
[/COLOR][COLOR=#333333]bridge_ports eth0[/COLOR]
[COLOR=#333333]bridge_stp off[/COLOR]
[COLOR=#333333]bridge_fd 0[/COLOR]
[COLOR=#333333]# default route to access subnet[/COLOR]
[COLOR=#333333]up route add -net 176.9.117.160 netmask 255.255.255.224 gw 176.9.117.161 eth0

[/COLOR][COLOR=#333333]iface eth0 inet6 manual[/COLOR]



 
thanks for replying mir...
will you please suggest me what will the kvm guest machine network settings..
when we have an additonal IP 176.9.117.188 which are bond with mac address.
how to use this ip in kvm guset machine..

Please reply am waiting for your responce..
 
You cannot. You must ask Hetzner for another solution like having a /30 IP. Eg. 176.9.117.184/30 will provide:

Gateway: 176.9.117.184
Server1: 176.9.117.185
Server2: 176.9.117.186
Broadcast: 176.9.117.187
 
Can't he simply create a nic for the KVM VM with the mac address choose by Hetzner and assign internalli the public ip to eth0 of that VM?
It seems the server only has one nic so this is impossible. For this to work the server needs two physical nics where each nic has the configured mac.
 
first of all, hetzner assigns virtual mac addresses for the (maximum three) single ip's you can order, if needed.
you may have noticed that in your robot webinterface.


i may be wrong, but for bridged setup with virtual mac addresses generated by the hetzner robot you may need a config like this? (it works for my three proxmox vm's with an hetzner root)

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
address 176.9.117.167
netmask 255.255.255.224
gateway 176.9.117.161
bridge_ports eth0
bridge_stp off
bridge_fd 0

iface eth0 inet6 static
address 2a01:4f8:151:71ac::2
netmask 64
gateway fe80::1



After pasting this you will have to disable ipv4 forwarding (correct me if i am wrong) and set the virtual mac address (given by the robot) at the VM.

your vm should have this config with the ip 176.9.117.188

auto lo
iface lo inet loopback


auto eth0
iface eth0 inet static
address ip 176.9.117.188
netmask (netmask for the single ip ... you find it when you hover the mouse over the ip address in the hetzner robot)
pointopoint (gateway address for the single ip ... you find it when you hover the mouse over the ip address in the hetzner robot)
gateway (gateway address for the single ip ... you find it when you hover the mouse over the ip address in the hetzner robot)
dns-nameservers 8.8.8.8 8.8.4.4


!!!(please do yourself the favour and use the google dns in the config above ... forget the hetzner dns servers)!!!

i hope that it will work for you :)
Sorry for my bad english ... i would prefer german anyway
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!