- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Hosts file Hellllpppppp!!!!!!!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 03:18 PM
08-12-2003 03:18 PM
Redhat 7.2
xxx.x.xxx.xxx0 someserver.some.net someserver # 0
xxx.x.xxx.xxx0 someserver.some.net someserver # 0
x.x.x.1 someserver.some.net someserver # 0
x.x.x.1 email.some.net email # 0
x.x.x.1 some 0 # 0
x.x.x.1 route.some.org route
xxx.x.xxx.xxx0 mail.some.net 0 # 0
xxx.x.xxx.xxx0 mail.some.net 0 # 0
127.0.0.1 localhost.localdomain localhost # 0
127.0.0.1 www.doubleclick.com
the site can still be accessed. What did i do wrong??!!! what are does 0 # 0 mean
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 05:41 PM
08-12-2003 05:41 PM
Re: Hosts file Hellllpppppp!!!!!!!
127.0.0.1 someserver.some.net
The "# 0" at the end are uselss.
The 'xxx.x.xxx.xxx0' is what's going haywire. the resolver know's it's not an IP so it ignores it.
It's probably better if you're using a cache (squid) to block it in there however.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 10:12 PM
08-12-2003 10:12 PM
Solutionif you want to do it yourself;
you have to point them to address 127.0.0.1, that is all. the '# 0' has no effect because it is actualy a comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2003 11:53 PM
08-12-2003 11:53 PM
Re: Hosts file Hellllpppppp!!!!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2003 03:04 AM
08-13-2003 03:04 AM
Re: Hosts file Hellllpppppp!!!!!!!
I am on my way to work now. Before I go...
Michael,if /etc/nsswitch.conf is using dns. is there still a way to use hosts. or do i have to use iptables. currently i can not make changes (squid). i just need a simple way to block.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2003 03:10 AM
08-13-2003 03:10 AM
Re: Hosts file Hellllpppppp!!!!!!!
change the line "hosts" in nsswitch.conf to "files dns". Like this, it first checks /etc/hosts, if it doesn't find the hostname there, it uses dns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2003 06:32 AM
08-13-2003 06:32 AM
Re: Hosts file Hellllpppppp!!!!!!!
here is the nsswitch conf.
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files nisplus
shadow: files nisplus
group: files nisplus
#hosts: db files nisplus nis dns
hosts: files nisplus dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files nisplus
rpc: files
services: files nisplus
netgroup: files nisplus
publickey: nisplus
automount: files nisplus
aliases: files nisplus
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2003 02:55 AM
08-14-2003 02:55 AM
Re: Hosts file Hellllpppppp!!!!!!!
2. If it is - then set it to bypass the proxy for these "bad" URLs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2003 11:45 AM
08-14-2003 11:45 AM
Re: Hosts file Hellllpppppp!!!!!!!
The other thing that might be a problem is multiple line entries for 127.0.0.1. For your example in your original post, consolidate it all on one line, like:
127.0.0.1 localhost.localdomain localhost www.doubleclick.com
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2003 02:07 PM
08-17-2003 02:07 PM
Re: Hosts file Hellllpppppp!!!!!!!
127.0.0.1 localhost.localdomain localhost # 0
I can't for the life of me grasp why #0 is being used. Adding the site I wish to block after the #0---- how will it work???
Boy do i feel dumb