Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does anyone know if it is possible to make the remote port in a reverse SSH tunnel listen on the regular network interface of the SSH server, and not just the loopback adapter on the remote system? The client is putty on a Windows machine, server is Ubuntu based (but can go with another OS if needed).
I basically need a system located on the same network as the SSH server to connect to a TCP port on the system that's running the SSH client. No matter what I do, I can only get it to listen on localhost. Thanks!
option -R shows that it is possible with a limitation on the server side where it has to listen the 'GatewayPorts' must be enabled in the sshd_config file.
Off course there is a way to get around this for ports above 1024 (unless you can login as root)
ssh -R 2020:localhost:20 server
# this creates a reverse tunnel from server to client
ssh -P 2020 -g 5900:localhost:5900 localhost
# make a connection from the server to the client via that reverse tunnel
both lines above contain localhost but that refers to the 'other host'
I didn't test this hack but I don't see why it wouldn't work.
The -g allows other host to connect to the port without having access to the sshd_config on that server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.