Discussion:
Connect JMS over SSH Tunnel
Copernico
2015-05-21 17:48:50 UTC
Permalink
Hi,

I need to send some messages to an openmq queue on a remote host. The
problem is
that host is behind a firewall and the only way to connect is over ssh. That
machine has installed
a MySQL server. I can connect it with putty doing a PortForwarding to my
localmachine, so i can connect
to remote mysql server on localhost.

There is a way to do that with camel? i mean create a ssh tunnel to conect
to openmq queue?

Sorry for my english,

Nicolas






--
View this message in context: http://camel.465427.n5.nabble.com/Connect-JMS-over-SSH-Tunnel-tp5767394.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Copernico
2015-05-21 17:58:48 UTC
Permalink
Hi,

I need to send some messages to an openmq queue on a remote host.
The problem is that the host is behind a firewall and the only way to
connect is over ssh. That machine has a MySQL server installed. I can
connect with it with putty doing a Port Forwarding to my local machine, so i
can connect to remote mysql server as if it was installed on localhost.

There is a way to do with camel? i mean, create a ssh tunnel to connect to
the openmq queue?

I forgot to say that the application in which i am working is a Desktop App



--
View this message in context: http://camel.465427.n5.nabble.com/Connect-JMS-over-SSH-Tunnel-tp5767395.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Doug Douglass
2015-05-21 18:08:21 UTC
Permalink
I'd setup the ssh tunnel outside of Camel, then have your Camel JMS URI use
the localhost/port that's being forwarded. That way Camel has no knowledge
of the port forwarding.

Perhaps try something like sshuttle <https://github.com/apenwarr/sshuttle> to
provide a simple VPN of sorts via ssh. I've used this between unix hosts
with good results.

Or, look into a real vpn solution if it's a critical app.

HTH,
Doug
Post by Copernico
Hi,
I need to send some messages to an openmq queue on a remote host.
The problem is that the host is behind a firewall and the only way to
connect is over ssh. That machine has a MySQL server installed. I can
connect with it with putty doing a Port Forwarding to my local machine, so i
can connect to remote mysql server as if it was installed on localhost.
There is a way to do with camel? i mean, create a ssh tunnel to connect to
the openmq queue?
I forgot to say that the application in which i am working is a Desktop App
--
http://camel.465427.n5.nabble.com/Connect-JMS-over-SSH-Tunnel-tp5767395.html
Sent from the Camel - Users mailing list archive at Nabble.com.
François LIOT
2015-05-21 18:30:54 UTC
Permalink
Hi,

Apache Mina is a full implementation of SSH.

Somebody already document the same issue than yours :
http://stackoverflow.com/questions/8279426/how-tunnel-all-rmi-traffic-over-ssh

I did use Mina as SSHd server, but I didn't test it for port forwarding,
Nevertheless I believe it's the most elegant full java solution.

Regards,

François Liot



________________________________________
From: Doug Douglass <***@gmail.com>
Sent: Thursday, May 21, 2015 8:08 PM
To: ***@camel.apache.org
Subject: Re: Connect JMS over SSH Tunnel

I'd setup the ssh tunnel outside of Camel, then have your Camel JMS URI use
the localhost/port that's being forwarded. That way Camel has no knowledge
of the port forwarding.

Perhaps try something like sshuttle <https://github.com/apenwarr/sshuttle> to
provide a simple VPN of sorts via ssh. I've used this between unix hosts
with good results.

Or, look into a real vpn solution if it's a critical app.

HTH,
Doug
Post by Copernico
Hi,
I need to send some messages to an openmq queue on a remote host.
The problem is that the host is behind a firewall and the only way to
connect is over ssh. That machine has a MySQL server installed. I can
connect with it with putty doing a Port Forwarding to my local machine, so
i
can connect to remote mysql server as if it was installed on localhost.
There is a way to do with camel? i mean, create a ssh tunnel to connect to
the openmq queue?
I forgot to say that the application in which i am working is a Desktop App
--
http://camel.465427.n5.nabble.com/Connect-JMS-over-SSH-Tunnel-tp5767395.html
Sent from the Camel - Users mailing list archiv
Doug Douglass
2015-05-21 18:43:24 UTC
Permalink
François makes a good point since your scenario is a desktop app.
Post by François LIOT
Hi,
Apache Mina is a full implementation of SSH.
http://stackoverflow.com/questions/8279426/how-tunnel-all-rmi-traffic-over-ssh
I did use Mina as SSHd server, but I didn't test it for port forwarding,
Nevertheless I believe it's the most elegant full java solution.
Regards,
François Liot
​
________________________________________
Sent: Thursday, May 21, 2015 8:08 PM
Subject: Re: Connect JMS over SSH Tunnel
I'd setup the ssh tunnel outside of Camel, then have your Camel JMS URI use
the localhost/port that's being forwarded. That way Camel has no knowledge
of the port forwarding.
Perhaps try something like sshuttle <https://github.com/apenwarr/sshuttle> to
provide a simple VPN of sorts via ssh. I've used this between unix hosts
with good results.
Or, look into a real vpn solution if it's a critical app.
HTH,
Doug
Post by Copernico
Hi,
I need to send some messages to an openmq queue on a remote host.
The problem is that the host is behind a firewall and the only way to
connect is over ssh. That machine has a MySQL server installed. I can
connect with it with putty doing a Port Forwarding to my local machine,
so
Post by Copernico
i
can connect to remote mysql server as if it was installed on localhost.
There is a way to do with camel? i mean, create a ssh tunnel to connect
to
Post by Copernico
the openmq queue?
I forgot to say that the application in which i am working is a Desktop
App
Post by Copernico
--
http://camel.465427.n5.nabble.com/Connect-JMS-over-SSH-Tunnel-tp5767395.html
Post by Copernico
Sent from the Camel - Users mailing list archive at Nabble.com.
Loading...