If I define a range in an address-group and try to expand it later, I receive an error during the commit. The final configuration has two overlapping ranges but the "ipset" doesn't include the expanded addresses.
vyos@vyos# set fire group address-group foo add 10.1.0.2-10.1.0.3 [edit] vyos@vyos# commit [edit] vyos@vyos# set fire group address-group foo add 10.1.0.2-10.1.0.5 [edit] vyos@vyos# commit [ firewall group address-group foo ] ipset v6.38: Element cannot be added to the set: it's already added Error: call to ipset failed [256] [edit] vyos@vyos# show fire group { address-group foo { address 10.1.0.2-10.1.0.3 address 10.1.0.2-10.1.0.5 } } [edit] vyos@vyos# sudo ipset list foo Name: foo Type: hash:ip Revision: 4 Header: family inet hashsize 1024 maxelem 65536 Size in memory: 184 References: 0 Number of entries: 2 Members: 10.1.0.2 10.1.0.3
If I edit manually the file /config/config.boot and load it, the show command returns the right modification and "ipset" is properly updated.
vyos@vyos# head -9 /config/config.boot firewall { all-ping enable broadcast-ping disable config-trap disable group { address-group foo { address 10.1.0.2-10.1.0.3 } } [edit] vyos@vyos# sudo vi /config/config.boot [edit] vyos@vyos# head -9 /config/config.boot firewall { all-ping enable broadcast-ping disable config-trap disable group { address-group foo { address 10.1.0.2-10.1.0.5 } } [edit] vyos@vyos# load /config/config.boot Loading configuration from '/config/config.boot' Load complete. Use 'commit' to make changes effective. [edit] vyos@vyos# show fire firewall { group { address-group foo { - address 10.1.0.2-10.1.0.3 + address 10.1.0.2-10.1.0.5 } } } [edit] vyos@vyos# commit [edit] vyos@vyos# sudo ipset list foo Name: foo Type: hash:ip Revision: 4 Header: family inet hashsize 1024 maxelem 65536 Size in memory: 280 References: 0 Number of entries: 4 Members: 10.1.0.2 10.1.0.4 10.1.0.5 10.1.0.3 [edit]
vyos@vyos:~$ show vers
Version: VyOS 1.3-rolling-202011240217
Release Train: equuleus
Built by: [email protected]
Built on: Tue 24 Nov 2020 02:17 UTC
Build UUID: 123b3e83-6744-4c7f-aab3-8701e8b87a25
Build Commit ID: 5df15815874f4c
Architecture: x86_64
Boot via: installed image
System type: KVM guest
Hardware vendor: QEMU
Hardware model: Standard PC (i440FX + PIIX, 1996)
Hardware S/N: Unknown
Hardware UUID: Unknown
Copyright: VyOS maintainers and contributors