Accessing service on host machine from container

Hello everyone. I have an app that consists of 4 linked containers and I need to access a service that's on the host from one of them.
However, no matter what I try I always get "connection refused".
Here's what I've tried so far:
– Flush iptables on my host machine and add an entry to explicitly allow inbound connections to the host machine from the docker network adapter (or something like that, I found it in a Stack overflow answer
– Make the service in my host computer listen on
– Use "host" networking mode: This just broke the links between my containers

I'm really out of ideas here. I know this service should be running on a container too, but I'm on a tight schedule and I can't do the migration right now.

submitted by /u/RubusDragon
[link] [comments]
Source: Reddit