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