Score:0

Cannot tunnel AMQP traffic through SSH tunnel

pl flag

I've been trying for hours and need some new input.

My set-up:

  • Ubuntu VM (UVM) running a docker container that forwards RabbitMQ messages to an external machine
  • Local Laptop (LVM) with Windows 10 running a RabbitMQ instance in docker on port 5672.

What I am trying to do:

On my UVM I have set-up a test environment that communicates via RabbitMQ with different microservices. I get data into this test system that I need for further development. I now want to forward this data via RabbitMQ to a different external machine LVM. On LVM I am running another instance of RabbitMQ to pick up the forwarded data.

Both machines are within the same corporate network but due to firewall rules that are not changeable port 5672 (Standard AMQP port) is blocked.

My only hope is to create a reverse SSH tunnel and let all RabbitMQ traffic travel through there.

What I did:

From LVM I create a remote SSH port forwarding:

ssh -R 8888:localhost:5672 user@UVM

On UVM I configured the docker container forwarding data to send all traffic to port 8888 on UVM via RabbitMQ protocol. I have verified that this works by:

  • Hosting another RabbitMQ instance on UVM listening specifically on 8888. Connection can be established.
  • Using nc -l -p 8888, which outputs AMQP and some strangly formatted string

I have ensured that the SSH tunnel works between UVM and LVM by:

  • UVM: nc localhost 8888 < test.txt
  • LVM: nc -l -p 5672

The contents of the txt file are successfully transmitted.

Furthermore, I shut down the LVM RabbitMQ so I can nc -l -p 5672 and see if the AMQP traffic arrives, but it doesn't.

So to sum it up: I know the forwarding of data works properly and I know the tunnel is established correctly. But for reasons beyond me, the AMQP traffic is not relayed through the SSH tunnel.

Can anybody help with suggestion, please?

Best regards

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.