ABXZone Computer  Forums



Welcome to the ABXZone Computer Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Reply
 
LinkBack Thread Tools Display Modes
Old 10-25-2004, 11:29 PM   #1
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
Hosts file in Linux???


Is it possible? please tell me how if it is.
i am not all that experienced, so i may need some hand-holding to get me thru

__________________
Bye Bye ABXZone.....Rest In Peace.
(Offline)   Reply With Quote
Old 10-26-2004, 12:02 AM   #2
Registered User
 
Join Date: Apr 2001
Location: Fresno
Posts: 168
Quote:
Originally Posted by FB -|-+
Is it possible? please tell me how if it is.
i am not all that experienced, so i may need some hand-holding to get me thru
what are you trying to do ?
maybe this is what you looking for : /etc/hosts
edit it using your favourite editor, e.g. vi /etc/hosts

hope it helps
__________________
AMD Athlon XP 2500+ on A7N8X Deluxe (running 3200+)
512 MB (2x256) OCZ PC3200
200 GB Western Digital
ATI AIW 9700 Pro
(Offline)   Reply With Quote
Old 10-26-2004, 12:04 AM   #3
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
well, i have a hosts file in windoze to block almost all pop-ups, so i want to do the same in linux. is that where the file is stored?
__________________
Bye Bye ABXZone.....Rest In Peace.
(Offline)   Reply With Quote
Old 10-26-2004, 12:08 AM   #4
Registered User
 
Join Date: Apr 2001
Location: Fresno
Posts: 168
Quote:
Originally Posted by FB -|-+
well, i have a hosts file in windoze to block almost all pop-ups, so i want to do the same in linux. is that where the file is stored?
I dont think so, maybe in Windows your popup blocker program read a "host file"
that you referring to.
/etc/hosts list known hosts and used for networking purposes.

I'm not using any popup blocker program in Linux and I have no problem with popup. I used Firefox as my browser (it has internal popup blocker IIRC)

hnsn82
__________________
AMD Athlon XP 2500+ on A7N8X Deluxe (running 3200+)
512 MB (2x256) OCZ PC3200
200 GB Western Digital
ATI AIW 9700 Pro
(Offline)   Reply With Quote
Old 10-26-2004, 12:11 AM   #5
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
Quote:
Originally Posted by hnsn82
I dont think so, maybe in Windows your popup blocker program read a "host file"
that you referring to.
/etc/hosts list known hosts and used for networking purposes.

I'm not using any popup blocker program in Linux and I have no problem with popup. I used Firefox as my browser (it has internal popup blocker IIRC)

hnsn82
ok, just curious.

in win the hosts file is used to block sites that are pop ups etc, because i use FF in win as well and it doesn't block all of them

the hosts file will even block the ads that show up on the top of ABX
__________________
Bye Bye ABXZone.....Rest In Peace.
(Offline)   Reply With Quote
Old 10-26-2004, 12:15 AM   #6
Registered User
 
Join Date: Apr 2001
Location: Fresno
Posts: 168
Quote:
Originally Posted by FB -|-+
ok, just curious.

in win the hosts file is used to block sites that are pop ups etc, because i use FF in win as well and it doesn't block all of them

the hosts file will even block the ads that show up on the top of ABX
is this file created by your popup blocker program or it is windows file ?
what is the file name of the hosts file you referring to in Window ?
if possible give the full path as well (c:\windows\blablabla)
__________________
AMD Athlon XP 2500+ on A7N8X Deluxe (running 3200+)
512 MB (2x256) OCZ PC3200
200 GB Western Digital
ATI AIW 9700 Pro
(Offline)   Reply With Quote
Old 10-26-2004, 12:16 AM   #7
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
this is the one i use, it works really really good too. I don't use any pop-up blocker programs other than Firefox.

http://www.mvps.org/winhelp2002/hosts.htm
(Offline)   Reply With Quote
Old 10-26-2004, 12:27 AM   #8
Registered User
 
Join Date: Apr 2001
Location: Fresno
Posts: 168
Quote:
Originally Posted by FB -|-+
this is the one i use, it works really really good too. I don't use any pop-up blocker programs other than Firefox.

http://www.mvps.org/winhelp2002/hosts.htm
ah ok i see, smart way.
To answer you original question, yes you can put those popup address in /etc/hosts and you will achieve same result.

for example :
127.0.0.1 popup.company.com

name resolution in linux involves 2 files as far as i know , first look at /etc/hosts if can't found then try the server listed on /etc/resolv.conf

cheers
__________________
AMD Athlon XP 2500+ on A7N8X Deluxe (running 3200+)
512 MB (2x256) OCZ PC3200
200 GB Western Digital
ATI AIW 9700 Pro
(Offline)   Reply With Quote
Old 10-26-2004, 12:34 AM   #9
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
hmm, i don't have a /etc/hosts so i added them to resolv.conf, but it didn't stop the ads
__________________
Bye Bye ABXZone.....Rest In Peace.
(Offline)   Reply With Quote
Old 10-26-2004, 12:37 AM   #10
Resident ABX Wizard
 
Fraoch's Avatar
 
Join Date: May 2003
Location: London, Ontario
Posts: 8,814
Quote:
Originally Posted by FB -|-+
hmm, i don't have a /etc/hosts so i added them to resolv.conf, but it didn't stop the ads
Maybe it requires a reboot?

Sorry, Windows thinking.
(Offline)   Reply With Quote
Old 10-26-2004, 12:40 AM   #11
Registered User
 
Join Date: Apr 2001
Location: Fresno
Posts: 168
Quote:
Originally Posted by FB -|-+
hmm, i don't have a /etc/hosts so i added them to resolv.conf, but it didn't stop the ads
you should have /etc/hosts this is an essential file. are you sure u dont have it ? (and not accidentally erased it)

adding in /etc/resolv.conf wont work
in /etc/resolv.conf we list nameserver (server that we ask to conver our dns name into ip)

the way that host trick works is as follow:
When you put 127.0.0.1 popup.company.com (in /etc/hosts), when your browser trying to get popup from popup.company.com it will try to get it from 127.0.0.1 which is your own computer, which it will never found , thus can't show the popup. if it is an image you can verify by trying to look at the properties of the image, it will say (http://127.0.0.1/somestuff/img.jpg).
If it can't find popup.company.com at /etc/hosts, the browser going to ask one of the server listed at /etc/resolv.conf , which give your browser the real ip of popup.company.com and you got the popup.


cheers
__________________
AMD Athlon XP 2500+ on A7N8X Deluxe (running 3200+)
512 MB (2x256) OCZ PC3200
200 GB Western Digital
ATI AIW 9700 Pro
(Offline)   Reply With Quote
Old 10-26-2004, 12:53 AM   #12
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
oh, i though you meant that was a dir. i bet i have it.
__________________
Bye Bye ABXZone.....Rest In Peace.
(Offline)   Reply With Quote
Old 10-26-2004, 12:57 AM   #13
FB
Re-Retiring
 
FB's Avatar
 
Join Date: Sep 2002
Location: MN, USA
Posts: 24,834
hey i fixed the hosts file and no more ads
__________________
Bye Bye ABXZone.....Rest In Peace.
(Offline)   Reply With Quote
Old 10-26-2004, 01:01 AM   #14
Registered User
 
Join Date: Apr 2001
Location: Fresno
Posts: 168
Quote:
Originally Posted by FB -|-+
hey i fixed the hosts file and no more ads
nice.
could you share your compilation of poppers here ? it would be a great resource for everyone.

thanks
__________________
AMD Athlon XP 2500+ on A7N8X Deluxe (running 3200+)
512 MB (2x256) OCZ PC3200
200 GB Western Digital
ATI AIW 9700 Pro
(Offline)   Reply With Quote
Old 10-26-2004, 01:09 AM   #15
Resident ABX Wizard
 
Fraoch's Avatar
 
Join Date: May 2003
Location: London, Ontario
Posts: 8,814
Quote:
Originally Posted by FB -|-+
hey i fixed the hosts file and no more ads
Cool, cool, cool. That was one of the things that bugged me about Linux, all the ads were back.

Essentially all you have to do is copy and paste the text from the link you posted!
(Offline)   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.1
vBulletin Skin developed by: vBStyles.com