Block access to website from router(using its IP adress)

275 views Asked by At

I'm trying to block access to a website (e.g site.com), to do so I used dig site.com to get the site's IP adress (I'm on Ubuntu). The result will be something like this:

site.com.       10000   IN  A   101.53.182.181`

Then mapped new IP ( localhost ) to the domain name 'site.com' on /etc/hosts, as the following:

127.0.0.1       site.com

That will do the thing for my local machine, but not for the whole network's devices. Also tried to configure from the router using telnet 192.168.1.1 but I lost it, I don't know how to do it.

How can I manage to block traffic from that particular site? Is there anyway to block access to websites using their IP address?

PS: I tried the classic way to block the site using its domain name (e.g site.com), but it doesn't really 'block the site', I can still access it by searching the website on Google.

1

There are 1 answers

2
Marvin Lucero On

You can try accessing your router's web interface. Make sure to set your computer's (laptop's) IP address manually to 192.168.1.2, subnet mask to 255.255.255.0 and then gateway to 192.168.1.1 for the computer's Eth0 interface. I suggest to use the wired interface instead of WLAN or WiFi. Then, access the router on a web browser using 192.168.1.1.

In your router's settings page, look for the following:

  • Block Sites
  • Access Restrictions
  • Security
  • Advanced

or something similar to the mentioned categories above. This may depend on the settings, so I advise to refer to your router's manual. Once you find the setting, indicate the domain/s or IP address (via dig) that you want to block, then apply the settings or changes that you have made.