With the last update i have to reset every night the firewall state table. I have an dynamic ip. Without the state reset my sip trunks on my pbx and Audiocodes SBC don't get ready. How can i do the state reset automatically? I renew every night my ip with Cron, but i have to reset the state table every morning manually. Without this reset internet surfing is ok, but i think there ist an problem with udp.
Gesendet von iPad mit Tapatalk Pro
Well, we use a "free" product. The developers can only fix this if you figure out how to reproduce the issues. (or you can to inspect other reported bugs if someone else already did).
Log into your OPNSense box via SSH. Press 8 to start the shell.
Type this:
vi rstate.sh
And then paste this code:
#!/bin/sh
service firewall stop
rm -rf /var/db/stateful/pf*
service firewall start
Write and save changes by pressing : and then type wq and press enter.
Make the script executable by typing:
chmod +x rstate.sh
Once completed add cron job by typing
crontab -e
Add a new line that looks like this and set the time when you want the script to kick in. For this example ill use 1:30AM.
30 1 * * * /path/to/your/script/rstates.sh
Thats it. Simple.