-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
firewall: port forward with ipset #7486
Comments
Try |
Hi Jow! Run this conmand is not a problem on the router itself (or as I wrote, restarting the firewall). But what can I do over JSON-RPC API? |
You could issue a restart call using object "rc", method "init" and arguments |
I have now tested to flush the conntrack table with your command. The status not changed after that, I can connect from the deleted source IP. |
Ah, then its not conntrack related but due to the fact that the firewall does not repopulate ipsets on reload, which is intentional. You will need to issue an explicit service restart call |
As I wrote, when I add a new IP to the ipset, than I can reach the service from the newly added source IP but from the deleted IP too. So, I think the reload somehow partially repopulate the ipset... |
Yes, iirc only new entries from configuration are added but existing ones are not purged since the firewall program cannot determine whether those entries have been purged from config or whether they have been added by external programs. |
OK. Thanks for the explanation. Can I run |
According to the JSON RPC API documentation I can directly run |
Is there an existing issue for this?
screenshots or captures
No response
Actual behaviour
Hi!
I have defined an ipset with match type src_ip. I added some entries (source IP-s) to it. I defined a port forward for my local server using the previously defined ipset. I click Save & Apply and all works as expected.
When I add a new IP to the ipset and click Save & Apply, than I can reach the server from the new IP too. But, when I delete some IP-s (even just one) from the ipset and click Save & Apply, the server can be reached from the deleted source IPs until I manually restart the firewall. The main problem with this for me, that I need (automatically by a script) to modify this ipset over JSON RPC.
Expected behaviour
When I modify my ipset entries and click Save & Apply, than from the deleted source IPs should not reach the server.
Steps to reproduce
Additional Information
What browsers do you see the problem on?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: