Block Portmapper 111

TechLineX

Active Member
Mar 2, 2015
213
5
38
Hi,

I want to block portmapper 111 for all VMs in our 4 Node-Cluster.

I set the firewall at the datacenter-level -> No effect
host-level -> no effect

vmbr0 public ip (either of the vms)
vmrb1 internal ip (management - network)

Firewall is set to accept all, I want to block specific ports for the vms. Its not a possability to set the rule for each vm, I want to set it as default for all vms.

I will attach the active rules.

Thank you in advance
 

Attachments

  • Rules.PNG
    Rules.PNG
    3.4 KB · Views: 44
  • Rules 2.png
    Rules 2.png
    13.5 KB · Views: 44
I want to block portmapper 111 for all VMs in our 4 Node-Cluster.

I set the firewall at the datacenter-level -> No effect
host-level -> no effect

vmbr0 public ip (either of the vms)
vmrb1 internal ip (management - network)

Firewall is set to accept all, I want to block specific ports for the vms. Its not a possability to set the rule for each vm, I want to set it as default for all vms.


Setting via GUI is only possible by setting the rule per VM and interface.


But you can do it by command
Code:
 iptables -I FORWARD -p udp --dport 111 -j DROP

in each Proxmox node.


Note: you can have Proxmox's firewall active at the same which will work independently (in case of a contradiction your explicit setting for port 111 has priority). If you don't use Promox's firewall set
Code:
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
 
Thank you for your reply.

I can't disable rpcbind for all nodes, because I'm using nfs-shares at eth1. It it neccessary to block port 111 only for eth0.

Best regards
 
I can't disable rpcbind for all nodes, because I'm using nfs-shares at eth1. It it neccessary to block port 111 only for eth0.

You can add more filter criterias as you like, e.g. (assuming interface eth0 is a port at vmbr0):
Code:
iptables -A FORWARD -i vmbr0 -p udp --dport 111 -j DROP
 
Is portmapper only tcp? I read it´s also tcp.
AFAIK both, run
Code:
iptables -A FORWARD -i vmbr0 -p udp --dport 111 -j DROP
iptables -A FORWARD -i vmbr0 -p tcp --dport 111 -j DROP

For details how to use iptables study it's man page!
 
  • Like
Reactions: flames
As thread-creator you can (and are highly encouraged to) mark the thread as solved yourself - just edit it and set the tag solved.
Thanks!
 

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!