Forwarding to Port 80 on VM

msd

Active Member
Sep 12, 2015
24
0
41
Hello Proxmox Team,

I have proxmox installed on Dedicated Server and 3 Virtual Machines and all of these machines represent web application running on port 80 of every machine.
I need to forward the call to any of those machines with specific port (for example http://myserver:1080/myapp will be forwarded to the first VM to the web application on location my app).
Here si a sample of my configuration, and it doesn't work, so what is wrong:

post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 1080 -j DNAT --to 192.168.1.1:80
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 1080 -j DNAT --to 192.168.1.1:80

Thanks for the assistance in advance...