Connect to a server on the WAN side from the LAN side

We would like to connect from a Linux PC on the LAN side of a Cosy 141 to a server hosting an SQL database on the WAN side of the COSY (so on the factory local network.)

Do I need to change any settings to be able to do this? We are using TCP protocal on port 3306 for SQL.

Thanks,

@evs

This is possible, and you will need to change some advanced parameters to do this. There’s a couple different ways to approach this but I think the most efficient way will be to use the proxy parameters in the cosy 141.

We have another thread that addresses this specific question but with a PLC.

This post has step by step instructions on which parameters to change:



Parameter Name Updated Value Parameter Description
ProxyEnabled 1 This parameter actually enables the proxying/port forwarding of the
eWON.
ProxyProto1 2 (TCP) This paramter is the Protocol to be used in the port forwarding. The
Possible values are:
1 = UDP
2= TCP
3 = FTP
ProxyExtITF 0 This parameter tells the eWON to use the WAN interface as the proxying interface.
ProxySide1 1 (WAN to LAN) This parameter tells the eWON we will be forwarding for the external interface to the LAN.
ProxyPort1 3306 This parameter tells the eWON to watch for port 3306 traffic hitting the eWON WAN
ProxySrvPort1 3306 This parameter tells the eWON what port on the LAN device to trigger
ProxySrvIpAddr1 LAN IP of Your Device This is where you specify the LAN IP of your device.



Dear Joe, thanks for the quick answer. This looks good, but it also tells me that I can do this for only one device on the LAN side of the eWON o reach the database server, correct. What would I need to do if I have several PCs on the LAN side that need to reach the same database server?

I think if I need more than one PC to connect, I just need to set up more port forwardings, correct? I see about 10 parameters, so I assume we can use up to 10 to configure this way, right?

@evs

If you want to do multiple LAN devices then we’ll need to open up the WAN to LAN.

You can open WAN to LAN completely to make this work with several devices on the Cosy 141 LAN but it does put your eWON at a higher risk as you can now access the LAN devices from that WAN.

In that same thread, my first response addresses how to do this step by step:


1.

You’ll need to change the 3 parameters specified in this document:

2.

Reboot your eWON device

3.

Ensure that your LAN device’s default gateway is set to the eWON 's LAN IP

1 Like