Redirecting traffic from a interface to antoher
I don't know if this is the right place to ask this. If it's not, please point me the right place.
I have a sshd daemon running on a server (called SERVER) in my network (called INSIDENET).
In another network (called OUTSIDENET) , i have a client which connects to SERVER via ssh protocol, oppening a port (5050) on SERVER that redirects to some host on OUTSIDENET network, all via SSH protocol. This way, if a connect to SERVER, port 5050, i will be automatically redirected to an specified host in OUTSIDENET.
This is the output of 'netstat -n -a -p | grep 5050', typed in SERVER:
tcp 0 0 127.0.0.1:5050 0.0.0.0:* LISTEN 22522/1
Well, ssh protocol open the port 5050 just on the local interface, so i can't connect from a host of INSIDENET to this port on i.e. ETH0.
I'd like to know if there is a way to accept connection in the same port but in anoter interface (i.e. ETH0) and redirect this traffic to the local interface (127.0.0.1)
Thanks.