A computer or device used on the Internet or a local area network is given a label or series of numbers called an IP address. It is a method of online user identification and addresses determination. Network connections to or from an IP address that has been blocked are not allowed.
Only a firewall installed on the computer can block an IP address. Windows users have two ways to restrict an IP address: 1) utilizing the built-in firewall to the operating system or 2) using third-party software like Norton Internet Security. If a separate firewall is installed on the computer, the procedures for blocking an IP address will be the same as for Norton or the built-in firewall.
What use does an IP address serve?
Similar to physical addresses, IP addresses reveal details about the device and the network used to connect.
While you’ll typically have the same IP address when connecting devices through your home network, this address changes if you use another network outside your home. It can also change if you reboot your router or switch Internet providers. IP addresses are not static, unlike physical addresses.
IPv4 addresses, the most used kind of IP addresses, employ four groups of up to three integers each, separated by dots, as follows:
All devices utilize this address, referred to as the “loopback address,” to identify themselves on any network. They are subsequently given a particular IP address to connect to the global Internet.
Any device that connects to your website uses an IP address, which your content management system records (CMS). Say you’re a WordPress user. In your WordPress admin page’s “Comments” area, users who submit comments can be identified by their IP address.
Using the cPanel dashboard provided by your WordPress hosting provider, you can also see a list of all the IP addresses that have visited your website. Click “Raw Access Logs” under the “Logs” heading. To view a list of all the IP addresses that recently visited your site, you must decompress and read the raw access data file you downloaded using a text editor.
Methods for Blocking IP Addresses
In the end, IP address blocking gives administrators and website owners control over website traffic. Depending on the operating system being utilized, there are many ways to block one or more IP addresses.
Although many distinct operating systems exist, Windows and Mac are the most popular. We’ll go over how to block an IP address with these techniques, which do the same thing but slightly differently.
Why Is an IP Address Blocked?
It’s frequently possible to contact website visitors who write critical comments and have the situation resolved amicably. However, occasionally this fails to work, leading to post comments sections that quickly devolve into hatred and pointless argument.
Additionally, it’s possible that hostile actors may target your website to breach administrative logins or launch distributed denial-of-service (DDoS) assaults, which can drastically affect the site’s performance or completely shut down your website.
Although restricting persons or their devices is never a good idea, the situations mentioned above necessitate taking more extreme measures: blocking IP addresses.
IP address blocking for Windows users
In technical terms, a firewall is a component that enables your computer to prevent access to your network without impeding your ability to communicate with outside networks. Blocking IP addresses on a Windows machine requires going through the “Windows Firewall.”
This article will describe finding and blocking a website’s IP address. This procedure is made comparatively easy by Windows Firewall. Start with step 3 if you already know the IP address you want to block.
1- Locate the website you wish to block by opening your internet browser and looking for it. Everything in the URL address after the “www” should be highlighted and copied.
2 – Launch Command Prompt: Select “Command Prompt (Admin)” from your start menu and launch it. Paste the website’s web address into the first line of code. In response, Command Prompt should generate several lines of code that expose the IP address of the website. Copy the IPv4 or IPv6 address by highlighting it. Copy it, then paste it into the search bar of your internet browser and hit enter. Check to see if it returns you to the website.
3- Launch Windows Firewall: Select Start from the menu. Open “Windows Firewall” by finding it in “Control Panel” and clicking on it.
4 – Advanced Settings + Windows Inbound Rules: Locate and click “Advanced settings” on the left side of the screen while Windows Firewall is open. Find “Inbound Rules,” which should be located close to the top left of the screen, next. The menu choices should alter as a result. Find “New Rule” and click it there on the right side of the window.
5 – New Rule: Select the “Custom” option in the New Rule tab, then press “Next” twice more to go to the page that asks “Which remote IP addresses does this rule apply to?
Select “These IP Addresses” from the menu.
6 – Add IP Addresses: Select “Add…” from the menu. The IP address of the website (or any other IP address) can then be pasted into the “This IP address or subnet:” box. Repeat this procedure for any IP addresses you want to block. Click “Next” at the bottom of the screen once they have been added.
7 – Block: The following page ought to have three choices. Clicking the “Block the connection” option at the bottom will take you to a page that asks you to “Name” the blacklisted IP addresses. Press Next after naming it until the “Finish” bar displays. To finish, click.
8 – Repeat the Process with “Outbound Rules”: Go back to the Advanced Settings box and carry out the “Inbound Rules” process once more using “Outbound Rules.”
The IP address or addresses you’ve isolated will be prohibited from your network once steps 1 through 8 are finished.
Blocking IP Addresses on a Mac
Using your router to restrict IP addresses across your whole network is the simplest method to do on a Mac. Use the Terminal to add a new rule to your PacketFilter Configuration file if you only want to block an IP address on your Mac:
To view the PacketFilter Configuration file, open Terminal and type the following commands:
Vim /etc/pf.conf with Sudo
Replace the IP address with the address you want to block (for instance, 22.214.171.124) and type the following:
Any block drop to IP Address
Replace any with an IP address to ban a range of addresses. For instance:
Dropping a block from 126.96.36.199 to 188.8.131.52
To activate the packet filter and load the rule you created, type the following:
/etc/pf.conf/pfctl -e -f
The IP address has been restricted. Enter the following command to remove the rule:
So by following this procedure, you can block IP addresses; we hope this post cleared all your doubts. Please let us know in the comment section if you have any queries regarding the process.
Stay tuned for more such informative tech guides, news, and reviews.