Peter Müller wrote:
This flag 'LOC_NETWORK_FLAG_BOGON' does not exist (yet). Would it be possible?
In theory, yes, but there is no need for another flag: If there is is no announcement for a network, it is considered to be a bogon.
What do you mean by "no announcement for a network" exactly? (kind of an alien term to me).
So, all you need to do is to check if loc_database_lookup() gives you an ASN for the queried IP address. :-)
So no ASN result, means a "Bogon"? A command like: location.py list-bogons --family ipv4
returns for example '1.236.0.0/18'. And 'location.py lookup ::ffff:1.236.0.0' returns an ASN: Network : 1.236.0.0/24 Country : Korea, Republic of Autonomous System : AS38396 - Paju office of Education Gyeonggi Province
Doesn't look like a "Bogon" to me.
And trying a 'nmap -sA -p80 1.236.0.0/24', gave me 11 hosts up. Seems no router cares about Bogons.
Thanks, and best regards, Peter Müller
Thanks for your answer.