Blocking access to certain website using route

In case you happened to block certain site from being access from you pc/notebook/server or whatever..

let’s say.. it is a “site.com”
let check the ip address of the site..


[[email protected] ~]# nslookup site.com
Server: 208.67.222.220
Address: 208.67.222.220#53
Non-authoritative answer:
Name: site.com
Address: 66.113.131.78

then to block it run

route add -host 66.113.131.78 gw 127.0.0.1

will be routed to localhost (lo) interface instead

in windows would be


route add 66.113.131.78 MASK 255.255.255.255 192.168.1.222

windows-route-blocking
assumed 192.168.1.222 is some ip in your network that not been used.
.. it will be gone after reboot,

but if want it to be permanently would be something like


route -p add 66.113.131.78 MASK 255.255.255.255 192.168.1.222

in linux ..

you could either create a route file for each interface, e.g.,

/etc/sysconfig/network-scripts/route-lo
and put entries in it like this in the file:

66.113.131.78/32 via 127.0.0.1

or you can add route add commands to /etc/rc.local.

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

8 Responses

  1. Arsento says:

    I liked it. So much useful material. I read with great interest.

    Reply
  2. aLe aRdHo says:

    Nice Articel, thanks for sharing 😉

    Reply
  3. watches says:

    OK. Bless you on your mission. watches

    Reply
  4. Suresh says:

    Thanks & All the Best.

    Reply
  5. jimmy choo outlet online says:

    Your article is very nice

    Reply
  6. Davein says:

    SO FUN ARTIAL

    Reply
  7. burberry bags says:

    ack Obama. Younger voters and liberals, too, but to a lesser extent. All are important Democratic constituencies that helped him win the White House in 2008 and whose support he’ll need to keep it next year. An analysis of Associated Press-GfK polls, includin

    Reply
  8. moncler says:

    I added it to favorites and i’ll be your constant reader.

    Reply

Anything to add?

X