简体   繁体   中英

How to connect to Corba server via ssh tunnel using Omniorb on Python

I've got some Python code that uses Omniorb to connect to a corba server, and it all works fine.

Now I'd like to be able to connect to a server behind a firewall by creating an ssh tunnel, but it's not working.

As far as I can tell from wireshark trace, the server is redirecting me to its IP address - which is of course a local network address I cannot reach.

It there any way to handle this and tell the server not to redirect my client? I have no ability to modify the server nor change its IP, etc. Or can I modify my client to fake it's connection so the server accepts it?

The problem would become much simpler if you used a SSH Socks Proxy instead of a SSH Tunnel

ssh -D 8888 <user>@<machine>

Now you have a proxy running at socks5://127.0.0.1:8888 . Next is how to use it with your code. I have no experience with CORBA, so I can only provide options to explore

  1. Configure proxy in Omniorb if the connection supports it
  2. If Omniorb internally uses urllib or something then you can use something like this
  3. If that option also doesn't work then you can force your python script through socksify
  4. If that also doesn't work and you are on Mac, you can try forcing socks proxy at system level

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM