I have a virtual machine that contains a service that listens on port 15672. The server that the VM is on is set up to use iptables to forward requests to the virtual machines. Here are the relevant lines that forwards requests to the VM:
-A PREROUTING -d <server-ip> -i ens3 -p tcp -m tcp --dport 443 -j DNAT --to-destination <local-vm-ip>
-A PREROUTING -d <server-ip> -i ens3 -p tcp -m tcp --dport 80 -j DNAT --to-destination <local-vm-ip>
-A PREROUTING -d <server-ip> -i ens3 -p tcp -m tcp --dport 15672 -j DNAT --to-destination <local-vm-ip>
-A PREROUTING -d <server-ip> -i ens3 -p tcp -m tcp --dport 22 -j DNAT --to-destination <local-vm-ip>
-A POSTROUTING -s <local-vm-ip> -o ens3 -j SNAT --to-source <server-ip>
Web requests are currently working for ports 443 and 80, but I'm having trouble with 15672. When I run netstat -tlnp | grep 15672
on the VM, I get:
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 276/beam.smp
However, whenever I try to access http://<server-ip>:15672
I just get a timeout after a bit.
I wasn't the one who wrote these iptables rules, but I've been trying to parse them and figure out what they do. Is there anything that I'm missing to be able to get 15672 to respond?