ssh tunneling

Alchemist raimiiic at gmail.com
Thu Sep 12 06:50:06 UTC 2013


2013/9/12 bruce <badouglas at gmail.com>

> Hi.
>
> Not sure if this is the right list, but I'm trying to figure out how
> to allow an app running on an external machine to be setup to access a
> "port"/app running on another machine through a ssh tunnel...
>
> machine A is the machine running an app located on port 4725
> machine A is running sshd, and I can ssh into it
>
> machine B is the client machine, running a test app that wants to
> connect to port 4725 via the foo app.
> machine b can ssh into machine A by doing ssh fuser at 1.2.3.4 and giving
> the password
>
> when foo runs on machine B, it's looking to connect to port 4725, so
> I'm trying to figure out how to allow port 4725 from machine A to be
> forwarded through to port 4725 in machine B...
>
> any pointers would be useful
>
> thanks
>

ssh -lfuser -fnqNT -L ***1INT***:4725:***2INT***:4725 1.2.3.4

Where ***1INT*** is local bind IP, and ***2INT*** is remote IP, to forward.
f.e

ssh -lfuser -fnqNT -L 127.0.0.1:4725:1.2.3.4:4725 1.2.3.4
or
ssh -lfuser -fnqNT -L 127.0.0.1:4725:127.0.0.1:4725 1.2.3.4

netstat -ntul | grep 4725
tcp        0      0 127.0.0.1:4725          0.0.0.0:*               LISTEN

Now Local-to-Remote tunnel listens on your local interface port 4725

> --
> users mailing list
> users at lists.fedoraproject.org
> To unsubscribe or change subscription options:
> https://admin.fedoraproject.org/mailman/listinfo/users
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
> Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
> Have a question? Ask away: http://ask.fedoraproject.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20130912/7c0bd76e/attachment.html>


More information about the users mailing list