Hetzner: Additional Single IP configuration

mazenelzanaty

Member
Jan 16, 2021
7
0
6
26
Hello guys,

I'm having an issue with configuring additional single ip on hetzner:

My Interfaces file:


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

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto enp195s0
iface enp195s0 inet static
        address 168.xxx.147.117/26
        gateway 168.xxx.147.65
        up route add -net 168.xxx.147.64 netmask 255.255.255.192 gw 168.xxx.147.65 dev enp195s0

auto vmbr0
iface vmbr0 inet static
  address 168.xxx.147.117/26
  bridge_ports none
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0
  pre-up brctl addbr vmbr0
  # single extra IP:
  up ip route add 157.xxx.12.50/32 dev vmbr0


auto vmbr10
iface vmbr10 inet static
        address 10.10.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0


My netplan config on vm, I tried added the server main ip as gateway, added mac address from hetzner and routes part too

Code:
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens18:
      #match:
      # macaddress: 00:xx:56:00:xx:B0
      addresses:
      - 157.xxx.12.50/28
        #gateway4: 168.xxx.147.117
      nameservers:
       addresses:
       - 8.8.8.8
       - 1.1.1.1
      routes:
      - to: 0.0.0.0/0
        via: 168.xxx.147.117
    ens19:
      addresses:
      - 10.10.10.2/24
  version: 2
 
I am not familiar with the netplain config (i use debian style networking on ubuntu) but it's always worth a quick check to see if you can get the IP with dhcp. If that works you know that you only have a config problem.
 
I am not familiar with the netplain config (i use debian style networking on ubuntu) but it's always worth a quick check to see if you can get the IP with dhcp. If that works you know that you only have a config problem.
The private ip in the subnet 10.10.10.0/24 works, I managed to get it working by updating netplan config as below

Code:
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens18:
      addresses:
      - 157.xxx.12.50/28
      gateway4: 168.xxx.147.117
      nameservers:
       addresses:
       - 8.8.8.8
       - 1.1.1.1
      routes:
      - to: 168.xxx.147.117
        via: 0.0.0.0/0
        scope: link
    ens19:
      addresses:
      - 10.10.10.2/24
  version: 2
 

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!