Hello,
I want to send post to the server on 127.0.0.1:3000 as sending the message that the modem was restarted and when restarted, I used a custom script, because I need to send post only via the local http network, and I did not find another method how to do this, only with sms and email in the events reporting. I use curl in the script, and curl writing error: (curl: (7) Failed to connect to 127.0.0.1 port 3000 after 1 ms: Error)
My script:
#!/bin/sh
curl -X POST http://127.0.0.1:3000
-H “Content-Type: application/json”
-d ‘{
“modemName”: "’$(uci get system.@system[0].hostname)‘",
“timestamp”: "’$(date -Iseconds)‘"
}’
exit 0
Perhaps curl`s error was created by the turned off remote http access, in the access control,
But, i can not turn on remote http access because my certificates and server keys are invalid as I illustrated in the screenshot.
Does anybody have a hint to solving this problem?
If I need more context, please write that i need extend.
Best regards
Akhmedi
Hello,
To clarify a couple of things to better troubleshoot this:
- Could you please confirm whether the server certificate and key are selected in the relevant fields under System → Administration → Access Control HTTPS settings?
If they’re missing, you can generate them on the System → Administration → Certificates page. Moreover, instructions for creating a server certificate and key are provided here, after which they should appear in the selection dropdown, allowing you to enable remote HTTPS access if needed. More useful information on certificates can be found here:
- Additionally, can you check if your local server process is actually running and listening on port 3000?
You can verify this by connecting via SSH to your device and executing
netstat -tuln | grep 3000
If nothing shows up, it means there’s no service actively listening on that port, which would explain the curl: (7)
connection error you’re seeing.
Let me know how it goes.
Best regards,
Thank you for your answer,
I set a new ca and server key, but anyway, it does not work it writes like in the past, and after reloading the page, keys and certificates change to default.
About netstat, I checked the command through SSH, and it sends me no messages.
Best regards.
Akhmedi.
Hello,
Thank you for your update.
Since the RUT230 is an EOL (end-of-life) device, and considering the behavior you’re experiencing, where certificates and keys revert to default after a reload, there might be an issue with the current firmware, possibly due to misconfigurations or internal conflicts.
In this case, I recommend flashing the latest available firmware (7.03.4) via the bootloader menu for a clean installation. Instructions for this process can be found here:
I hope this helps.
Best regards,