Can someone please post their /etc/hosts file?

I copied a hosts file from another machine running a different distro and now certain applications are giving DNS errors, probably related to loopback addresses. Can someone post their default suse /etc/hosts file?

What version OpenSUSE? But generally these are the most important lines:

127.0.0.1 localhost
127.0.0.2 host.example.com host
a.b.c.d host.example.com host

where a.b.c.d is the address of your primary Ethernet interface.

hosts This file describes a number of hostname-to-address

mappings for the TCP/IP subsystem. It is mostly

used at boot time, when no name servers are running.

On small systems, this file can be used instead of a

“named” name server.

Syntax:

IP-Address Full-Qualified-Hostname Short-Hostname

127.0.0.1 localhost

special IPv6 addresses

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 BigBoy.site BigBoy
192.168.1.1 Tux Tux
10.10.10.8 laptop

Below is a small (very tiny) part of the hosts file I use, which actually totals 15,695 lines. It is automatically downloaded once a week, incorporated into my local entries, and it is used primarily to block unwanted sites.

You can use a HOSTS file to block ads, banners, 3rd party Cookies, 3rd party page counters, web bugs, and even most hijackers. This is accomplished by blocking the connection(s) that supplies these little gems. The Hosts file is loaded into memory (cache) at startup, so there is no need to turn on, adjust or change any settings. Your OS automatically looks for the existence of a HOSTS file and if found, checks the HOSTS file first (before asking the DNS servers) for entries to the web page you just requested. The 127.0.0.1 is considered the location of your computer, so when an entry listed in the MVPS HOSTS file is requested on a page you are viewing, your computer thinks 0.0.0.0 is the location of the file. When this file is not located it skips onto the next file and thus the ad server is blocked from loading the banner, Cookie, or some unscrupulous ActiveX, or javascript file. More recent versions of the hosts file use 0.0.0.0 to block instead of using 127.0.0.1 previously used, getting the same results. Works on any OS which uses a hosts file.

Example - the following entry 127.0.0.1 ad.doubleclick.net blocks all files supplied by that DoubleClick Server to the web page you are viewing. This also prevents the server from tracking your movements. Why? … because in certain cases “Ad Servers” like Doubleclick (and many others) will try silently to open a separate connection on the webpage you are viewing, record your movements then yes … follow you to additional sites you may visit.

Using a well designed HOSTS file can speed the loading of web pages by not having to wait for these ads, annoying banners, hit counters, etc. to load. This also helps to protect your Privacy and Security by blocking sites that may track your viewing habits, also known as “click-thru tracking” or Data Miners. Simply using a HOSTS file is not a cure-all against all the dangers on the Internet, but it does provide another very effective “Layer of Protection”.

In case you’re wondering … this all happens in microseconds, which is much faster than trying to fetch a file from half way around the world. Another great feature of the HOSTS file is that it is a two-way file, meaning if some parasite does get into your system (usually bundled with other products) the culprit can not get out (call home) as long as the necessary entries exist. This is why it’s important to keep your HOSTS file up to Date.

The site which supplies this hosts file is aimed primarily at Windows users, but there are instructions on how to get Linux to automatically download and install the updates periodically. I’ve been using this hosts file system for a few years now, and it works beautifully!

Have lots of fun! rotfl!

# This MVPS HOSTS file is a free download from:            #
# http://winhelp2002.mvps.org/hosts.htm                    #
#                                                          #
# Notes: The Operating System does not read the "#" symbol #
# You can create your own notes, after the # symbol        #
# This *must* be the first line: 127.0.0.1     localhost   #
#                                                          #
#**********************************************************#
# -------------- Updated: January-08-2014 ---------------- #
#**********************************************************#
#                                                          #
# Disclaimer: this file is free to use for personal use    #
# only. Furthermore it is NOT permitted to copy any of the #
# contents or host on any other site without permission or #
# meeting the full criteria of the below license terms.    #
#                                                          #
# This work is licensed under the Creative Commons         #
# Attribution-NonCommercial-ShareAlike License.            #
# http://creativecommons.org/licenses/by-nc-sa/3.0/        #
#                                                          #
# Entries with comments are all searchable via Google.     #

127.0.0.1 localhost

::1 localhost #[IPv6]

# [Start of entries generated by MVPS HOSTS]
#
# [Misc A - Z]
0.0.0.0 fr.a2dfp.net
0.0.0.0 m.fr.a2dfp.net
0.0.0.0 mfr.a2dfp.net
0.0.0.0 ad.a8.net
0.0.0.0 asy.a8ww.net
0.0.0.0 abcstats.com
0.0.0.0 a.abv.bg
0.0.0.0 adserver.abv.bg
0.0.0.0 adv.abv.bg
0.0.0.0 bimg.abv.bg
0.0.0.0 ca.abv.bg
0.0.0.0 www2.a-counter.kiev.ua
0.0.0.0 track.acclaimnetwork.com
0.0.0.0 accuserveadsystem.com
0.0.0.0 www.accuserveadsystem.com
0.0.0.0 achmedia.com
0.0.0.0 csh.actiondesk.com
0.0.0.0 ads.activepower.net
0.0.0.0 app.activetrail.com
0.0.0.0 stat.active24stats.nl #[Tracking.Cookie]

**[SNIP!!!] (Omitting well over 15,600 lines!)** 

0.0.0.0 simg.zedo.com
0.0.0.0 ss1.zedo.com
0.0.0.0 ss2.zedo.com
0.0.0.0 ss7.zedo.com
0.0.0.0 xads.zedo.com
0.0.0.0 yads.zedo.com
0.0.0.0 www.zedo.com #[Adware.RaxSearch]
0.0.0.0 c1.zxxds.net #[g1.panthercdn.com]
0.0.0.0 c7.zxxds.net
# [Zero Lag][AS20093][67.201.0.0 - 67.201.63.255]
0.0.0.0 ads.namiflow.com
0.0.0.0 adunit.namiflow.com
# [Zero Lag][AS20093][68.71.240.0 - 68.71.255.255]
0.0.0.0 rt.udmserve.net
# [Zero Lag][AS20093][72.37.216.0 - 72.37.217.255]
0.0.0.0 www.stickylogic.com
0.0.0.0 www.winadiscount.com #[Dr.Web.Adware.Xbarre]
0.0.0.0 www.winaproduct.com
# [end of entries generated by MVPS HOSTS]
127.0.0.1		livingroom.behne.us livingroom localhost
185.19.104.70        eztv.it      eztv

On 01/13/2014 05:56 PM, rwbehne1 pecked at the keyboard and wrote:
> grg32;1927536 Wrote:
>> I copied a hosts file from another machine running a different distro
>> and now certain applications are giving DNS errors, probably related to
>> loopback addresses. Can someone post their default suse /etc/hosts file?
>
> Below is a small (very tiny) part of the hosts file I use, which
> actually totals 15,695 lines. It is automatically downloaded once a
> week, incorporated into my local entries, and it is used primarily to
> block unwanted sites.
>
> You can use a HOSTS file to block ads, banners, 3rd party Cookies, 3rd
> party page counters, web bugs, and even most hijackers. This is
> accomplished by blocking the connection(s) that supplies these little
> gems. The Hosts file is loaded into memory (cache) at startup, so there
> is no need to turn on, adjust or change any settings. Your OS
> automatically looks for the existence of a HOSTS file and if found,
> checks the HOSTS file first (before asking the DNS servers) for
> entries to the web page you just requested.

Just an FYI. :slight_smile:

Only if the default setting in:



/etc/nsswitch.conf:hosts:       files mdns_minimal [NOTFOUND=return] dns


is used. If you change this setting the order of lookup will change.

Ken