FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
529 views 0 comments
by anonymous
Hi,

I'm currently working on a software that configures the RUT240 automatically. Part of the configuration are custom firewall rules. On the WebUI I found that it is necessary to restart the firewall after making changes to the 'firewall.user'-file. I tried '/etc/init.d/firewall restart' which worked on the CLI in the WebUI. However it doesn't work when I try to send the same command via my program. Apart from an empty line, I do not get any response from the console. (The code works as expected with other commands.)

Am I missing something? Is the command even correct?

Thanks in advance!

1 Answer

0 votes
by anonymous

Hello,

  

Thank you for reaching out!

Could you share a little more information about your script? Perhaps send the entire script via a private message?

I've tested it by creating a script:

#!/bin/sh

/etc/init.d/firewall restart

And the firewall restarted as expected, with all the logs in the console, and the logread output contained:

Mon Jan  9 08:11:40 2023 kern.notice Firewall was restarted.

Mon Jan  9 08:11:40 2023 kern.notice ip_blockd re-inserting iptables and filling out ipsets

It would also be great if you could attach a troubleshoot file after replicating the issue. Troubleshoot file can be generated by navigating to System → Administration → Troubleshoot. It can be sent to me via a private message or attached to the original post. It will only be visible to Teltonika moderators.

  

Best regards,
DaumantasG