Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to know if this is possible, and if so how to do it.
Say I have my machine, which wants to connect to a machine outside on the outside world. But it does not have sufficient permissions on the network. However, my machine can access a remote machine on the local intranet that can access the outside machine. How can I, in one command, ssh from my machine to the outside machine, such that I can do port forwarding on it as if I was connected directly.
I have a friend running a service on port 20. I want to forward it (using ssh) to port 4444 on my machine, so that I can point some programs at it to access the service. I cannot make the connection directly because of the firewall in our intranet. Before I lost access over port 22 from my computer to the outside world (reasons unknown; happens to anyone using openSSH for some reason) the command:
ssh -L 4444:localhost:20 username@remotehost
However, now I am isolated. I can connect to an intermediate server which can connect me to the remote server, as you decsribed like this:
I see 3 options:
1) Open 2 port forwards - one on each host - and daisy chain them. Slow and nasty and not what you're really after.
2) Use a different port for SSH between the primary hosts and leave the intermediate out of it.
3) Open your friends port 20 to public access instead of just localhost, then use firewall to restrict the hosts that are allowed to connect.
That's all I can think of - someone else probably has another alternative.