Skip to content
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

Issue when running the script "The sets cannot be swapped..." #5

Open
Barichon21 opened this issue May 11, 2019 · 3 comments
Open

Issue when running the script "The sets cannot be swapped..." #5

Barichon21 opened this issue May 11, 2019 · 3 comments

Comments

@Barichon21
Copy link

ubnt: Blacklist update failed ('The sets cannot be swapped: their type does not match' whilst executing 'sudo ipset swap BLACKLIST_DROPv6-21813 BLACKLIST_DROPv6')

Any idea ?

@ParaVirtual
Copy link

ParaVirtual commented Oct 12, 2019

This just had me for a while as well. The issue exists because the very first blank incarnation of the set "BLACKLIST_DROPv6" is set as "family inet" as opposed to the correct "family inet6".

So ipset is being asked to swap an inet6 (IPv6) )list in the place of a inet (IPv4) list - and their type does not match.

To fix this we can manually we can use the following after running script and it failing:
sudo ipset destroy BLACKLIST_DROPv6
sudo ipset rename BLACKLIST_DROPv6-8323 BLACKLIST_DROPv6
(replacing -numbersequence as appropriate to your environment, they always change)

and then run

/config/scripts/post-config.d/update-blacklist.sh

again, and it will complete successfully.

I'm not sure of the best way to fix this from the get go, but it probably involves changing the instructions on editing config.boot and declaring network-group BLACKLIST_DROPv6 {}
I imagine there's some way to set it as IPv6 from the get go, just not sure how.

@rlem83
Copy link

rlem83 commented Jul 8, 2020

Although this is not maintained since it was created, I did identify the issue. In the readme it incorrectly tells you to create the wrong type of ipv6 Blocklist:
original:
network-group BLACKLIST_DROPv6

corrected:
ipv6-network-group BLACKLIST_DROPv6

This will fix your swapping issues.

@gunnahafta
Copy link

I also had the problem. Turned out if your not getting an IPv6 IP from your ISP then you cant create an IPv6 network address group.

Commented out the line "#swap $NEWGROUPv6 $NETGROUPv6" and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants