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.
Hello,every one,
I'v a problem when sshing to a remote host A(192.168.168.a),which is a internal workstation behind a router B(202.x.29.b).I'm now assigned an address C(192.168.0.c),by a dhcp router D(202.x.24.d).
I can ping through the gateway 202.x.29.1, 202.x.24.1 ,router B and D,yet I can't add all the routes with the error message "SIOCADDRT: Network is unreachable".When I was formerly in 202.x.29.1 segment,ssh worked perfect with route B.
if I understand you correctly, you are trying to route packets to a private address (192.168.x.x) through the Internet. That won't work.
You will have to set up a tunnel between routers B and D, preferably by way of a VPN.
Rupert,
You caught the point.Actually I used to ssh to the host A(192) through the router B(202) when I was assigned directly in the 202 segment, without VPN. Well, Can I make a tunnel between B and D,without VPN,'cause as a unix host itself, should router B run a VPN server?
Or else I was totally wrong about VPN?
that "ssh-hopping" will of course work. But it doesn't imply anything with respect to the routing. No packet is actually routed from you to A.
In order to route traffic from C to A, you will have to setup a VPN. If both routers B and D are Linux machines then it won't be much of an issue. I'd suggest openswan, which is pretty easy to set up.
Basically you can choose between either:
- tunnel between routers B and D which will connect your two private networks. This will be the most comfortable solution, if possible.
- tunnel from your workstation C to remote router B. That way, just your workstation will be able to communicate with the network behind B.
( a direct tunnel from C to A would obviously not work, as that would just put you back to square one...)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.