IP2Location-PHP-Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from. (by chrislim2888)
country-ip-blocks
CIDR country-level IP data, straight from the Regional Internet Registries, updated hourly. This is a read-only mirror. (by herrbischoff)
IP2Location-PHP-Module | country-ip-blocks | |
---|---|---|
25 | 7 | |
188 | 630 | |
- | - | |
5.4 | 9.9 | |
2 months ago | 4 days ago | |
PHP | ||
MIT License | Creative Commons Zero v1.0 Universal |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
IP2Location-PHP-Module
Posts with mentions or reviews of IP2Location-PHP-Module.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-09-04.
-
What OpenVPN Configuration/server does not get picked up as a VPN?
Hey, I am sorry for the inconvenience faced, could you please send me your registered email via chat? I would have it looked into by my team. You can use the Washington and Seattle locations for Hulu and Amazon Prime US. It would be great if you could send me a screenshot of the device you are using (connected to the server location related to the US region you are trying to access and https://www.ip2location.com/ as an attachment while connected to the VPN (IP address visible).
-
ZERO EARNING ON VPS
Sorry to jump off topic a bit but did anyone came across they node being shown as data centre despite running it from home? I do have a static IP address, I wonder if this is linked somehow. The guy from mysterium mentioned they use this database: https://www.ip2location.com/ to determine category of IPs, I’ve emailed them to have a review and rectify but no reply… Data centre nodes really don’t earn much
-
Geolocation website blocked
Therefore, sites with geolocation requirement such as lottery will use geolocation service such as IP2Location to determine geolocation or proxy / VPN to filter all traffics in compliance to local laws.
- A new release of PHP SDK enables user to easily get the real visitor IP behind proxy, such as #CloudFlare, #Sucuri and so on. https://github.com/chrislim2888/IP2Location-PHP-Module
-
IP to Geolocation with Python
This is why there're several businesses out there that specialize in that exclusively - maintaining a constantly updated map of IPs, allocations and locations. Among those firms are Maxmind, IP2Location, DP-IP, and more.
-
Geolocation given IP and ISP
You can only get estimated location based on IP address geolocation. You can visit https://www.ip2location.com for example.
-
Best tools for checking malicious websites
You can search IP address and determine the risks using https://www.ip2location.com
-
Admin kick (VPN Detected)
BattleMetrics is using IP2Location for geolocation as stated in their site. You can contact them to update if you found any wrong information.
-
was content delivery cancelled in argentina? now for some reason i stopped being in queue and it says is unavailible and something is odd jumptask says i dont have anything in my wallet
Hello, Content Delivery is available in Argentina, please go to https://www.ip2location.com > Try Demo then scroll down and tell me the usage type.
-
Netflix show available on PC and phone but not on Smart TV
If you visit https://www.ip2location.com, does the IP2Proxy detect it as VPN? It is possibly false-positive.
country-ip-blocks
Posts with mentions or reviews of country-ip-blocks.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-03-13.
- CIDR country-level IP data, straight from the Regional Internet Registries
-
How often do the IP addresses issued to a country change?
Maybe looking at the commit logs/history of https://github.com/herrbischoff/country-ip-blocks gives you some idea about change frequency.
-
Who's Attacking My Server?
Looks not-so reliable. Either fetches a list of blocks from https://github.com/herrbischoff/country-ip-blocks which is a random GitHub repository that collects "straight from the Regional Internet Registries" without any stating any sources nor method for gathering it (which also, I'm assuming, is self-reported data from those registries), or it fetches it from https://www.ipdeny.com/ which currently runs with an expired TLS certificate, which on top of everything, nft-blackhole ignores any issues with certificates anyways, leaving it wide open to MITM attacks (https://github.com/tomasz-c/nft-blackhole/blob/8a656ac0a803a...)
I wouldn't run that if I'd want something to reliably block someone from a specific country.
- Ukraine government websites down as it is bombarded by cyberattacks amid Russian invasion.
-
Create a script to block countries on an Azure NSG
#requires -Version 3.0 -Modules Az.Network function Get-OdCountryIpAddressCidrList { [CmdletBinding( DefaultParameterSetName = 'code' )] param ( # ISO 3166 country [Parameter( ParameterSetName = 'country' )] [string[]] $CountryName, # ISO 3166 2 character code [Parameter( ParameterSetName = 'code' )] [string[]] $CountryAlpha2Code, # IP protocol [Parameter( Mandatory )] [ValidateSet('Ipv4', 'Ipv6')] [string] $Protocol ) begin { $ErrorActionPreference = 'stop' try { $CountryCodeUrl = 'https://restcountries.eu/rest/v2/all' $Iso3166CountryList = Invoke-RestMethod -Uri $CountryCodeUrl -Verbose:$false -ErrorAction Stop $date = Get-Date -Format 's' $CountryList = [System.Collections.Generic.List[psobject]]::new() } # NOTE: When you use a SPECIFIC catch block, exceptions thrown by -ErrorAction Stop MAY LACK # some InvocationInfo details such as ScriptLineNumber. # REMEDY: If that affects you, remove the SPECIFIC exception type [System.ArgumentException] in the code below # and use ONE generic catch block instead. Such a catch block then handles ALL error types, so you would need to # add the logic to handle different error types differently by yourself. catch [System.ArgumentException] { # get error record [Management.Automation.ErrorRecord]$e = $_ # retrieve information about runtime error $info = [PSCustomObject]@{ Exception = $e.Exception.Message Reason = $e.CategoryInfo.Reason Target = $e.CategoryInfo.TargetName Script = $e.InvocationInfo.ScriptName Line = $e.InvocationInfo.ScriptLineNumber Column = $e.InvocationInfo.OffsetInLine } # output information. Post-process collected info, and log info (optional) $info } catch { $PSCmdlet.WriteError( $PSItem ) } } process { $ErrorActionPreference = 'stop' try { if ($PSCmdlet.ParameterSetName -eq 'country') { foreach ($name in $CountryName) { $country = $Iso3166CountryList | Where-Object -Property name -EQ -Value $name if ($country) { $CountryList.Add($country) } else { $CountryNotFoundMessage = "Cound not find ISO 3166-2 country '$name'. ISO 3166-2 list retrieved from $CountryCodeUrl on $date." Write-Error -Message $CountryNotFoundMessage } } } else { foreach ($code in $CountryAlpha2Code) { $country = $Iso3166CountryList | Where-Object -Property alpha2Code -EQ -Value $code if ($country) { $CountryList.Add($country) } else { $CodeNotFoundMessage = "Cound not find ISO 3166-2 country code for '$code' in list. ISO 3166-2 list retrieved from $CountryCodeUrl on $date." Write-Error -Message $CodeNotFoundMessage } } } } catch { $PSCmdlet.WriteError( $PSItem ) } } end { $ErrorActionPreference = 'stop' try { $headers = @{ Accept = 'application/vnd.github.v3.raw' } $IpList = foreach ($entry in $CountryList) { $IsoCode = $entry.alpha2Code $IsoName = $entry.Name $path = '{0}/{1}.cidr' -f $Protocol, $IsoCode [uri]$uri = 'https://api.github.com/repos/herrbischoff/country-ip-blocks/contents/{0}' -f $path.ToLower() Write-Verbose -Message "Retrieving country IPs for $IsoName ($IsoCode)" [PSCustomObject][ordered]@{ Country = $IsoName Code = $IsoCode TopLevelDomain = $entry.topLevelDomain CidrList = ((Invoke-RestMethod -Method Get -Uri $uri -Headers $headers -Verbose:$false).Split([System.Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries) -split "`n").Trim() CidrListSource = 'https://github.com/herrbischoff/country-ip-blocks/blob/master/{0}' -f $path.ToLower() } } $IpList | Sort-Object -Property Code } catch { $PSCmdlet.WriteError( $PSItem ) } } } $CountryCodeUrl = 'https://restcountries.eu/rest/v2/all' $Iso3166CountryList = Invoke-RestMethod -Uri $CountryCodeUrl -Verbose:$false $nsg = Get-AzNetworkSecurityGroup -Name 'LOL' $port = 8081 ForEach ($country in $Iso3166CountryList) { $CountryName = $country.name If ($CountryName -eq "New Zealand") { $CN = $country.alpha2Code $IPRanges = Get-OdCountryIpAddressCidrList -Protocol Ipv4 -CountryAlpha2Code $CN $IPRangeCidr = $IPRanges.CidrList ForEach ($range in $IPRangeCidr) { IF ($count -eq $null) { $count = 1 } $char = ([char](96 + $count)) $count++ IF ($priority -eq $null) { $priority = 100 } $priority++ $nsg | Add-AzNetworkSecurityRuleConfig -Name "Allow_$($CN)_$($char)" -Description "Allows access from $Countryname" -Access Allow ` -Protocol * -Direction Inbound -Priority $priority -SourceAddressPrefix "$range" -SourcePortRange * ` -DestinationAddressPrefix * -DestinationPortRange * $nsg | Set-AzNetworkSecurityGroup }} }
What are some alternatives?
When comparing IP2Location-PHP-Module and country-ip-blocks you can also consider the following projects:
crowdsec - CrowdSec - the open-source and participative security solution offering crowdsourced protection against malicious IPs and access to the most advanced real-world CTI.
nft-blackhole - Script / daemon to blocking IP in nftables by country and black lists
tailscale - The easiest, most secure way to use WireGuard and 2FA.
SSHHeatmap - Generates a heatmap of IP's that made failed SSH login attempts.