Hello,
Im trying to establish secure communication between a PLC (P1AM) and a Google Cloud Run service using the Teltonika RUT241 as a bridge. The goal is to configure the RUT241 to accept HTTP requests from the PLC and forward them securely via HTTPS to the Cloud Run service.
Test 1: Direct HTTPS Request Using Curl on the RUT241
To verify that the RUT241 can successfully forward HTTPS requests to the Google Cloud Run service.
Process:
A direct HTTPS request was made from the RUT241’s CLI using the curl
command to the Google Cloud Run service at https://vi72grtlyq-uc.a.run.app
.
No specific RUT241 configuration than was done.
The request was successfully received by the Cloud Run service, and the expected response was logged.
Conclusion:
The RUT241 is capable of forwarding HTTPS requests correctly when initiated directly from the device.
Test 2:
HTTP Request from PLC to an External Server
To confirm that the PLC is correctly sending HTTP requests.
Process:
The PLC was programmed to send an HTTP POST request to httpbin.org/post
with a JSON payload.
The server returned a 200 OK
status, indicating that the request was successfully received and processed.
Conclusion:
The PLC is capable of correctly sending HTTP requests, as verified by the successful response from the external server.
Stunnel Configuration and Issues
Current Stunnel Configuration on RUT241:
- Operating Mode: Client
- Listen IP: 0.0.0.0
- Listen Port: 80
- Connect IP: ser-eth-vi7gvg2lyq-uc.a.run.app:443
- TLS Cipher: None
Certificates:
CAfile: (No CA file)
Cert: (No Cert)
Key: (No key)
Issue Encountered:
When the PLC sends an HTTP request, the RUT241 should forward this via Stunnel to the Cloud Run service. However, the response received by the PLC seems to be compressed or encoded, and the expected response from the Cloud Run service is not being logged or processed correctly.
This suggests that the Stunnel setup may not be correctly forwarding the request or handling the response as expected.
Help :
I need assistance in properly configuring Stunnel on the RUT241 to ensure that HTTP requests from the PLC are securely forwarded to the Google Cloud Run service and that responses are correctly handled. :
Is the RUT241 and stunnel the correct hardware and software to do this thing?
Are the current certificates (fabric certificates) and Stunnel settings correct for this use case?
Could there be any additional configurations or debugging steps that we should perform on the RUT241 to resolve this issue?
Any guidance on configuring Stunnel for this specific scenario would be greatly appreciated. Thank you!