plc4x icon indicating copy to clipboard operation
plc4x copied to clipboard

[Bug]: ADS Driver doesn't seem to support connections via VPN

Open chrisdutz opened this issue 1 year ago • 3 comments

What happened?

When trying to connect to an ADS device via a VPN connection, the remote device seems to simply hang up.

Version

v0.13.0-SNAPSHOT

Programming Languages

  • [X] plc4j
  • [ ] plc4go
  • [ ] plc4c
  • [ ] plc4net

Protocols

  • [ ] AB-Ethernet
  • [X] ADS /AMS
  • [ ] BACnet/IP
  • [ ] CANopen
  • [ ] DeltaV
  • [ ] DF1
  • [ ] EtherNet/IP
  • [ ] Firmata
  • [ ] KNXnet/IP
  • [ ] Modbus
  • [ ] OPC-UA
  • [ ] S7

chrisdutz avatar Apr 12 '24 11:04 chrisdutz

Just as additional information relating to this, I've been working on a solution and testing it via an OpenVPN connection successfully, so some VPN connections work.

What I did have issues with was connecting via IP instead of hostname, don't know that's related - using IP caused the PLC to terminate the connection immediately, but using hostname worked fine. This was a bit puzzling, but I haven't used ADS enough to say is this as it should be.

IsmoLeszczynski avatar Apr 12 '24 11:04 IsmoLeszczynski

I recently setup my test-environment to be only reachable via VPN (Unify Gateway) ... so when using the built-in MAC VPN (L2TP over IPSec) and using an IP I was having the remote simply hang up ... if this is just a documentation problem, then I would be super happy ;-)

chrisdutz avatar Apr 12 '24 11:04 chrisdutz

I think the problem might be related to my device getting an IP address that is generally not reachable from the ADS device. So the device has the IP 192.168.23.20 and a netmask for 255.255.255.0 ... my local dialin computer has an address of 192.168.2.6 ... I would probably try to configure the VPN to give my client an IP on the remote network instead of using the VPN tunnel as default gateway.

chrisdutz avatar Apr 12 '24 13:04 chrisdutz