I am in a bit of trouble as I am trying to setup a reverse proxy with and a second server. My idea was to get the firewall to forward https to the reverse proxy and port 29418 (gerrit ssh) to the second server. Now my cooperate IT guy says: CAN NOT! Either both ports go to server 1 or both ports go to server 2.
Ok, as a work around I tried to setup a port forwarding on the reverse proxy of port 29418 -> server2:29418
Details:
- Server1 IP: 10.0.0.132 and 192.168.10.2 on Ubuntu 12.04.2 LTS
- Server2 IP: 10.0.0.133 and 192.168.10.3 on Ubuntu 12.04.2 LTS
Now both https and port 29418 go from the firewall to 10.0.0.132, IT says that's the only way. :(
So please tell me how to forward from 10.0.0.132:29418 -> 192.168.10.3:29418 or 10.0.0.133:29418
When I am working on the 10.0.0.132 I can connect to both 10.0.0.133:29418 and 192.168.10.3:29418 so the ports are open.
-- Update --
My iptables -t nat -L looks like this:
root@dev:/root# iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT tcp -- anywhere dev.example.com tcp dpt:29418 to:10.0.0.133 Chain INPUT (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination root@dev:/root# cat /proc/sys/net/ipv4/ip_forward 1