Hetzner Network configuration

SwaggerRO19

New Member
May 8, 2019
17
0
1
Romania
Hey guys,

I'm kind of newbie on Proxmox, and I bought an Dedicated Server from Hetzner. I've got the main IP address and one suplimentar IP Address. I've also bought an /29 subnet IP Addresses but I am not able to configure it.

I am not able to configure them in order to allocate them to a VM or CT in Proxmox. i am able to use only the main ip address (ending in x.66).

My /etc/network/interfaces looks like this:

Code:
### Hetzner Online GmbH installimage

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto enp0s31f6
iface enp0s31f6 inet static
  address 138.x.x.66
  netmask 255.255.255.192
  gateway 138.x.x.65
  # route 138.x.x.64/26 via 138.x.x.65
  up route add -net 138.x.x.64 netmask 255.255.255.192 gw 138.x.x.65 dev enp0s31f6

iface enp0s31f6 inet6 static
  address 2a01:4f8:172:3f01::2
  netmask 64
  gateway fe80::1

auto vmbr0
iface vmbr0 inet static
        address 138.x.x.x
        netmask 255.255.255.192
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        up ip route add 138.x.x.214/26 dev vmbr0

auto vmbr1
iface vmbr1 inet static
        address 5.x.x.x
        netmask 255.255.255.248
        bridge_ports none
        bridge_stp off
        bridge_fd 0

Any ideea/help would be really appreciated :)

Thanks!
 
Last edited:
Code:
auto enp0s31f6
iface enp0s31f6 inet static
  address SERVER-IP
  netmask NETMASK
  pointopoint GW
  gateway GW
  up route add -net ..... netmask 255.255.255.192 gw .... dev enp0s31f6
Code:
auto vmbr0
iface vmbr0 inet static
  address SERVER-IP
  netmask 255.255.255.255
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  up ip route add first_ip/32 dev vmbr0
  up ip route add second_ip/32 dev vmbr0
 
  • Like
Reactions: SwaggerRO19
Code:
auto enp0s31f6
iface enp0s31f6 inet static
  address SERVER-IP
  netmask NETMASK
  pointopoint GW
  gateway GW
  up route add -net ..... netmask 255.255.255.192 gw .... dev enp0s31f6
Code:
auto vmbr0
iface vmbr0 inet static
  address SERVER-IP
  netmask 255.255.255.255
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  up ip route add first_ip/32 dev vmbr0
  up ip route add second_ip/32 dev vmbr0

I want to add a subnet, not only one IP Address.
 
Code:
auto vmbr0
iface vmbr0 inet static
  address 1st-subnet-ip
  netmask 29
  bridge_ports none
  bridge_stp off
  bridge_fd 0

Problem again on the Hetzner Proxmox Server. I've just bought a new server today and used the same setting. It is not working for LXC container and Centos7 VM.

Any ideea? This time I'm using a 28 subnet mask. Also with 29 subnet mask not working.

Thanks
 
Last edited:
Hi SwaggerRo,

you can provide us ifcfg-yournetwork from /etc/sysconfig/network-scripts?
More than that you can tell us what ip you receive from hetzner ? Use format like this x.x.x.25 ....x.x.x.45

Thanks :)
 
Hi bit2gb,

I received the IP Address subnet: Netmask: 148.xxx.xxx.120/29m My IP Server is: 148.xxx.xxx.147/29

I used the configuration that our colleague Florian Schaal wrote up, initially it worked. But today when wanting to setup a new server, it won't work.
 
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 0c:c4:7a:0f:00:32 brd ff:ff:ff:ff:ff:ff
    inet 148.251.xxx.147/26 brd 148.251.xxx.191 scope global eno1
       valid_lft forever preferred_lft forever
    inet6 2a01:4f8:211:e12::2/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::ec4:7aff:fe0f:32/64 scope link
       valid_lft forever preferred_lft forever
3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether fe:31:f3:86:83:b4 brd ff:ff:ff:ff:ff:ff
    inet 148.251.xxx.120/29 brd 148.251.xxx.127 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::949f:5aff:feef:27eb/64 scope link
       valid_lft forever preferred_lft forever
7: veth100i0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether fe:31:f3:86:83:b4 brd ff:ff:ff:ff:ff:ff link-netnsid 0

Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto eno1
iface eno1 inet static
        address  148.251.xxx.147
        netmask  255.255.255.192
        gateway  148.251.xxx.129
        up route add -net 148.251.xxx.128 netmask 255.255.xxx.192 gw 148.251.xxx.129 dev eno1

iface eno1 inet6 static
        address  2a01:4f8:211:e12::2
        netmask  64
        gateway  fe80::1

auto vmbr0
iface vmbr0 inet static
        address  148.251.xxx.120
        netmask  29
        bridge-ports none
        bridge-stp off
        bridge-fd 0

This is my config. What I am doing wrong? What should be the net config file for a centos 7 VM?

Hetzner IP subnet: 148.251.xxx.120. Gateway: 148.251.xxx.147

Thanks

If this was working on the old server, you may used a wrong gw for the container?
check
Code:
pct config ID