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 “”
let check the ip address of the site..

[[email protected] ~]# nslookup
Non-authoritative answer:

then to block it run

route add -host gw

will be routed to localhost (lo) interface instead

in windows would be

route add MASK

assumed 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 MASK

in linux ..

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

and put entries in it like this in the file: via

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.


Related Post

3 Responses

  1. casiemec says:

    This rather good idea is necessary just by the way

  2. TheN2S says:

    I was wondering if I can use this for my wordpress 2.9.2 site. I simply want to mirror/sync/backup all my newly UPLOADED files to a new BACKUP website. (I don’t want to wait for the cron job to kick in)

  3. Madelyn Monoz says:

    I love what you guys are up too. Such clever work and exposure! Keep up the good works guys I’ve added you guys to blogroll.


Anything to add?