Internal port forwarding
Uhu, yet another question about port forwarding.
However, I only want to forward internal TCP packages.
An example situation of where we want to use this is:
ssh port: 22
ssh port: 10201
ssh port: 10212
Now, when a request is made from server1 to server2, we do not want to specify a port, so just 'ssh firstname.lastname@example.org' should be sufficient. The same for 'ssh email@example.com'.
Therefor, TCP traffic to 10.0.0.200 on port 22 should not be directed as that would make the box inaccessable. Only traffic from server1 to other servers - and only when specified.
My iptables is lacking a lot - but the manual pages aren't giving any help either. From how it looks, iptables is not capable of just doing that, is it? If so, what other tools should I be looking for?
There's an easier way to get it done. Create a ~/.ssh/config file and insert statements
Details see man ssh_config.
Maybe I gave the wrong example by using SSH, it's mainly intended for Exim. Maybe it's possible to accomplish that by configuration as well, but I'm not so sure it can.
Originally Posted by framp