What blocking an IP address actually does
Blocking an IP address means telling your router or computer to refuse connection requests from a specific device or internet location. When you block an IP, that device cannot reach your network or your computer — it's like changing the lock on your front door so one particular key no longer works.
Most home blocking happens at the router level, which stops the blocked device from connecting to your wifi or wired network at all. You can also block at the computer level, which stops just that one machine from receiving data from the blocked IP, while other devices on your network can still see it. The choice depends on what you're trying to prevent.
Blocking is useful when a device on your network is misbehaving — downloading too much data, spreading malware, or connecting to places you don't want it to reach. It's less useful against threats from outside your network, because an attacker can usually just change their IP address and try again.
Key Takeaways
- Router-level blocking stops a device from joining your network entirely; computer-level blocking lets it connect but prevents one machine from talking to it.
- You find the IP address you want to block by checking your router's connected devices list or by running a command like ipconfig (Windows) or ifconfig (Mac/Linux).
- Most home routers let you block IPs through the admin panel, usually at 192.168.1.1 or 192.168.0.1, using the same password you use to change your wifi name.
- Blocking only works against devices you can identify — it won't stop attackers from outside your network, and a blocked device can sometimes rejoin if it gets a new IP address.
Finding the IP address you want to block
Before you can block an IP, you need to know what it is. If the device is on your network, your router keeps a list of every device connected to it and the IP address it was assigned.
Log into your router's admin panel by opening a web browser and typing 192.168.1.1 or 192.168.0.1 into the address bar. (If neither works, check the sticker on the back of your router — it will show the correct address.) Enter your router's username and password — usually admin/admin or admin/password unless you changed it.
Look for a section called "Connected Devices," "DHCP Clients," "Device List," or "Active Clients." This shows every device currently on your network and its IP address. Write down the IP address of the device you want to block. If you're trying to block a device that's not currently connected, you may need to wait for it to connect once, note the IP, then block it before it connects again.
If you're trying to block an external IP address — something attacking you from outside — you'll need to check your router's logs or use a tool like netstat (Windows) or ss (Mac/Linux) to see incoming connection attempts. This is more technical and usually only necessary if you're seeing repeated failed login attempts or port scans.
Blocking at the router level
Router-level blocking is the most complete method because it stops the device from connecting to your network at all. The exact steps vary by router brand, but the process is similar across most models.
In your router's admin panel, look for sections labeled "Access Control," "MAC Filtering," "IP Filtering," "Firewall," or "Parental Controls." Some routers put this under "Advanced" settings. Once you find it, you should see an option to add a blocked IP address or a blocked device list.
Enter the IP address you want to block and save the settings. Your router will when ready stop accepting connections from that IP. If the blocked device tries to connect, it will either see "no network available" or get a "connection refused" message. The device won't know it's been blocked — it will just look like your network disappeared.
One important limitation: if the blocked device is set to get a new IP address automatically (which most are), it may get assigned a different IP the next time it connects. You may need to block multiple IPs, or use MAC address filtering instead, which blocks based on the device's hardware identifier rather than its temporary IP address.
Blocking at the computer level
Computer-level blocking stops one specific machine from communicating with a blocked IP, but other devices on your network can still reach it. This is useful when you want to isolate one computer's traffic without affecting the whole network.
On Windows, open Command Prompt as administrator and type: netsh advfirewall firewall add rule name="Block IP" dir=in action=block remoteip=XXX.XXX.XXX.XXX, replacing the X's with the IP you want to block. To block outgoing traffic instead, change dir=in to dir=out. To remove the rule later, type the same command but replace "add rule" with "delete rule".
On Mac, open Terminal and type: sudo pfctl -t blocklist -T add XXX.XXX.XXX.XXX, again replacing the X's with the IP address. Mac's firewall is more complex, and you may need to enable it first through System Preferences > Security & Privacy > Firewall Options.
On Linux, use iptables: sudo iptables -A INPUT -s XXX.XXX.XXX.XXX -j DROP to block incoming traffic, or sudo iptables -A OUTPUT -d XXX.XXX.XXX.XXX -j DROP to block outgoing. These rules disappear when you restart unless you save them to your firewall configuration file.
When blocking doesn't work the way you expect
Blocking an IP address works well for stopping a specific device on your network, but it has real limits against outside threats. An attacker using a botnet or proxy service can straightforward use a different IP address, making your block useless. Blocking is a speed bump, not a wall.
If a device is set to request a new IP address each time it connects (called DHCP), blocking its old IP won't stop it from rejoining with a new one. To permanently block a device, use MAC address filtering instead, which blocks based on the device's hardware address rather than its temporary IP. Your router's admin panel usually has a MAC filtering option near the IP blocking settings.
Blocking also won't protect you against encrypted traffic you can't see. If a device on your network is sending data to a server you want to block, but the connection is encrypted, your router can see the IP address but not what data is being sent. You may need to block the device entirely rather than just the IP.
Alternatives to IP blocking
MAC address filtering blocks based on a device's hardware identifier instead of its IP. This is more permanent because the MAC address doesn't change when the device reconnects. Most routers let you create a "whitelist" (only these devices can connect) or a "blacklist" (these devices cannot connect). Whitelist mode is more find but requires you to manually approve every device.
DNS blocking stops a device from reaching certain websites by blocking the domain names it tries to visit, rather than blocking the IP itself. Your router or a service like Cloudflare's 1.1.1.1 for Families can do this. It's useful for blocking categories of sites (adult content, gambling, social media) rather than specific IPs.
Bandwidth throttling slows down a specific device instead of blocking it entirely. This is useful when a device is using too much network speed but you don't want to disconnect it completely. Most routers have a QoS (Quality of Service) setting that lets you assign priority or speed limits to specific devices.
Disabling the device is sometimes the simplest answer. If a device on your network is compromised or misbehaving, removing it from the network entirely is more reliable than trying to block its traffic. You can always reconnect it later once you've fixed the problem.
Checking whether your block is working
After you block an IP, test whether the block actually took effect. If you blocked a device on your network, try to connect it to your wifi or ethernet. It should fail to connect or show "cannot reach network." If it connects anyway, the block didn't work — check that you entered the IP address correctly and that you saved the settings.
If you blocked an external IP address, you can use an online port scanner or ask someone outside your network to try connecting to your computer. If the connection is refused, the block is working. If it goes through, either the IP address changed or your firewall rule wasn't saved correctly.
Keep in mind that some devices will retry connection attempts automatically. A blocked device might try to reconnect every few seconds, which you may see as repeated failed attempts in your router's logs. This is normal and means the block is working — the device just doesn't know it's been blocked.
Frequently Asked Questions
Can someone unblock themselves if I block their IP?
Not from outside your network — they can't change your router settings without your password. If they're on your network and have admin access to your computer, they could potentially remove a computer-level firewall rule, but they can't override router-level blocking without the router password. If you're concerned about this, change your router password to something only you know.
Will blocking an IP stop a hacker from attacking me?
Only if you know their IP address and they don't change it. Most attackers use multiple IP addresses or proxy services, so blocking one IP is like blocking one phone number when someone keeps calling from different numbers. Blocking is useful for stopping a specific device on your network, less useful for outside threats. A firewall and strong passwords are more effective against external attacks.
What's the difference between blocking an IP and blocking a MAC address?
An IP address is temporary and changes when a device reconnects; a MAC address is permanent and built into the device's hardware. Blocking a MAC address is more reliable if you want to permanently prevent a specific device from joining your network. Most routers support both, so use MAC filtering for devices you want to keep out permanently and IP filtering for temporary blocks.
If I block an IP, can the device see that it's been blocked?
Not directly. The device will just see that your network is unreachable or that connection attempts time out. It won't receive a message saying "you are blocked." The device owner might notice they can't connect and investigate, but they won't get explicit notification from your router.
Do I need to restart my router after blocking an IP?
Usually not. Most routers explore IP blocks when ready after you save the settings. However, if the block doesn't seem to work, restarting the router sometimes helps — unplug it for 30 seconds, plug it back in, and wait for it to fully restart before testing again.