Additional IPs through Proxmox

jrshaw

New Member
Sep 7, 2019
19
1
3
33
Hi all,

So I'm very new to the Proxmox world and still quite a Junior technical support engineer so I am not greatest with my technical skills which is why I decided to see if I can find some help here.

So I bought a server through Hetzner, turned it in to a Virtual Environment with Proxmox (loving it so far btw, good effort) and decided to buy some additional IPs to do more in-depth networking as this is where I want to learn the most at the moment.

Now, I followed this guide: https://blog.no-panic.at/2016/08/09...RuK6eJY0D7rnNTA5sy5OTYKntktxO_uo5OhybeWt5ftpk which seems to have worked so far except, I don't really like using debian for client Machines, I'm mostly a CentOS/Red Hat kind of guy, and also, Hetzner has the auto-installer set up for proxmox so they did that bit and added the 1 IP that came with it.

I have these additional IPs on vmbr0 on a /29 range, on my proxmox host, how would I now get this over to my CentOS box and then eventually a Windows server? I've never really done networking before, so this is all very new to me but any assistance would be very greatful :D

So lets say I had for instance: 1.1.1.184/29, this would give me:

1.1.1.184 - 1.1.1.191 on a subnet mask of 255.255.255.248, am I correct? So how would I know what the gateway is for this IP range, or would I use one within this range as the gateway for the others? If so how would I set that on vmbr0 to see that certain ip as the gateway?

I dont know if I am correct in any of this, this is why I am asking :) or maybe people have some better guides to read for me :)

Kindest Regards,

Jammy.
 
Sorry, I forgot to mention, the VM I want to try and assign one of my additional IPs to is CentOS7 and it has a NIC connected to the vmbr0 bridge which has the addtional IPs. I have the NIC config in eth0 which is:

HWADDR=HW addr I have used is the one of the NIC on the VM generated by proxmox.
TYPE=Ethernet
BOOTPROTO=none
IPADDR=1**.2**.1**.1** <--- one of the Additional IPs
NETMASK=255.255.255.248
GATEWAY=1**.2**.1**.1** <------ Should this be one of the additional IPs or the Gateway IP of the primary IP of the proxmox server? Or should it be the actual primary IP?
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
DEVICE=eth0
NAME=eth0
ONBOOT=yes
UUID=

I've rebooted the server and tried to do ping google.com and nothing, the IP shows up in "ip a" but ofcourse its not reaching the outside world so I dont know if I have set it up correctly :)
 
If have a routed setup with a /28 subnet:

Code:
(hetzner network ) -> <primary ip> [ PVE-BOX] <vmbr0 with the first external ip> ---> <all VMs on this bridge have the other external ips>

The vmbr0 is a pure virtual bridge and DOES NOT have the external NIC enslaved. Routing is activated on the PVE host itself and all VMs have the first external ip as router. Works with IPv4 and IPv6 without any problems and does not need to expose ARP or some other hacks others have used to get hetzner network going.
 
Hi JRshaw

Have you checked the FW on the VM in PVE?
Disable IP tables in the centos VM too.
Make sure it’s disabled for testing as a troubleshooting steps.
Have you set DNS in the /etc/resolve.conf
If not you set a name server on the adaptor eth0 or in the above mentioned file.

For testing add the below to only one of the files.

nameserver 8.8.8.8

Then try to ping the same IP or google.com

Let us know how you go.

PS are there any other Nic in PVE ?
Are you sure that the VMBR0 is connected to the public internet and not another internal network?

“”Cheers
G
 
Hi guys,

Thank you for taking the time to reply, LnxBil, I am not sure how I would set this up, its all new to me :) If you know of any decent guides to throw my way that would help, I would really appreciate that.

And velocity08, I have disabled all firewalls for now, and only allowed SSH key access on a custom SSH port. I have set the 3 DNS entries proxmox has on the Proxmox VE which I believe are part of RIPE NCC DNS, I know my proxmox ve goes out to the world as I can get updates and stuff, ping google etc. Just not from my VM.

There is the Primary NIC with is eno1 with the 1 IP that comes with the physical host, so I am guessing I need to reroute traffic through that some how but not sure how. I created the virtual bridge manually and added my additional IPs through the above guide but it only then shows how to connect a debian client to one of those IPs.

I can also ping all my additional IPs from my desktop PC.

This is the NIC on Proxmox:

auto lo
iface lo inet loopback

iface lo inet6 loopback

auto eno1
iface eno1 inet static
address 1**.**.***.231
netmask 255.255.255.224
gateway 1**.**.***5
up route add -net 1**.**.***.224 netmask 255.255.255.224 gw 1**.**.***.225 dev eno1
# route 1**.**.***.224/27 via 1**.**.***.225

iface eno1 inet6 static
address edited
netmask edited
gateway edited

auto vmbr0
iface vmbr0 inet static
address 1**.***.***.184
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
pre-up brctl addbr vmbr0
up ip route add 1**.***.***.185/29 dev vmbr0
up ip route add 1**.***.***.186/29 dev vmbr0
up ip route add 1**.***.***.187/29 dev vmbr0
up ip route add 1**.***.***.188/29 dev vmbr0
up ip route add 1**.***.***.189/29 dev vmbr0
up ip route add 1**.***.***.190/29 dev vmbr0
up ip route add 1**.***.***.191/29 dev vmbr0

auto vmbr1
iface vmbr1 inet static
address 10.20.30.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up iptables -t nat -A POSTROUTING -s '10.20.30.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.20.30.0/24' -o eth0 -j MASQUERADE

So I have removed all IPs for obvious reasons, but thats how my NIC is currently set up on Proxmox VE. With a Private network. If thats even right.

Cheers,

Jammy
 

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!