[SOLVED] Inverse firewall rule

Julian J. M.

New Member
Aug 3, 2016
6
0
1
47
I have the default input rule for the VMs as DROP, and then enable specific ports based on the services that machine provides.

What I'm trying to do is to, explicitly block everything from outside of my country.

I can create an ipset "spain", with all the network ranges, and I could just ACCEPT anything from that ipset, but that would open everything. I just want to block everything else not in that ipset.

Is it possible with current implementation?

Thanks,
Julian.
 
I can create an ipset "spain", with all the network ranges, and I could just ACCEPT anything from that ipset, but that would open everything. /QUOTE]

This only accepts traffic from that ipset. I do not understand why you think that opens everything?
 
This only accepts traffic from that ipset. I do not understand why you think that opens everything?

What I mean is that it opens all ports to members of that ipset.

1)
accept port TCP/22
block (default policy)

2)
accept ipset spain
accept port TCP/22 (redundant)
block (default policy)

3)
block ip set NOT spain
accept port TCP/22
block (default policy)

I currently have 1). I can do 2) but that opens all ports to computers from spain, not just 22/TCP
I want 3): standard rules but drop any foreign connection.

Thanks
 
Why don't you simply make rules like:

accept port TCP/22 from ipset spain
block (default policy)
 

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!