What blocking an IP address does, and when you need it
Blocking an IP address stops your device or network from communicating with a specific computer or server on the internet. When you block an IP, any connection attempt from that address gets rejected — the blocked device cannot reach you, and you cannot reach it. This is useful when you want to prevent a specific computer from accessing your network, stop a particular website or service from reaching you, or keep a known source of unwanted traffic away from your devices.
The method you use depends on where you want the block to happen. You can block at the device level (one computer stops talking to one IP), at the router level (your entire home network rejects that IP), or through your internet service provider. Most people start with device-level blocking because it is the simplest and does not affect anyone else on your network.
Key Takeaways
- Device-level blocking works through your operating system's firewall and stops only that computer from reaching a specific IP address.
- Router-level blocking prevents any device on your home network from connecting to that IP, and is set up in your router's admin panel.
- You need the actual IP address of what you want to block — a domain name or website URL is not enough.
- Blocking an IP does not hide your own IP address or make you anonymous; it only prevents communication with that specific address.
Blocking an IP address on Windows using the firewall
Windows Defender Firewall has a built-in way to block specific IP addresses without installing extra software. Open Windows Defender Firewall by typing "firewall" into the Windows search box and selecting "Windows Defender Firewall with Advanced Security." This opens a window with options on the left side.
Click "Inbound Rules" on the left, then click "New Rule" in the right panel. Choose "Custom" and click Next. On the "Protocol and Ports" screen, select the protocol type — use "TCP" if you are blocking a web service or "UDP" if you are blocking a game or streaming service (if you are unsure, select "TCP"). Click Next. On the "Scope" screen, under "Remote IP address," select "These IP addresses" and click the Add button. Type the IP address you want to block and click OK. Finish the wizard by selecting "Block the connection" and giving the rule a name you will recognize later.
To block outgoing traffic to an IP address instead, repeat the same steps but click "Outbound Rules" instead of "Inbound Rules." This prevents your computer from initiating contact with that IP.
Blocking an IP address on Mac using the firewall
macOS does not have a built-in graphical tool for blocking specific IPs the way Windows does. Instead, you use the terminal and a tool called pf (packet filter). Open Terminal (search for it in Spotlight) and type the following command, replacing 192.0.2.1 with the IP address you want to block:
echo "block in from 192.0.2.1" | sudo pfctl -f -
The system will ask for your password. Type it and press Enter. The block takes effect immediately. To remove the block later, type:
sudo pfctl -f /etc/pf.conf
If you prefer not to use the terminal, third-party firewall applications like Little Snitch or Radio Silence provide a graphical interface for blocking IPs, though these are paid applications.
Blocking an IP address at the router level
Blocking at your router affects every device on your home network. Log into your router's admin panel by opening a web browser and typing your router's IP address — usually 192.168.1.1 or 192.168.0.1. If you are unsure, check the sticker on the back of your router or look in your router's manual. You will need the admin username and password, which are often printed on the router itself or in the documentation that came with it.
Once logged in, look for a section called "Firewall," "Security," "Access Control," or "Blocked Sites" — the exact name varies by router brand. Some routers call it "IP Filtering" or "MAC Filtering." Find the option to add a blocked IP address and enter the address you want to block. Save the settings. The block takes effect immediately, though you may need to restart the router for some changes to apply.
If you cannot find this option in your router's interface, check the manual for your specific model. Different manufacturers like Netgear, TP-Link, Linksys, and Asus place these controls in different locations.
Finding the IP address you want to block
Before you can block an IP, you need to know what IP address to block. If someone is attacking your network or a service is sending unwanted traffic, you can find the source IP in your network logs or firewall logs.
On Windows, open Command Prompt and type netstat -an to see active connections. Look for the "ESTABLISHED" or "LISTENING" connections and note the IP addresses. On Mac, open Terminal and type netstat -an | grep ESTABLISHED to see active connections. If you are blocking a website, you can find its IP address by opening Command Prompt or Terminal and typing ping example.com (replace example.com with the actual domain). The response will show the IP address.
If you are blocking traffic from a specific application, check your router's logs or firewall logs to see which IPs that application is connecting to. Most routers have a log section in their admin panel that shows recent connection attempts.
What blocking an IP does not do
Blocking an IP address is not the same as hiding your own IP or becoming anonymous online. When you block an IP, you are only preventing communication with that specific address — websites and services you visit can still see your IP address. If you want to hide your IP address from websites you visit, you would need a VPN or proxy service, which is a different tool with a different purpose.
Blocking an IP also does not stop someone from reaching you through a different IP address. If a service has multiple servers or uses a content delivery network, blocking one IP might not block all of them. You may need to block multiple IPs or use a more comprehensive firewall rule.
Additionally, blocking an IP at the device level does not affect other devices on your network — each device has its own firewall rules. If you want to block an IP for everyone on your home network, you must set the block at the router level instead.
When to contact your internet service provider about blocking
If you are receiving a large volume of unwanted traffic from a specific IP address — such as repeated connection attempts, spam, or a denial-of-service attack — you can report it to your internet service provider. Your ISP can block that IP at their network level, which is more effective than blocking it on your own device or router.
Contact your ISP's support line and describe the traffic you are receiving. Provide the IP address, the type of traffic, and when it started. Your ISP may ask for logs or additional details. They cannot always block an IP immediately, but they can investigate and take action if the traffic is malicious or violates their terms of service.
Frequently Asked Questions
Can I block an IP address if I only know the website name?
No — you need the actual IP address. A website name (domain) can point to many different IP addresses, and those addresses can change. Use the ping command to find the IP address of a domain first, then block that IP.
Will blocking an IP address slow down my internet?
No. Blocking an IP has no effect on your internet speed. Your connection speed depends on your ISP and network hardware, not on firewall rules.
What happens if I block the wrong IP address?
If you block an IP at the device level, only that computer is affected — you can unblock it by removing the firewall rule. If you block at the router level, all devices on your network lose access to that IP. Check your firewall rules or router settings to find and remove the incorrect block.
Can I block an IP address on my phone?
Most phones do not have a built-in firewall interface for blocking specific IPs. On Android, you can use third-party firewall apps like NetGuard or AFWall+. On iPhone, you cannot block specific IPs without jailbreaking, but you can block entire apps or use Screen Time to restrict access to certain services.
Is blocking an IP address the same as banning someone?
Not exactly. Blocking an IP stops communication with that address, but someone can often get a different IP address from their ISP and try again. Banning is usually a service-level action where a website or game removes an account or user permanently. Blocking an IP is one tool a service might use as part of a ban, but it is not the same thing.