I'm struggling with /etc/hosts

i know it's supposed to be something like
127.0.0.1      banana.domain.org   localhost.localdomain      localhost    banana
is that the number to use for everyone, or do i have a number i don't know anything about?
i assume banana is to be replaced by the name of my computer, "fuscianator" and not my username, "fuscia", is that correct?
what's this domain.org stuff? do i really just literally put down "domain.org"?
do i really only have to replace "banana" with "fuscianator" and leave everything else the same?
update: i went ahead and did the last thing, anyway. so far, nothing's blown up, though, nothing's all that different.
Last edited by fuscia (2008-06-30 07:58:19)

muunleit wrote:
I think you have read this => Beginners Guide - hosts, did you?
"banana" has to be replaced with your computers name.
If you use dhcp, this should be all you need to change in hosts.
i do use dhcp, so i don't need that 'domain.org' thing. thanks.

Similar Messages

  • Adblocking with /etc/hosts and connman

    I'm using the hostsblock package to create a custom hosts file.
    Everything works fine with netctl+dnsmasq, but it doesn't with connman.
    It seems connman redirects all traffic to itself by writing "nameserver 127.0.0.1" in /etc/resolv.conf
    I can't ping anything. Even with a vanilla hosts file. Adding some other nameserver like "8.8.8.8" fixes the name resolving, but doesn't block ads. Dnsmasq is not working at the same time as connman.
    Connman has a builtin dns caching server, but I can't find any documentation on how it works/how can it be configured.
    Ideas?
    Configuring my service profile with both nameservers fixed it. Isn't there a way to set a global nameserver?
    Last edited by el mariachi (2014-01-19 13:55:58)

    The best documentation I've found is the Connman API documentation.   You might find the API document at this link interesting: http://git.kernel.org/cgit/network/conn … xt?id=HEAD.  Particulaly the section in properties called Nameservers and Nameservers.Configuration.  It definitely answers your question about global nameservers.  This is the API documentation, but I've found it very helpful in explaining what I might need to do using connmanctl.
    I'm not sure if any of the GUI programs would implement the feature you need, but I just took a look at connmanctl and this looked like it may have worked:
    $ connmanctl
    connmanctl> config wifi_00183991268a_426962624e65742d576972656c657373_managed_psk --nameservers 127.255.255.255
    connmanctl> exit
    Of course you will need to replace the service with name with the one that you are using on your system.  I also picked a nameserver I knew was wrong so I could see if the command actually "took".  The nameserver changed did seem to take.

  • /etc/hosts Prank Gone Wrong, need help restoring files to original

    Some friends were messing around on my computer and playing a joke on me
    using the sudo pico /etc/hosts command they were able to send me from sites I wanted to visit, like facebook, to sites I didnt want to visit..
    what they wrote was:
    67.55.108.167 facebook.com
    67.55.108.167 www.facebook.com
    I have since deleted it but the every time I go to facebook from another sight I am still redirected. The odd part is that I can go to facebook, but only after ive been redirected. What I mean is, I try to go to facebook, get redirected, then try to go to facebook right away. If I do that it works fine. Also Safari is the only internet browser that is effected. Opera and Firefox are both un effected. I tried uninstalling and reinstalling safari as well as using the same command as they did, but in reverse. Still no luck. Any suggestion? Unfortunately they didnt back up the /etc/hosts before they edited it

    You might also want to flush your DNS cache
    dscacheutil -flushcache
    Also make that password change.
    Look in System Preferences -> Accounts to see if your friends added any new admin accounts or granted an existing account admin access.
    If they know how to create ssh-keygen keys, they could have deposited a key in your /private/var/root/.ssh/authorized_keys2 file.
    There are any number of additional tricks they could have done, if they had admin access. I'm just scratching the surface.
    If you do trust these friends, then most likely they just played with /etc/hosts. If they are the kind of friends that get malicious, I would consider the "nuke and pave" reinstall.

  • How to use /etc/hosts file

    how to get Mac OS "X" 10.6.x to use /etc/hosts file and/or /etc/resolv.conf file(s) (ala Unix-style); instead of using some other mechanism?

    I 'thought' that SnowLeopard (somewhere in the "Support" arena) told me that 10.6 (SnowLeopard) did NOT use /etc/hosts, but I am corrected, and now understand through a number of replies here (Apple-Support-Discussions) and other responses that SnowLeopard (10.6 (I'm at 10.6.7) DOES USE /etc/hosts... - AND YES _ I'm attempting to prevent some things, and have some web-site-development-things go to a local-server, etc. etc. etc. - but - I guess my 'answer' was supplied by a number of people and that my ...nix background and my familiarity with /etc/hosts is fine and working well...
    thanks to one and all who helped! - I'm now also well-acquainted with dscl, dscacheutil, and other such utilities...
    THANKSSSSS!!!!!!!

  • Block URL's with /private/etc/hosts

    Hello,
    i need to edit /private/etc/hosts in 100 mac's on my network.
    the objective is to block their access to some websites, using this basic edit on hosts file.
    is there a way to do this edit and add blocked urls, or to send a new hosts file, using ARD?
    thks

    hello, i have edit my hosts file like this:
    +# Host Database+
    +# localhost is used to configure the loopback interface+
    +# when the system is booting. Do not change this entry.+
    +127.0.0.1 localhost+
    +127.0.0.1 rapidshare.com+
    +127.0.0.1 rapidshare.de+
    +127.0.0.1 megaupload.com+
    +127.0.0.1 limewire.com+
    +127.0.0.1 vuze.com+
    +127.0.0.1 acquisitionx.com+
    +127.0.0.1 easy-share.com+
    +127.0.0.1 depositfiles.com+
    +127.0.0.1 mediafire.com+
    +127.0.0.1 38.114.196.10+
    +127.0.0.1 78.140.135.10+
    +127.0.0.1 78.140.135.26+
    +127.0.0.1 78.140.135.27+
    +127.0.0.1 78.140.135.49+
    +127.0.0.1 88.208.23.39+
    +127.0.0.1 85.17.216.46+
    +127.0.0.1 216.92.69.218+
    +127.0.0.1 81.19.29.23+
    +127.0.0.1 64.156.82.109+
    +127.0.0.1 209.222.148.136+
    +127.0.0.1 209.222.148.137+
    +127.0.0.1 209.222.148.138+
    +127.0.0.1 209.222.148.139+
    +127.0.0.1 209.222.148.135+
    +127.0.0.1 130.117.156.250+
    +127.0.0.1 195.122.131.16+
    +127.0.0.1 195.122.131.17+
    +127.0.0.1 195.122.131.18+
    +127.0.0.1 195.122.131.17+
    +127.0.0.1 195.122.131.18+
    +127.0.0.1 195.122.131.19+
    +127.0.0.1 195.122.131.20+
    +127.0.0.1 195.122.131.21+
    +127.0.0.1 195.122.131.22+
    +127.0.0.1 195.122.131.2+
    +127.0.0.1 195.122.131.3+
    +127.0.0.1 195.122.131.4+
    +127.0.0.1 195.122.131.5+
    +127.0.0.1 195.122.131.6+
    +127.0.0.1 195.122.131.7+
    +127.0.0.1 195.122.131.8+
    +127.0.0.1 195.122.131.9+
    +127.0.0.1 195.122.131.10+
    +127.0.0.1 195.122.131.11+
    +127.0.0.1 195.122.131.12+
    +127.0.0.1 195.122.131.13+
    +127.0.0.1 195.122.131.14+
    +127.0.0.1 195.122.131.15+
    +255.255.255.255 broadcasthost+
    +::1 localhost+
    +fe80::1%lo0 localhost+
    I have copy it to /etc/ and /private/etc/, replacing both hosts files.
    I reboot the machine, and try to enter sites with Safari and Firefox. Sometimes i cant enter (as required), sometimes i can.
    Do you have any idea why is this happening?

  • Unable to edit /etc/hosts with permission denied error

    [15:45:02][rabbie@sandnigga:~]# sudo cat /etc/hosts
    Password:
    cat: /etc/hosts: Permission denied
    [15:45:09][rabbie@sandnigga:~]#
    Basically that's my problem right there. I cant edit / view / change the hosts file on my macbook pro but I can delete it and create a new one. If I do delete it and create a new one, that new file then has the same problem only a few minutes later.
    Does anyone have any ideas ?
    I have also tried to change the ownership and permissions of the file:
    [15:45:09][rabbie@sandnigga:~]# ls -la /etc/hosts
    -rwxrwxrwx  1 root  wheel  290 18 Sep 20:38 /etc/hosts
    No luck.
    Thanks in advance for any help.

    Hey Bob,
    The hosts file is often edited and added to by network administrators as well as web developers to force your local computer to resolve DNS for sites whos DNS is not yet publicly available.
    I actually found the problem and root cause behind this. I installed BitDefender Antivirus on my MacBook Pro and the uninstall script did not successfully remove all settings / files. There were still some BitDefender files locking processes and files on my Mac and so I just ended up Wiping my drive and re-installing Mountain Lion.
    Thanks for your attempt to help anyway.

  • Adding the /etc/host.deny file like linux in solaris 10.

    Dears,
    I need to add a file which will works like the file of /etc/hosts.deny of Linux in Solaris.
    If it is possible in the same manner please let me know that, and if it need some other trick to deny a specific host to access the system please tell me the way to do that.
    Eagerly waiting to hear from you.
    BR//
    Sohel.

    IPfilter can deny a specific IP address access to the host - enable IPFilter with svcadm and edit the /etc/ipf/ipf.conf file to add the IP to block. An example could be:
    block in log quick on bnx0 proto tcp from 192.168.1.5/32 to any
    I use IPfilter to pass and block all sorts of specific IP addresses as well as block/allow specific ports (like only specific hosts can use port 22, ssh).

  • Network-profiles (1) and /etc/hosts

    Hi everyone,
    i've got a few network-profiles, especially in one network I have to use a static ip to connect to the internet. The only entry in the /etc/hosts which works correctly - without any error messages - for me, is
    192.168.0.99 localhost.localdomain myhost
    If I use something like 127.0.0.1 in front and simply add my hostname at the end, I can't connect with the Inet, unfortunately. I did not test it, but I'm pretty sure, that this host configuration won't work in any other network, where I get a dynamic IP from the DHCP. Is there a possibility to write the content of the /etc/hosts with netcfg, like the /etc/resolv.conf for example?
    MfG Skit

    Because you didn't specify what localhost was in your hosts file. It only knows of localhost.localdomain(does not imply 'localhost') and acer being the loopback.
    I think he understood that.
    'localhost' is universally understood as the loopback.
    this is some kind of 'magic' answer isn't it? the resolving doesn't come out as a miracle... and that is IMHO what needs explanation.
    his computer alone doesn't (obviously) get it because sure, it's not set. now what 'magic' makes it known when a cable is plugged in? the computer tries to reslove locally (via /etc/hosts), fails at it, and then asks the dns server about it. so I reckon the dns server is instructed on replying '127.0.0.1' for a 'localhost' hostname request. why so? because dns servers have an option to look at their local /etc/host for resolving before delegating to bigger servers, so the dns server certainly has localhost matching 127.0.0.1 in his /etc/host, and blindly replies accordingly, oblivious to the fact that he is replying about his 'own' 127.0.0.1 to someone else.
    Last edited by lloeki (2008-01-16 08:24:12)

  • Editing etc\hosts file on windows xp for apps. problem post installation.

    Hi all,
    I was able to install 11.5.10.2 apps on my win xp prof machine. During that process I had to edit the etc/hosts file in windows directory as a work around for that domain name field during installation. Also added the primary DNS suffix as 'suneel.com' . I gave the domain name as 'suneel.com' during installation. The RapidWiz is taking localhost as the system name and referring to this system as localhost.suneel.com, though the actual system name is 'websoft-xp' .
    The host file on Apps machine has the following entries:
    127.0.0.1 localhost
    127.0.0.1 localhost.suneel.com suneel.com
    127.0.0.1 websoft-xp.suneel.com
    So when I connect to apps login server from other systems in lan, I've to edit their hosts file and add an entry for localhost.suneel.com to point to its ip address or else the apps throws an error after logging in as operations/welcome using a different url say 192.168.1.4:8000 . Is there a way to get around this issue?
    More over I'm not able connect to VIS db from other systems. The oracle clients give an error 'No listner' at this address. (The original listener was listening at localhost.suneel.com:1521). So I tried to create a new listerner from Net Manager that actually listens at websoft-xp (the real system name) but it throws me an error 'A valid log file is required' while saving the network configuration and prevents me from saving the network configuration.
    Did I do something wrong with the hosts file during installation or did i miss any entries in that file thats causing this? Any solutions for the above problems will be appreciated?
    Thanks
    Suneel
    Message was edited by:
    suneelgv

    Well I tried that option but for some reason it didn't work for me. It kept giving the tns:connection closed error. Then I searched in metalink and found this note : Note:333158.1
    It suggested setting tcp.validnode_checking = no
    in sqlnet.ora. in
    F:\oracle\visdb\9.2.0\network\admin\VIS_websoft-xp
    And it works. Hope this helps someone facing a similar problem. Good luck.
    BTW how do I run autoconfig?
    Thanks,
    Suneel Gundlapalli

  • I mistakenly wiped my mac ox from my macbook and i'm struggling with getting it fixed or getting a new one to install.

    i mistakenly wiped my mac ox from my macbook and i'm struggling with getting it fixed or getting a new one to install. Can anyone help me?  thanks
    <Email Edited By Host>

    Restart the Mac and hold down Command+Option+R. Choose to reinstall OS X. The version of OS X your Mac came with will be installed.

  • Weblogic 7.0 sp4 failing to resolve from /etc/hosts on solaris 8

    Hello,
    I am facing a strange problem on one of the installations of weblogic 7 in using
    the JNDI lookup. This weblogic instance throws me the following exception whenever
    I try to lookup through JNDI a remote EJB;
    weblogic.utils.NestedError: This address was valid earlier, but now we get: -
    with nested exception:
    [java.net.UnknownHostException: vip1.i11.gmbpws043.gmgwh.net]
    java.net.UnknownHostException: vip1.i11.gmbpws043.gmgwh.net
    at java.net.InetAddress.getAllByName0(InetAddress.java:566)
    at java.net.InetAddress.getAllByName0(InetAddress.java:535)
    at java.net.InetAddress.getByName(InetAddress.java:444)
    at weblogic.rjvm.JVMID.address(JVMID.java:396)
    at weblogic.rjvm.ConnectionManager.setRemoteChannels(ConnectionManager.java:1709)
    at weblogic.rjvm.ConnectionManagerServer.handleIdentifyResponse(ConnectionManagerServer.java:506)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:766)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:649)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:813)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:708)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    --------------- nested within: ------------------
    weblogic.utils.NestedError: This address was valid earlier, but now we get: -
    with nested exception:
    [java.net.UnknownHostException: vip1.i11.gmbpws043.gmgwh.net]
    at weblogic.rjvm.JVMID.address(JVMID.java:403)
    at weblogic.rjvm.ConnectionManager.setRemoteChannels(ConnectionManager.java:1709)
    at weblogic.rjvm.ConnectionManagerServer.handleIdentifyResponse(ConnectionManagerServer.java:506)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:766)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:649)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:813)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:708)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    >
    I have the corresponding entries in the /etc/hosts file on the machine for these
    host names. The telnet and a standalone java client can resolve these host names
    but not weblogic. Can anybody give some hints to fix this issue? The same code
    and same version of the weblogic work fine on other two machines.
    I have attached the application log file for the exact error messages.
    Many thanks ...
    VInay
    [WLSError.txt]

    Hi,
    We are farcing a similar issue, pls let me know if you have found a solution for
    following issue
    Regards,
    Mandar
    "Vinay Alva" <[email protected]> wrote:
    >
    >
    >
    Hello,
    I am facing a strange problem on one of the installations of weblogic
    7 in using
    the JNDI lookup. This weblogic instance throws me the following exception
    whenever
    I try to lookup through JNDI a remote EJB;
    weblogic.utils.NestedError: This address was valid earlier, but now we
    get: -
    with nested exception:
    [java.net.UnknownHostException: vip1.i11.gmbpws043.gmgwh.net]
    java.net.UnknownHostException: vip1.i11.gmbpws043.gmgwh.net
    at java.net.InetAddress.getAllByName0(InetAddress.java:566)
    at java.net.InetAddress.getAllByName0(InetAddress.java:535)
    at java.net.InetAddress.getByName(InetAddress.java:444)
    at weblogic.rjvm.JVMID.address(JVMID.java:396)
    at weblogic.rjvm.ConnectionManager.setRemoteChannels(ConnectionManager.java:1709)
    at weblogic.rjvm.ConnectionManagerServer.handleIdentifyResponse(ConnectionManagerServer.java:506)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:766)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:649)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:813)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:708)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    --------------- nested within: ------------------
    weblogic.utils.NestedError: This address was valid earlier, but now we
    get: -
    with nested exception:
    [java.net.UnknownHostException: vip1.i11.gmbpws043.gmgwh.net]
    at weblogic.rjvm.JVMID.address(JVMID.java:403)
    at weblogic.rjvm.ConnectionManager.setRemoteChannels(ConnectionManager.java:1709)
    at weblogic.rjvm.ConnectionManagerServer.handleIdentifyResponse(ConnectionManagerServer.java:506)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:766)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:649)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:813)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:708)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
    >
    I have the corresponding entries in the /etc/hosts file on the machine
    for these
    host names. The telnet and a standalone java client can resolve these
    host names
    but not weblogic. Can anybody give some hints to fix this issue? The
    same code
    and same version of the weblogic work fine on other two machines.
    I have attached the application log file for the exact error messages.
    Many thanks ...
    VInay

  • Entry in /etc/hosts.allow for insecure VNC?

    I read the ssh wiki article which teaches to add an entry to /etc/hosts.allow for sshd.  I am know that tunneling vnc through sshd is the way to go security wise, however, there are cases where I need to switch on un-encrypted vnc for the purposes of sharing my X11 session with family members.  Anyway, my question deals with an entry in the /etc/hosts.allow for gnome's desktop sharing (which is vnc as I understand it).  Does anyone know the syntax to allow vnc for any incoming connection (default port of 5900).
    I have tried:
    vino: ALL
    Xvnc: ALL
    X11vnc: ALL
    None of which worked.
    Thanks!

    when I don't know what's the name of the process listening to specific port, I always execute
    netstat -tnlp
    to get the proper processes' names.

  • /etc/hosts Private Host Name Fully Qualified Domain Name does it matter?

    During installation of 11gR1 on Windows 2003 the examples in the installation guide show adding the Private IP and host name to /etc/hosts
    However they only add the short name, racnode1, not Fully qualified Domain Name (FQDN), racnode1.mycompany.com
    e.g.
    10.0.0.1 racnode1
    10.0.0.2 racnode2
    Later when installing the Clusterware it then expects to see the FQDN, racnode1.mycompany.com, of course you can modify this and remove the domain name and continue. OR go back and add the FQDN in /etc/hosts
    e.g.
    10.0.0.1 racnode1 racnode1.mycompany.com
    10.0.0.2 racnode2 racnode2.mycompany.com
    What is the best practice? Currently my company is just dropping the FQDN from the name during the install, my instinct is instead to add the FQDN to the /etc/host in the first place.
    Does anyone have a recommendation or experience with either situation?
    Will (using/ or not using) the FQDN cause me issues in the future?

    If it's a problem, the assistent will tell you :-)
    I don't think it's a problem.
    Please mind that the first entry will be the name of the ip address, if it's not in DNS and a utility tries to get the name. (that's the reason 127.0.0.1 resolves to localhost.localdomain, it's the first entry in /etc/hosts)

  • I cannot locate /private/etc/hosts.

      I am trying to look at hosts file for clues as to why MAMP is not working. but this entire directory structure is not there.  I feel quite confused because I have worked with the hosts file before. Any advice is extremely appreciated.

    I did sudo nano /private/etc/hosts.  it wasn't working before, but now it is!  Very weird.  Any ideas about setting up mamp and why it world not be working?

  • I'm sorry to bother you guys, but this is all new to me! i'm wanting to place my face on another persons photo as a gag. i've been struggling with this all day! could someone explain to me how this is done, in language i can understand???  thanks in advan

    I'm really sorry to bother you guys, but this is all new to me! i'm trying to put my face on another persons photo as a gag! i have been struggling with this all day! can anyone explain to me how  this is done in language i can understand???  thanks in advance!

    What software do you own?  Give details, please.
    Photoshop is a professional level application that makes no apologies for its very long and steep learning curve.
    It's not something you can learn in a forum, question by question.  Teaching someone Photoshop from scratch exceeds the scope of this or any other forum.
    The process involves isolating your face, by selecting it and deleting the unwanted parts around your face or with layer masks, then placing it as a new layer on top of your target image, making sure it's the right size, color, lighting, etc.  Google for tutorials on any of those elements you are unfamiliar with,

Maybe you are looking for