To further follow up from Sai deff going in the right direction...
If you are running windows and connecting to ubuntu the broker needs to be accessible from the host machine. This would require either adjustment on the brokers server and or following the steps needed to obtain the correct route. This question has actually been asked before and seems like resolution steps are out there:
there is a medium article as well that faced the same:
In summary you could attempt the following: