So there are two servers:

  • Main server, lets call it M1. It's the server every user will need to access somehow.
  • Proxy server, lets call it P1. It's the server to help some users connect to M1 through it.

M1 and P1 servers have fast (Lan) connection between themselves, so you can access M1 from P1 through internal IP. let say this: Some users that are geographically closer to M1 can connect directly to M1. Users that are geographically very far away can also connect to M1, but it suffers heavy latency.

And idea is to let those users connect to P1, which is closer to those users and then P1 would tunnel connection via fast line to M1, theoretically reducing latency.

Let say M1 host is somemainhost.com And P1 is someproxyhost.com. When accessing somemainhost.com, you access Odoo server. It is on reverse proxy too, so you don't need to enter somemainhost.com:8069.

I read this guide (http://www.cyberciti.biz/faq/set-up-ssh-tunneling-on-a-linux-unix-bsd-server-to-bypass-nat/)

And then tried this (From P1 server):

ssh -L 9090: myuser@somemainhost.com

And after entering this, it asked me to enter password. I did and I just logged in to M1 and nothing happened. I tried connecting to M1 with browser, using this:


But just got connection refused. So I guess I didn't set up any ssh tunneling?

Now how can I make such tunneling connection, so that when user access someproxyhost.com, proxy server tunnels connection to somemainhost.com and user actually connects to M1 through P1?


Here is an example how it should look like:

enter image description here

  • Firstly, you are doing ssh -L wrong. It won't show anything, it's not supposed to. Someproxyhost.com:9090 won't work, it's not supposed to. SSH port forwarding operates on localhost. You would need to do ssh localhost:9090 to achieve anything useful. – qasdfdsaq Aug 13 '15 at 13:37
  • Also, you should probably use Mosh. Mosh is specifically designed as an SSH alternative that works well over high latency and/or unreliable connections: mosh.mit.edu – qasdfdsaq Aug 13 '15 at 13:38
  • @qasdfdsaq But I need to connect to that proxy server (P1) somewhat normally as anyone would connect, via that server's external IP. Then that server would pass connection as like that user actually connected to that M1 server. Is it not possible to achieve this? Also I tried mosh and I could connect to other server like with ssh but don't see a way to make such connection I need. Is there a way I don't see? – Andrius Aug 18 '15 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.