Have you ever wondered where exactly a website is hosting its content? You can geolocate domain names and IP addresses directly from the Linux command line with geoiplookup. Here’s how to use it.

What is Geolookup?

geoiplookup is a command-line utility that uses Maxmind’s geolocation database to find the country where an IP address or domain name is hosted. It queries a local file, usually stored in the /usr/share/GeoIP directory.

installing geoiplookup on linux

GeoLookup is easy to install as it is available in the package manager of most major Linux distros.

Using Geolookup to Geolocate IP Addresses

To use geolookup, you can call it on the command line with an IP address or domain name.

You can try looking up the IP address that your ISP has assigned to you. Most residential connections are dynamic, meaning that your address is assigned from a pool for a single session. Fortunately, finding your IP address is easy on Linux.

geoiplookup will tell you the country the IP address is located in. This will work with both IPv4 and IPv6 addresses.

You can also provide domain names as arguments. This can get interesting with large websites. You would expect with a domain name like “bbc.co.uk” that the BBC’s servers would be within the United Kingdom, but from the US, geolocation information shows that the website uses servers located in the US.

This is probably because large websites such as the BBC use content delivery networks to keep servers as physically close to users as possible. It is faster to serve content Stateside to users in the US than using a satellite link or undersea cable from the UK.

If you have an account with a VPN provider, you can change the geographic location of your connection and try using Geolookup to see what results you get.

You can view website location from Linux command line

geoiplookup is a small utility that can show where a website’s server is located. Sometimes, the results may surprise you.

If you want to hide your location for whatever reason, there are ways to do it directly in your web browser.

Most popular browsers, including Google Chrome, Firefox, and Microsoft Edge, include geolocation services within the browser. Geolocation attempts to locate you based on your IP address, Wi-Fi or network location.

Although geolocation has a lot of useful applications, it also has some serious privacy implications. For this reason, you might want to spoof or hide your location in Firefox, Google Chrome, and Microsoft Edge.

What is Geolocation?

Geolocation pinpoints your location and then associates it with your web browser or other applications. Most services use your IP address and information from connected networks to match known locations.

Browsers use geolocation for many different reasons. When you visit some websites, you may see a prompt asking you to confirm whether the site can use your location. If you allow access, the Site may use your location and provide information relevant to your area.

Geolocation is a convenient feature, but you may want to fake or block your location due to privacy concerns. It’s also easy to fake your location when you want to access location-restricted content.

Disable Geolocation in Google Chrome

It’s easy to turn off the location feature in Google Chrome. By default, Google Chrome will ask whether specific websites can use your location. If you accidentally turned this feature off (or just want to make sure it’s on), follow these steps.

Click on the three vertical dots in the right corner of the screen. From there, choose Settings > Privacy & security > Site settings > Location. You’ll see Ask before accessing Settings, which you should make sure is turned on.

You will also see a list of websites that you have allowed or denied access to your location. To revoke access to your location, simply hit the trash can icon next to any website under the “Allow” heading.

hide your location in firefox

You can easily disable your location on all websites in Firefox. Like Chrome, Firefox will ask for your permission whenever a site wants to access your location.

If you want to access Firefox’s location settings, click on the three vertical bars at the top right corner of the browser. Hit Options > Privacy Protection.

Scroll down to find the “Permissions” heading. Here, you’ll click on the settings box next to “Location.” You will then see a list of websites that have requested access to your location—you can block access to a site by removing it from the list.

Leave a Reply

Your email address will not be published. Required fields are marked *