Need to route from forwarding rule port to another port for instances in target pool
Not sure if this is already supported, but my scenario is that I'd like my load balancer to listen for TCP traffic on port 80 and forward traffic to instances in the relevant target pool listening on port 8080.
I tried to find documentation support the above use case to no avail.
James Lawrence commented
still needed after 6 years =(
a load balancer should support multiple port mappings.
80 -> 8080
443 -> 8443
1234 -> 6789
I've wasted far too much time trying to map multiple ports from loadbalancer to the instance.
A user on code.google.com notes:
This feature would be nice. You can work around it with ip-tables entries on the target pool instances.
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
iptables -t nat -I OUTPUT -p tcp -o lo --dport 80 -j REDIRECT --to-ports 8080