I have a network on which I run multiple servers each dedicated to a given service.
Because most services run on distinct ports I'm currently looking for a way of unifying "all" services into a single "proxy" machine. The idea is to abstract which machine is being accessed but still allow direct connection if needed/requested.
This "proxy" machine has only one network interface which is part of the same network as all the other service providing machines.
I've looked into Routing and NAT but I've so far failed to figure out how to make it work. I tried to achieve this using shorewall but couldn't find clear examples. However I'm not entirely sure this is the best/simplest strategy.
With that said, what would be the best way of achieving this result?
Proxy IP - Listening port - Send requests to 192.168.0.50 80 (http) 192.168.0.1:80 " 22 (ssh) 192.168.0.2:2222 " 3306 (mysql) 192.168.0.3:3000 " 5432 (postgres) 192.168.0.4:5432 " 5222 (jabber) 192.168.0.5:5222
PS: I'm not concerned with the single-point-of-failure nature of the proxy.