 |
01-10-2007, 07:07 PM
|
#1 (permalink)
|
|
Deadman Walking
Join Date: Feb 2007
Location: Visakhapatnam
Posts: 879
|
block the websites in your own pc
guys here is the cool tchnique where you can block your pc so that childrens cannot view some x type of sites :
If you are using Windows XP., open a DOS command window, type:
notepad C:\WINDOWS\system32\drivers\etc\hosts
Lets say that you want to block hxxp://www.rediff.com
Add the following line to the file:
127.0.0.1 hxxp://www.rediff.com
Do change "hxxp to http".
File > Save. You are done!
__________________
What looks to be nothing,finally that becomes everything...
and what is everything suddenly that changes to nothing...
Learn to live... &
Live to learn...
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
02-10-2007, 05:24 PM
|
#2 (permalink)
|
|
Cool as a CUCUMBAR ! ! !
Join Date: Dec 2003
Posts: 5,052
|
Re: block the websites in your own pc
cool ...... even no entry in firewall 2 ........
__________________
... W H O T ...
|
|
|
30-10-2007, 03:54 PM
|
#3 (permalink)
|
|
In The Zone
Join Date: Sep 2007
Location: 23 17'N, 86 05'E
Posts: 369
|
Re: block the websites in your own pc
How to unblock the same items ???
|
|
|
30-10-2007, 04:05 PM
|
#4 (permalink)
|
|
Think Zen.
Join Date: Dec 2005
Posts: 1,498
|
Re: block the websites in your own pc
I think even though its blocked this way we can access through the ip.
Not sure though.
@anand1
Just remove its entry from the file.
Regards,
ray
__________________
Do what you will; but not because you must. -- Zen Quote
|
|
|
30-10-2007, 04:25 PM
|
#5 (permalink)
|
|
"The Cake is a Lie!!"
Join Date: Oct 2006
Posts: 471
|
Re: block the websites in your own pc
Quote:
|
Originally Posted by rayraven
I think even though its blocked this way we can access through the ip.
|
A better method then is to ping the domain first, get the IP and then add the IP instead of the Domain.
It blocks both
__________________
[xubz] ● http://xubz.com/
[steam_id] ● http://steamcommunity.com/id/xubz
|
|
|
30-10-2007, 04:33 PM
|
#6 (permalink)
|
|
Deadman Walking
Join Date: Feb 2007
Location: Visakhapatnam
Posts: 879
|
Re: block the websites in your own pc
if you want to block through ip then change regedit key to ip address instead of domain name
__________________
What looks to be nothing,finally that becomes everything...
and what is everything suddenly that changes to nothing...
Learn to live... &
Live to learn...
|
|
|
30-10-2007, 04:54 PM
|
#7 (permalink)
|
|
हॉर्न ओके प्लीज़
Join Date: Sep 2007
Posts: 1,493
|
Re: block the websites in your own pc
Quote:
|
Originally Posted by [xubz]
A better method then is to ping the domain first, get the IP and then add the IP instead of the Domain.
It blocks both 
|
but what if the ip is shared between domains?
wudn't all the sites on that ip be blocked?
__________________
विक्टर रॅंबो - चाणकया प्रभावित व्यक्ति
गीक होना माँगता
|
|
|
30-10-2007, 06:59 PM
|
#8 (permalink)
|
|
Alpha Geek
Join Date: Jun 2005
Location: Bengaluru
Posts: 544
|
Re: block the websites in your own pc
let me try and let u know tonight....
my brother is a constant pest...
he uses my high end dell to orkut ...need to put an end to this today.... grrrrrr
__________________
Twitter @cgiridhar
Moto Milestone | Rooted | Froyo | CM 6.1.0
AMD Phenom2 720 x3 BE | Gigabyte MA78G | WD 500Gb+Seagate 1TB ext | PSU Corsair vx450 | Corsair 2x2gb RAM | Bose Companion 5
|
|
|
30-10-2007, 08:30 PM
|
#9 (permalink)
|
|
AJJU
Join Date: Aug 2006
Location: hYdErAbAd
Posts: 2,429
|
Re: block the websites in your own pc
^^ work's well nice Bro
__________________
I love and Live to Design
|
|
|
31-10-2007, 12:50 PM
|
#10 (permalink)
|
|
Apprentice
Join Date: Apr 2005
Location: lucknow
Posts: 77
|
Re: block the websites in your own pc
Hey it didn't worked for me.
__________________
->Whatever Happens, happen for A Reason!!!!!
My new blog-Aarambh
http://www.rakshitk.com
A Place to share thoughts with like minded people.
|
|
|
31-10-2007, 02:23 PM
|
#11 (permalink)
|
|
Deadman Walking
Join Date: Feb 2007
Location: Visakhapatnam
Posts: 879
|
Re: block the websites in your own pc
Quote:
|
Originally Posted by roxisayshi
Hey it didn't worked for me.
|
did you typed what exactly i shown above, did you gave space between 127.0.0.1 and your address
if not try https
__________________
What looks to be nothing,finally that becomes everything...
and what is everything suddenly that changes to nothing...
Learn to live... &
Live to learn...
|
|
|
31-10-2007, 03:13 PM
|
#12 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: block the websites in your own pc
What you're doing anyways is assigning the hostname to your PC. 127.0.0.1 is the IP of the loopback interface, i.e. the PC itself. Anyone running a web server on their PC try this, it should return you the default page on your web server when you try the name of that site you blocked.
__________________
http://www.bash.org/?258908
|
|
|
31-10-2007, 03:25 PM
|
#13 (permalink)
|
|
Google Bot
Join Date: Aug 2005
Posts: 9,772
|
Re: block the websites in your own pc
Yup.. this is a old trick.. wen u do this it tries to access the site in 127.0.09.1 wich is lcalhost and hence doesnt find any page and gives an error..
|
|
|
31-10-2007, 03:31 PM
|
#14 (permalink)
|
|
Deadman Walking
Join Date: Feb 2007
Location: Visakhapatnam
Posts: 879
|
Re: block the websites in your own pc
Quote:
|
Originally Posted by pathiks
Yup.. this is a old trick.. wen u do this it tries to access the site in 127.0.09.1 wich is lcalhost and hence doesnt find any page and gives an error..
|
That's correct dude, do you have any idea about symbian phones
__________________
What looks to be nothing,finally that becomes everything...
and what is everything suddenly that changes to nothing...
Learn to live... &
Live to learn...
|
|
|
31-10-2007, 06:10 PM
|
#15 (permalink)
|
|
Google Bot
Join Date: Aug 2005
Posts: 9,772
|
Re: block the websites in your own pc
You mean a similar trick for symbian???
just create the site's bookmark and keep its default apn something with wrong proxy settings such that it wont connect..
|
|
|
31-10-2007, 06:49 PM
|
#16 (permalink)
|
|
Deadman Walking
Join Date: Feb 2007
Location: Visakhapatnam
Posts: 879
|
Re: block the websites in your own pc
no no pathiks iam symbian software engineer for series 60 mobiles i want help regarding programming
__________________
What looks to be nothing,finally that becomes everything...
and what is everything suddenly that changes to nothing...
Learn to live... &
Live to learn...
|
|
|
31-10-2007, 10:03 PM
|
#17 (permalink)
|
|
Apprentice
Join Date: Apr 2005
Location: lucknow
Posts: 77
|
Re: block the websites in your own pc
@batistabomb
I did exactly what is written earlier by you. Also, gave space between 127.0.0.1 and address. Tried https:// as well.
Somehow, I couldn't able to block the desired website which happens to be none other than orkut. My sis is addicted to it. I need to block it by any means. Help me guyz.
__________________
->Whatever Happens, happen for A Reason!!!!!
My new blog-Aarambh
http://www.rakshitk.com
A Place to share thoughts with like minded people.
Last edited by roxisayshi; 01-11-2007 at 12:23 AM.
|
|
|
01-11-2007, 03:25 AM
|
#18 (permalink)
|
|
Alive Again...
Join Date: May 2005
Location: Mumbai
Posts: 1,668
|
Re: block the websites in your own pc
not working on my PC
I have seen in my Friends PC his engineers has blocked orkut.com in his PC and just when you type orkut.com before pressing enter key 1 message come with a sound (muhhhhhhhaaaaaaaaaaa............)
and message says
[
"You Fool, Orkut has been banned by Administrator"
Muhuhahaha!
]
how is this done ??
any idea ???
__________________
! जय हिंद ! Proud to be INDIAN
|
|
|
01-11-2007, 07:34 AM
|
#19 (permalink)
|
|
Host4Cheap.org
Join Date: May 2005
Location: Digit Forum
Posts: 2,102
|
Re: block the websites in your own pc
Quote:
|
Originally Posted by satyamy
not working on my PC
I have seen in my Friends PC his engineers has blocked orkut.com in his PC and just when you type orkut.com before pressing enter key 1 message come with a sound (muhhhhhhhaaaaaaaaaaa............)
and message says
[
"You Fool, Orkut has been banned by Administrator"
Muhuhahaha!
]
how is this done ??
any idea ???
|
http://www.thinkdigit.com/forum/show...9&postcount=15
@roxisayshi : dont add anything in front...Do this simply
127.0.0.1 orkut.com
127.0.0.1 www.orkut.com
__________________
★ Want to start your Website, No worries - here is how ★
http://www.thinkdigit.com/forum/showthread.php?t=66717
★ Host4Cheap - cPanel Webhosting & Reseller Plans ★
http://www.host4cheap.org/
|
|
|
01-11-2007, 08:49 AM
|
#20 (permalink)
|
|
œ∑´®†¥¨ˆøπåß∂ƒ©˙∆˚¬Ω≈ ç√∫˜
Join Date: Aug 2006
Location: Bangalore
Posts: 1,046
|
Re: block the websites in your own pc
not working for me..
Code:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 http://www.rediff.com/
what i made wrong????
|
|
|
01-11-2007, 08:58 AM
|
#21 (permalink)
|
|
I am Optimus Prime
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
|
Re: block the websites in your own pc
Try rediff.com instead of complete url.
|
|
|
01-11-2007, 09:11 AM
|
#22 (permalink)
|
|
Right Off the Assembly Line
Join Date: Nov 2007
Location: in the present world
Posts: 6
|
This Is The Correct Way...end This Topic Now...
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 www.redif.com
|
|
|
01-11-2007, 11:48 AM
|
#23 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: block the websites in your own pc
Check the man page for hosts http://unixhelp.ed.ac.uk/CGI/man-cgi?hosts
Though this one is for *nix, it should be similar windows too.
Quote:
Host names may contain only alphanumeric
characters, minus signs ("-"), and periods ("."). They must begin with
an alphabetic character and end with an alphanumeric character.
Optional aliases provide for name changes, alternate spellings, shorter
hostnames, or generic hostnames (for example, localhost).
|
As far as my understanding goes, hosts are not determined by protocol eg. http as being used here. It will only contain the FQDN of the host.
Quote:
|
fully qualified domain name (or FQDN) is an unambiguous domain name that specifies the node's position in the DNS tree hierarchy absolutely. To distinguish an FQDN from a regular domain name, a trailing period is added. ex: somehost.example.com. An FQDN differs from a regular domain name by its absoluteness; a suffix will not be added.
|
Quote:
|
A FQDN is not the same as a Uniform Resource Locator (URL) as it lacks the protocol name to be used in communication with the host. A URL always starts with "<scheme>:", and so includes the communication protocol (like "http:", or "ftp:"), and includes information specific to the scheme, such as a directory path, a filename and a TCP port number.
|
Source: - http://en.wikipedia.org/wiki/FQDN
Please check this out. And if I am right then the first post needs to be edited to remove the http part.
__________________
http://www.bash.org/?258908
|
|
|
01-11-2007, 01:48 PM
|
#24 (permalink)
|
|
Google Bot
Join Date: Aug 2005
Posts: 9,772
|
Re: block the websites in your own pc
^^ isnt it that wen u use the url, u r being more specific..
if u use the fqdn it blocks all the connections to that domain name be it http or ftp..
|
|
|
01-11-2007, 04:41 PM
|
#25 (permalink)
|
|
Broken In
Join Date: Jan 2007
Posts: 195
|
Re: block the websites in your own pc
i knew...yet nice info
|
|
|
01-11-2007, 04:47 PM
|
#26 (permalink)
|
|
Guest
|
Re: block the websites in your own pc
hey doesn't work...
I type:-
Quote:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 hxxp://www.rediff.com
|
And when I enter www.rediff.com in my address bar and press enter it shows me rediff...
What is wrong..?????
Please reply.
|
|
|
|
01-11-2007, 09:40 PM
|
#27 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: block the websites in your own pc
Quote:
|
Originally Posted by pathiks
^^ isnt it that wen u use the url, u r being more specific..
if u use the fqdn it blocks all the connections to that domain name be it http or ftp..
|
Nope. hostname doesn't have a protocol cos one host can serve many different services. I can run ftp, http, samba, dns and a hell lot more on my PC, while keeping one hostname.
The idea behind the hostname file is to uniquely identify the client within the domain and fqdn is to gather all hosts within one domain.
It wouldn't be uncommon to find, within a domain, one host running firewall and NAT, another running proxy and LDAP, another serving DNS, a couple of hosts running http, ftp, db servers.
fqdn is different from url as said in that wikipedia article.
Your domain http://www.foo.bar may lead to the host loo.foo.bar where loo is a host within the domain foo.bar. Instead it could even be loo.abc.xyz. fqdn needn't be the same as the url. If the internal DNS is set up fine that it will all be routed properly within the internal network.
Now how does this matter?
By default, on whatever OS's I have used, hosts are read from local files first. On linux my hosts line in /etc/nsswitch.conf file look like this
So, firstly a host name will be checked up on local host file, which happens to be /etc/hosts. If it's not found it will fall back on the DNS server.
So, now when you will look up for a host name, irrespective of the protocol used - be it http, ftp, rsync, ldap whatever, first the /etc/hosts file will be looked up. Since, your blocked host points to localhost it will try to connect the service on your own PC. And if it doesn't find any server running on that port it will give an error. If it finds any server running on your PC for the server, it will connect to it.
So, after blocking this if you run an apache server it will connect to your own PC on port 80.
But, if you specify http://abc.xyz it becomes an invalid fqdn(see the wikipedia entry in my previous post).
__________________
http://www.bash.org/?258908
|
|
|
02-11-2007, 04:20 PM
|
#28 (permalink)
|
|
Guest
|
Re: block the websites in your own pc
hey why I am not able to block...??
Please look at my previous post..
Plzzzzz reply.
|
|
|
|
02-11-2007, 07:41 PM
|
#29 (permalink)
|
|
Apprentice
Join Date: Apr 2005
Location: lucknow
Posts: 77
|
Re: block the websites in your own pc
@vaibhavtek
Hey, it finally worked for me and can also work for you.
Just restart your browser for these changes to take effect.
That's it.
I was doing exactly what is mentioned in the very 1st post of this thread but did not able to block websites. Later on, I found that the changes will take effect only when the browser is closed and reopen again.
@batistabomb
Thanks
__________________
->Whatever Happens, happen for A Reason!!!!!
My new blog-Aarambh
http://www.rakshitk.com
A Place to share thoughts with like minded people.
|
|
|
02-11-2007, 08:05 PM
|
#30 (permalink)
|
|
Deadman Walking
Join Date: Feb 2007
Location: Visakhapatnam
Posts: 879
|
Re: block the websites in your own pc
Guys i thought you clearly restarts browser that's why i did not mentioned specially
Any how better restart your system instead of restarting the browser
__________________
What looks to be nothing,finally that becomes everything...
and what is everything suddenly that changes to nothing...
Learn to live... &
Live to learn...
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|