I have a service setup that redirects after a succesfull login (Couchbase), but the IP it transfers to is an local one, where the client that is connecting to cannot reach.
How can I setup iptables so that I can route traffic generated by the client itself to another port?
- Client connects to server1
- Server1 sends Client the ip to connect to (Which is local to server1, not Client)
- Client gets redirected to 192.168.2.53:11210 (Can't reach)
- IPTables routes all traffic that is send to 192.168.2.53:11210 to outside_ip:11210
The HTTP service just returns and IP to connect to, thus 'redirecting' the Client, but not with a HTTP Redirect.
I'm not confortable with IPTables so I'm not eager to experiment with it/mess up and lose my ssh connection, I've seen some examples but none of them seem to work or do exactly what I want.