I have the following configuration:
a DNS record of X.a.b.c pointing to an ip address I a DNS record of Y.a.b.c pointing to the same ip I. Internet---->(RT)--->(FW)--+-->(MN) L-->(Beh) RT is a router (which i have no control over) that has I as left-hand IP and 10.4.255.13 as internal IP. FW is a firewall that has 10.4.255.190 as the left-hand IP and 192.168.0.1 as a right-hand IP. MN has an IP of 192.168.0.2 and Beh has an IP of 192.168.0.3
FW has rules to allow traffic on certain ports, and depending on those ports it forwards to a sepecific IP. For instance, port 22 is forwarded to MN (192.168.0.2).
I have 2 servers, each running on port 22 in each server Beh and MN and i want that, depending on what URL you access, you get connected to an specific server:
If i ssh me@X.a.b.c I get connected to MN. If i ssh me@Y.a.b.c I get connected to Beh.
Can i do this with IPtables?