Can you provide a network architecture, so I can better understand your approach here.
Also, I would recommend, as a best practice with Codesys, that you place the devices under their appropriate ethernet adapters:
The EPIC rack should always be configured to lo(localhost/127.0.0.1), and any external devices under their appropriate adapter(eth0,eth1,wlan0,tun0…).
Make sure when configuring these you use the ellipsis (. . . ) and select the appropriate adapter.
I wanted to add in what has been said before, that THIS IS NOT THE BEST PRACTICE METHOD FOR CONNECTIVITY. You are opening a lot of security risks by doing this. I would recommend using a VPN, and with the groov EPIC and RIO, an OpenVPN Client is already onboard.
OpenVPN now has a very slick OpenVPN Cloud Solution