[SOLVED] Incoming traffic in VM with host's external IP as source instead of real source IP (no NAT)

Iryngael

New Member
Jan 26, 2024
2
0
1
Hello,
I have a dedicated server with proxmox 8.1 installed on it. The host has a bridge named vmbr0 connected to the physical interface.
The host has a public IP on this vmbr0, let's say 12.34.56.78.
I have created a VM for my internet-facing services and connected its NIC to vmbr0 so I could assign another public IP to it and avoid NATing traffic.
This VM has the public IP 12.34.156.78.

Everything seemed to work like a charm : VM has connectivity to the internet, I can manage my own iptables rules in it and avoid NAT by directly exposing it towards internet.

Now comes the weird part :
I noticed a lot of incoming traffic that seemed to originate from the host towards the VM, especially SMTP attempts, zone transfer requests... But nothing is configured on proxmox to use the SMTP server on my VM nor host DNS zones.

Then I noticed incoming external emails being rejected for SPF fail, and noticed that the SPF was failing because the server was checking the host IP instead of the actual sender's IP, making it failing obviously...
In the incoming traffic there is probably ssh attempts as well, being banned by fail2ban. Problem : the source IP being "translated" to the one of the host, that's the one being banned, I get locked out of the server because my connections seems to origin from the host has well.


Is there a mechanism, maybe in proxmox firewall which can cause this kind of behavior ? If I disabled the firewall in the VM settings, nothing changes...

Any help is welcome :)
 
Yeah buddy you should configure the firewall properly, what is the firewall configuration for that VM/NIC/Node? Sounds like its just totally open to automated attacks by hackers thats why you see everything being thrown at it.


But nothing is configured on proxmox to use the SMTP server on my VM nor host DNS zones
Meaning you run these but have not configured it? They are just running an exposed to the internet?
 
Seems like the masquerading rule on the host was also masquerading traffic from the VM ‍♂️♂️
I have adjusted the rule so that it only masquerades traffic from a specific interface
 
Last edited:

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!