[SOLVED] Ovh, private network + public ip

May 9, 2016
3
0
21
39
Hi,

I've been looking over a lot of different information over the last couple of hours and can't quite figure out how do what i want to do. I like to note I'm not a networking master, far from it. I'm a developer mainly working on PHP and Java, I've ended up needing to learn these new skills as no one else can do it.

Currently I have a dedicated box on Ovh which I use for testing and I'm looking into using proxmox on production, so need to get this issue solved, or I'll end up using vmware :(.

I want to have a number of vm's some that have their own dedicated ip's or multiple of but all of them need a connection to a private lan. I have no problem attaching public ip's to vm as I setup a master template a while ago on centos 7. The master template has all the setting for my staging ip then I log on and use the script I created to change it over to one of my other ips https://github.com/hertzigger/OvhVmBridger.

Currently I'm securing the vms with iptables, for instance I'm allowing only inbound traffic on port 3306 from my 2 ip blocks. Rather that allowing all traffic on a local network range.

I'm assuming to have what I want I'm going to need multiple network cards on vm that have both public ips and

But I can't figure out how to create a private network using proxmox. I think I tried it a while back that might be why I have vmbr1 but can't quite remember.

Here's my network interfaces.

proxmox_network_interfaces.png



and here is my configuration of external ip address on a vm

/etc/sysconfig/network-scripts/ifcfg-ens18
Code:
DEVICE=ens18
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=91.121.254.163
GATEWAY=178.33.235.254
ARP=yes
HWADDR=02:00:00:*:*:*

/etc/sysconfig/network-scripts/route-ens18
Code:
178.33.235.254 - 255.255.255.255 ens32
178.33.235.0 - 255.255.255.0 ens32
default 178.33.235.254

So I think basically what I am looking for is a little bit of a guide on how to setup a private network on proxmox with centos 7. Most of the guide use debian and it's difficult for me to translate as my network knowledge isn't the best. With the added confusion of ovh's network.

I appreciate anyone who can offer some help.
 
I got it working, so you can all relax :)

I deleted the vmbr1 with the dummy0 was something old.

and followed create a vm nat http://help.ovh.co.uk/Proxmox

restarted networking on the host and then attached the new bridge to the vms by adding a new ethernet adaptor on each.

Then add the following network interface on each vm with different ips of course

Code:
DEVICE=ens19
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.0.2
GATEWAY=192.168.0.254
ARP=yes

Here are the result of a ping between 2 vms

network_ping.png


Just thought I would post the resolution on here incase the same query comes up in the future. :)
 

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!