[SOLVED] SSH tunnel not accessible from different machine on same network
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.
SSH tunnel not accessible from different machine on same network
Hi everyone
I have an SSH tunnel setup between a local server and a remote postfix relay VPS. This is so we can route all our outgoing mail through this SSH tunnel to a private relay VPS, this seems to give us much more consistent mail delivery than using our ISP's relay.
So the SSH tunnel is set to route port 1025 on machine A to port 25 on the VPS
This part of it is working perfectly and has been for months.
However today I wanted to set our e-mail newsletter software (on the same network as the SSH tunnel start-point) to send through the SSH tunnel.
So I punched in the IP/port... 192.168.1.5:1025 but it doesn't work.
Is there something I need to do to allow connections from other machines on the LAN to access the start-point of the SSH tunnel?
Or are SSH tunnels restricted to localhost connections only?
I'm a touch confused, so please correct me where I'm wrong. You've got port 1025 on Machine A connected to port 25 on the VPS and now you're trying to connect port 1025 on Machine B to port 25 on the VPS as well? If this is accurate, the problem is that port 25 on the VPS can only be forwarded to one machine at a time, so if the connection between A and the VPS is still active, you won't be able to connect B to the same port.
I've got MachineA:1025 connected via SSH tunnel to VPS:25
Now I'm trying to connect from MachineB to MachineA:1025... which in theory should forward me to VPS:25
But it's not letting me connect.
When trying to telnet to 1025 I get... could not open connection to the host on port 1025, connection failed
MachineA and MachineB are in the same network... 192.168.1.x
I've got MachineA:1025 connected via SSH tunnel to VPS:25
Now I'm trying to connect from MachineB to MachineA:1025... which in theory should forward me to VPS:25
I've got no experience with this, but if this article is right, it should be do-able. What command are you using to try and establish the SSH tunnel from MachineB to MachineA?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.