How to configure vlans with 1 NIC and no switch/firewall

thegreekman

New Member
Jul 3, 2023
5
0
1
Hello, I have proxmox setup with 1 NIC attached to the server. My goal is to be able to route to the 192.168.1.0/24 on multiple vlans that I create so I can give them internet access. Right now I only have 1 vlan setup for testing, vlan 10. I can ping the VM on vlan 10 from the 192.168.1.0/24 subnet, but I can't ping the 192.168.1.0/24 subnet from the VM. I am thinking its a routing issue, but I'm not sure where to add the route. I understand I can use a switch or pfSense, but im wondering if this is possible without the 2 right now. In the future I will incorporate pfSense. Thanks in advance
I am just getting into networking so most of this is new to me.

This is the VM network config

network:
ethernets:
ens18:
addresses:
- 10.0.0.3/24
gateway4: 10.0.0.1
nameservers:
addresses:
- 8.8.8.8
routes:
- to: 192.168.1.0/24
via: 10.0.0.1
version: 2

This is the Proxmox network config


auto lo
iface lo inet loopback

iface enp8s0 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.1.100/24
gateway 192.168.1.1
bridge-ports enp8s0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094

iface wlp6s0 inet manual

auto vmbr0.10
iface vmbr0.10 inet static
address 10.0.0.1/24
 
If you want to route between two different subnets you need something that can act as a router. By default IPv4 Forwarding is disabled in the PVE hosts sysctl.conf.
 

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!