Dear Support,
I have a CP-2000 connected to a VPN network, I am trying to send a UDP/TCP Packet from a client to the PLC (UDP/TCP Server) but the connection is refused in the TCP server case and none in the UDP case.
when I tried the same code on the plc in a normal local network It's work properly.
please note that I also tried to send UDP/TCP Packet between other clients (2 PCs) on the same VPN network, and it's working successfully.
how far this is applicable on foxtrot2 via a VPN network?
Answers 5
To resolve this issue we need more information. How is the CP-2000 connected to VPN? CP-2000 has possibility to natively connect to Wireguard VNP. Wireguard connection can be set up from a configuration web under Services > VPN. If the VPN is realised by some other way, we would need to know what is the network configuration and how is CP-2000 interfaces set up.
yes, I connect cp-2000 as a client to Wireguard VNP Server through its features in the configuration web under Services > VPN.
and the connection is successful and I can ping.
Are all ports on both ethernet channels can receive from VPN?
Do I have to specify the VPN IP of the CP-200 somewhere in the mosaic code to make the connection work?
Just to let you know, setting variables through TECO API works properly, only my problem with TCP/UDP connection
We are from the Teco middle east office, do you prefer to continue the discussion here or through emails with Lubos Urban?
If you prefer using emails, you can reach me at bydzovsky@tecomat.cz. I'm currently on vacation, so my replies on both email and support site may take longer than usual.
Wireguard VPN network works only between clients and server; you have to use VPN IP addresses to communicate among clients. Connection between PLC and server is established through ethernet channel that has the same network subnet as server, or gateway if the server is outside local network.
If you need to use UNI channel, you can't use channels defined using I/O configurator, because they are bind to specific ethernet channel. You have to use function OpenUniSocket, where you specify your IP address as 0.0.0.0 (for all channels and VPN, choice will be made by destination address) or use PLC's VPN address so the UNI channel will be dedicated only to VPN.
This question is solved.