[SOLVED] How can I create a local network between VMs?

aeminkocal

Member
Mar 26, 2020
16
0
6
23
Hi!
I want to create a local network between VMs so that I won't need to buy extra ip addresses. How can I do that?
 
@aeminkocal use this:
Code:
auto vmbr1
iface vmbr1 inet static
    address 192.168.178.1
    netmask 255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up iptables -t nat -A POSTROUTING -s '192.168.178.0/24' -o eth0 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '192.168.178.0/24' -o eth0 -j MASQUERADE

add this in your /etc/network/interfaces and u can give vm adresses from 192.168.178.2 - 192.168.178.255 the gateway should be 192.168.178.1
 
can you give me some examples?

Just manually set your network on your guests, but to another network that you use for other stuff. You can even separate it further with vlans without needing to have another bridge. You can have one, but that is optional. This is network 101 and has nothing to do with virtualization. I recommend read the network documentation on your guest OS.

I manage multiple vlans all with different subnets on one single vmbr.
 

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!