0

I have a Proxmox hypervisor. This proxmox is running a VM with HAProxy load balancer.

I am now trying to forward to this HAProxy via iptables port 80 and 443. Unfortunately the source address is lost and every request comes from 192.168.0.1 (Proxmox).

Am I missing a setting or is my forwarding wrong?
Forward:

iptables -A PREROUTING -t nat -i enp2s0 -d 148.XXX.XX.XX -p tcp --dport 80 -j DNAT --to-destination 192.168.0.140:80
iptables -A PREROUTING -t nat -i enp2s0 -d 148.XXX.XX.XX -p tcp --dport 443 -j DNAT --to-destination 192.168.0.140:443

iptables -A FORWARD -p tcp -d 192.168.1.140 --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp -d 192.168.1.140 --dport 443 -j ACCEPT

0 Answers0