Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
My main system is connected locally through lan with other computer where I place backup files, while my laptop and main are having connection with each other through wifi hotspot. I have various files to copy to and fro from one system to other (as and when needed) which is on backup computer. To reach to backup computer I have ssh to main computer and then to backup computer and then to the file I want which consumes lot of time. I want to directly reach to the backup computer from my laptop. I have attached the file to explain my scenario. Thank You
It's not clear which one in your description is A, B, or C in the diagram. However, if you can SSH from B to C then you can also SSH from A to C via B. Recent versions of the OpenSSH client support the ProxyJump (-J) option.
Code:
ssh -J userB@B userC@C
See "man ssh" and scroll down to ProxyJump for the details. If you have a really old version, then there are other methods but upgrading would be best.
The main system is B, the backup system is C and the third system which is laptop is system C. Further I would like to do it using ip forwarding as ssh -j option is not available.
You won't be able to ping C from A no matter what. If you looking for a way to check on C from A you can still use SSH, though there is a bit of overhead. It'd be better to ping C directly from B and then have a way to report to or from A.
Then you appear to have some routing set up already on B. Check the output from iptables-save on B and pay attention to each of the tables, especially if there is a nat table active or if the FORWARD chain is in use in the main table. However, others will have more experience with iptables and can provide better pointers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.