# Ignition Gateway with docker connect to Kepware

**URL:** <https://forum.inductiveautomation.com/t/ignition-gateway-with-docker-connect-to-kepware/53090>\
**Category:** Ignition\
**Created:** [November 15, 2021, 6:49pm UTC](https://forum.inductiveautomation.com/t/ignition-gateway-with-docker-connect-to-kepware/53090 "2021-11-15T18:49:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Vana](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Matthew\_Vana](https://forum.inductiveautomation.com/u/Matthew_Vana)\
**Post date:** [November 15, 2021, 6:49pm UTC](https://forum.inductiveautomation.com/t/ignition-gateway-with-docker-connect-to-kepware/53090/1 "2021-11-15T18:49:30Z")

</div>

Hello Everyone,

I am new to Ignition Dockers. I have setup two Ignition Gateways within a docker container. I have tried connecting the Ignition Gateways via OPC-UA to Kepware on my laptop in order to setup a testing environment. However, I am not able to connect as I receive the below error.

UaException: status=Bad\_ConnectionRejected, message=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /192.168.1.95:49320

I have tried changing my OPC UA server settings and the bind address to 0.0.0.0. I have the trust certificates in both Kepware and the the Ignition Gateway enabled. I opened the Windows firewall port 49320 on my laptop for Kepware.

How can I connect to Kepware via OPC UA using a Ignition Gateway from a docker container?

Thank you for your help everyone,

 ![Error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/19b92478cc6813fa1b7cde6f8b234c0758c780e5.png)  
 ![Ignition Docker Container](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/9/d9a33874aa84488d53155e6ea1768224c5406572.png)  
 ![Ignition OPC Server](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/1/216e796845a3301512884438caa0a50c2ebc5791.png)

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [November 15, 2021, 7:00pm UTC](https://forum.inductiveautomation.com/t/ignition-gateway-with-docker-connect-to-kepware/53090/2 "2021-11-15T19:00:39Z")

</div>

You shouldn’t need to adjust the bind address for the OPC-UA Server within Ignition to make the outbound connections to KEPServerEx. For the endpoint URL, I’d use `host.docker.internal` (more info in the Docker Docs [here](https://docs.docker.com/desktop/windows/networking/#use-cases-and-workarounds), specifically the section: _I want to connect from a container to a service on the host_) to resolve to your host system. It looks like `192.168.1.95` is actually the IP address of your Ignition Gateway container, not the IP address of your host system.

---

<div class="post-metadata">

**Author:** ![Matthew\_Vana](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Matthew\_Vana](https://forum.inductiveautomation.com/u/Matthew_Vana)\
**Post date:** [November 15, 2021, 7:14pm UTC](https://forum.inductiveautomation.com/t/ignition-gateway-with-docker-connect-to-kepware/53090/3 "2021-11-15T19:14:55Z")

</div>

Thank you Kevin,

This did the trick and this was very helpful info!

Regards,  
Matthew
