How to create separate network for VMs?

sz3jdii

New Member
Nov 26, 2019
1
0
1
26
Hello,
I'm very newbie in Proxmox environment. What I want to reach is to create a separate network for VMs and to make sure that they can only connect to Internet and don't see my other devices connected to router. My current infrastructure looks like:
Internet: Directly connected to router
Router: TP-Link
Server: HP with Proxmox directly connected to Router
Nas, Computers: Connected directly to Router
What I've tried to do is to set a new bridge on proxmox machine like:

iface vmbr1 inet manual
address 10.0.1.1/24
bridge_ports none
bridge_stp off
bridge_fd 0
post-up /sbin/iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE
pre-down /sbin/iptables -t nat -D POSTROUTING -o vmbr0 -j MASQUERADE
and then set separate interface for every VM like

allow-hotplug ens19
iface ens19 inet static
address 10.0.1.100/24 #and so on for the others vms
gateway 10.0.1.1
enter code here
The problems are:
1) My VMs can't connect to Internet
2) I can't route for example 22 SSH port from external network to my VM.
Thank you for every help :)
Have a nice day!
 

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!