LXC firewall rule - only internet access


May 30, 2018
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.

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

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).


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!