Location database update error (country code)

I have location block on all my firewalls.
Found I can’t connect to any today due to location database update this AM.
My ISP is Manx Telecom and the address range is 149.22.96.0 - 149.22.127.255.
Linux whois command shows the country code is IM (Isle of Man), which is what my firewall rules are expecting.

IPFire now thinks the address is a USA one:
https://location.ipfire.org/lookup/149.22.104.0

Any ideas where location database rebuild has gone wrong?
Needs sorting, as a real inconvenience.
Thanks

Looks like a bug! Please add a bug report:

Information to add a bug report in IPFire Bugzilla:

Hi,

(sorry, meant to sent this in earlier my mail :expressionless: )

Linux whois command shows the country code is IM (Isle of Man), which is what my firewall rules are expecting.

I cannot reproduce this. It rather looks like being a part of a legacy prefix administered by Cogent, having “GB” set as a country code:

$ whois 149.22.96.0
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object

refer:        whois.arin.net

inetnum:      149.0.0.0 - 149.255.255.255
organisation: Administered by ARIN
status:       LEGACY

whois:        whois.arin.net

changed:      1993-05
source:       IANA

# whois.arin.net

NetRange:       149.22.0.0 - 149.22.255.255
CIDR:           149.22.0.0/16
NetName:        COGENT-149-22-16
NetHandle:      NET-149-22-0-0-1
Parent:         NET149 (NET-149-0-0-0-0)
NetType:        Direct Allocation
OriginAS:       AS174
Organization:   PSINet, Inc. (PSI-1)
RegDate:        1992-01-28
Updated:        2016-02-08
Ref:            https://rdap.arin.net/registry/ip/149.22.0.0


OrgName:        PSINet, Inc.
OrgId:          PSI-1
Address:        2450 N Street NW
City:           Washington
StateProv:      DC
PostalCode:     20037
Country:        US
RegDate:        1992-01-28
Updated:        2015-06-04
Ref:            https://rdap.arin.net/registry/entity/PSI-1

ReferralServer:  rwhois://rwhois.cogentco.com:4321

OrgNOCHandle: ZC108-ARIN
OrgNOCName:   Cogent Communications
OrgNOCPhone:  +1-877-875-4311 
OrgNOCEmail:  noc@cogentco.com
OrgNOCRef:    https://rdap.arin.net/registry/entity/ZC108-ARIN

OrgTechHandle: IPALL-ARIN
OrgTechName:   IP Allocation
OrgTechPhone:  +1-877-875-4311 
OrgTechEmail:  ipalloc@cogentco.com
OrgTechRef:    https://rdap.arin.net/registry/entity/IPALL-ARIN

OrgAbuseHandle: COGEN-ARIN
OrgAbuseName:   Cogent Abuse
OrgAbusePhone:  +1-877-875-4311 
OrgAbuseEmail:  abuse@cogentco.com
OrgAbuseRef:    https://rdap.arin.net/registry/entity/COGEN-ARIN

# rwhois.cogentco.com

%rwhois V-1.5:0010b0:00 rwhois.cogentco.com (CGNT rwhoisd 0.0.0)
network:ID:NET4-9516600013
network:Network-Name:NET4-9516600013
network:IP-Network:149.22.96.0/19
network:Org-Name:Manx Telecom Limited
network:Street-Address:Isle of Man Business Park, Braddan F4 Cost Accounts & Procurement
network:City:Isle of Man
network:Country:GB              <<<<<
network:Postal-Code:IM99 1HX
network:Tech-Contact:ZC108-ARIN
network:Updated:2021-09-24 14:56:04
%ok

ARIN does not make their full database public, hence we are missing some country information for suballocations such as this one.
We can manually override this - I would leave “GB” as a country code then -, but that unfortunately does not scale.

I cannot tell what changed here. Perhaps your ISP moved you to a different IP space, or someone cleaned up the ARIN database.

Thanks, and best regards,
Peter Müller

Looks like my ISP messed up, as addresses dished out now back to expected ranges.

2 Likes

Hi,

unfortunately, I cannot confirm this - yesterdays location database still (or again?) shows US for them:

[root@maverick ~]# location version
Fri, 22 Oct 2021 05:55:34 GMT
[root@maverick ~]# location lookup 149.22.96.0
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd

This is odd. I will later investigate if/when this allocation was flapping.

Thanks, and best regards,
Peter Müller

Hi,

this does not seem to be the case. Every location database generated October 2021 so far returned US for 149.22.96.0/19 (sorry for the lengthy output):

[root@maverick temp-libloc-manx-telecom-cc-alloc-flapping]# ls -lah
total 1.1G
drwxr-xr-x 2 root root 4.0K Oct 23 09:33 .
drwxr-xr-x 6 root root 4.0K Oct 23 09:28 ..
-rw-r--r-- 1 root root  49M Oct  1 07:51 location-2021-10-01.db
-rw-r--r-- 1 root root  49M Oct  2 07:56 location-2021-10-02.db
-rw-r--r-- 1 root root  49M Oct  3 07:47 location-2021-10-03.db
-rw-r--r-- 1 root root  49M Oct  4 07:53 location-2021-10-04.db
-rw-r--r-- 1 root root  49M Oct  5 07:22 location-2021-10-05.db
-rw-r--r-- 1 root root  49M Oct  6 07:59 location-2021-10-06.db
-rw-r--r-- 1 root root  49M Oct  7 08:00 location-2021-10-07.db
-rw-r--r-- 1 root root  49M Oct  8 07:50 location-2021-10-08.db
-rw-r--r-- 1 root root  49M Oct  9 07:47 location-2021-10-09.db
-rw-r--r-- 1 root root  49M Oct 10 08:02 location-2021-10-10.db
-rw-r--r-- 1 root root  49M Oct 11 07:36 location-2021-10-11.db
-rw-r--r-- 1 root root  49M Oct 12 07:58 location-2021-10-12.db
-rw-r--r-- 1 root root  49M Oct 13 08:04 location-2021-10-13.db
-rw-r--r-- 1 root root  49M Oct 14 07:58 location-2021-10-14.db
-rw-r--r-- 1 root root  49M Oct 15 07:44 location-2021-10-15.db
-rw-r--r-- 1 root root  49M Oct 16 07:50 location-2021-10-16.db
-rw-r--r-- 1 root root  49M Oct 17 08:06 location-2021-10-17.db
-rw-r--r-- 1 root root  49M Oct 18 07:44 location-2021-10-18.db
-rw-r--r-- 1 root root  49M Oct 19 07:48 location-2021-10-19.db
-rw-r--r-- 1 root root  49M Oct 21 08:03 location-2021-10-21.db
-rw-r--r-- 1 root root  50M Oct 22 07:58 location-2021-10-22.db
-rw-r--r-- 1 root root  50M Oct 23 07:53 location-2021-10-23.db
[root@maverick temp-libloc-manx-telecom-cc-alloc-flapping]# for i in $( ls ); do location --database $i version; location --database $i lookup 149.22.96.0; done;
Fri, 01 Oct 2021 05:49:09 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sat, 02 Oct 2021 05:53:42 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sun, 03 Oct 2021 05:44:31 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Mon, 04 Oct 2021 05:50:42 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Tue, 05 Oct 2021 05:20:22 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Wed, 06 Oct 2021 05:57:08 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Thu, 07 Oct 2021 05:58:22 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Fri, 08 Oct 2021 05:47:39 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sat, 09 Oct 2021 05:44:38 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sun, 10 Oct 2021 05:59:26 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Mon, 11 Oct 2021 05:34:07 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Tue, 12 Oct 2021 05:55:48 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Wed, 13 Oct 2021 06:01:59 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Thu, 14 Oct 2021 05:55:43 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Fri, 15 Oct 2021 05:42:00 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sat, 16 Oct 2021 05:48:05 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sun, 17 Oct 2021 06:03:10 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Mon, 18 Oct 2021 05:42:11 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Tue, 19 Oct 2021 05:45:19 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Thu, 21 Oct 2021 06:00:35 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Fri, 22 Oct 2021 05:55:34 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd
Sat, 23 Oct 2021 05:50:07 GMT
149.22.96.0:
  Network                 : 149.22.96.0/19
  Country                 : United States of America
  Autonomous System       : AS13122 - Manx Telecom Trading Ltd

Do you happen to have precise timestamps when the country code was something different than US?

EDIT: Nevermind, this patch now pins the location of 149.22.96.0/19 to GB.

Thanks, and best regards,
Peter Müller

2 Likes

I think you misinterpreted my last message.
I meant that I have not received addresses in the 149.22.96.0 - 149.22.127.255 range.
My firewall is configured to get a new Red IP daily. So far, so good (no USA range address received).
Thanks