rpthms / nft-geo-filter

Allow/deny traffic in nftables using country specific IP blocks
MIT License
98 stars 24 forks source link

Stop auto flush previous rules when we are adding new rules #9

Closed hemschaudhari closed 3 years ago

hemschaudhari commented 3 years ago

I am really appreciating your work for nft-geo-filter. good job.

Can you please help me out?

When we are trying to add new nft rule then all previous added rules are flushed automatically. So I want to know how can we stop it.

Can we manage it with Database or with text file? like if we can store data somewhere.

rpthms commented 3 years ago

By adding a new nft rule, do you mean you're running nft-geo-filter again? Or do you mean you are adding your own custom rules to the nft-geo-filter table?

hemschaudhari commented 3 years ago

Thanks for your reply.

No, I am not adding any my custom rules.

Yes, for add new rule I am again running nft-geo-filter.

I.e. : I have add country US for blocking IP's then after if I need to add another country like CA then first added rules are flushed automatically.

rpthms commented 3 years ago

Yeah, unfortunately that doesn't work. You can easily specify all the countries that you want to block at the same time. Reading the current contents of any existing table just adds more complexity for not a lot of gain. I don't think I'll be adding that functionality any time soon.

rpthms commented 3 years ago

Closing this issue. Please open another one if you come across any problems.