LXC firewall rule - only internet access

Duckdave

Member
May 30, 2018
38
1
13
Is it possible to configure the pve firewall that a lxc can only reach the internet and no other ip addresses in the same subnet?

i know it from pfsense where i can configure a rule that only counts on a specific gateway.

Regards
 
You can create an IPSet containing all of your local networks (e.g. 192.168.0.0/16, 10.0.0.0/8, etc...) and then add the following rules:

Code:
Rule #1
Direction: out
Action: ACCEPT
Destination: <Your Gateway IP>

Rule #2
Direction: out
Action: DROP
Destination: <IPSet you created>

The first one should be optional, but improves reliability (allows ICMP messages for example).
 

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!