localhost mapped to incorrect ip :( - BSD

This is a discussion on localhost mapped to incorrect ip :( - BSD ; Hi I have a strange problem on my OpenBSD box. localhost seem to be mapped to an incorrect ip address. (or for soem other reason) # ping localhost PING localhost.rby.se (85.228.196.87): 56 data bytes --- localhost.rby.se ping statistics --- 2 ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: localhost mapped to incorrect ip :(

  1. localhost mapped to incorrect ip :(

    Hi

    I have a strange problem on my OpenBSD box.
    localhost seem to be mapped to an incorrect ip address. (or for soem
    other reason)

    # ping localhost
    PING localhost.rby.se (85.228.196.87): 56 data bytes
    --- localhost.rby.se ping statistics ---
    2 packets transmitted, 0 packets received, 100.0% packet loss

    So localhost gets expanded to localhost.rby.se (rby.se is my domain)
    Then it seem to be resolved by the DNS. I am totally confused

    I am thankful for any help

    Below is the output from some standard commands:
    # ifconfig -a
    lo0: flags=8049 mtu 33208
    groups: lo
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
    inet 127.0.0.1 netmask 0xff000000
    vr0: flags=8843 mtu 1500
    lladdr 00:05:5d:0c:fd:e4
    groups: egress
    media: Ethernet autoselect (100baseTX full-duplex)
    status: active
    inet6 fe80::205:5dff:fe0c:fde4%vr0 prefixlen 64 scopeid 0x1
    inet 192.168.0.5 netmask 0xffffff00 broadcast 192.168.0.255
    enc0: flags=0<> mtu 1536



    # cat /etc/hosts
    # $OpenBSD: hosts,v 1.11 2002/09/26 23:35:51 krw Exp $
    #
    # Host Database
    #
    # RFC 1918 specifies that these networks are "internal".
    # 10.0.0.0 10.255.255.255
    # 172.16.0.0 172.31.255.255
    # 192.168.0.0 192.168.255.255
    #
    ::1 localhost.rby.se localhost
    27.0.0.1 localhost.rby.se localhost
    ::1 whiterussian.rby.se whiterussian
    127.0.0.1 whiterussian.rby.se whiterussian

    # cat /etc/hostname.vr0
    dhcp

    # cat /etc/hostname.lo0
    127.0.0.1 localhost

    # cat /etc/resolv.conf
    nameserver 192.168.0.1

    $ cat /etc/hosts
    # $OpenBSD: hosts,v 1.11 2002/09/26 23:35:51 krw Exp $
    #
    # Host Database
    #
    # RFC 1918 specifies that these networks are "internal".
    # 10.0.0.0 10.255.255.255
    # 172.16.0.0 172.31.255.255
    # 192.168.0.0 192.168.255.255
    #
    ::1 localhost.rby.se localhost
    127.0.0.1 localhost.rby.se localhost
    ::1 whiterussian.rby.se whiterussian
    127.0.0.1 whiterussian.rby.se whiterussian

    Thankful for any help
    /Jens

  2. Re: localhost mapped to incorrect ip :(

    jens@zekra.se wrote in news:d04ac5ab-d756-4c75-938f-0a88fba70157@
    8g2000hse.googlegroups.com:

    > # cat /etc/resolv.conf
    > nameserver 192.168.0.1


    since you run your own dns, do you have the standard elements in
    named.conf?

    i.e. for named

    zone "localhost" {
    type master;
    file "standard/localhost";
    allow-transfer { localhost; };
    };

    and

    # cat standard/localhost
    ; $OpenBSD: db.localhost,v 1.4 2008/01/03 21:20:25 jakob Exp $

    $ORIGIN localhost.
    $TTL 6h

    @ IN SOA localhost. root.localhost. (
    1 ; serial
    1h ; refresh
    30m ; retry
    7d ; expiration
    1h ) ; minimum

    NS localhost.
    A 127.0.0.1
    AAAA ::1

  3. Re: localhost mapped to incorrect ip :(

    On 22 Maj, 09:32, "Peter Strömberg" wrote:
    > j...@zekra.se wrote in news:d04ac5ab-d756-4c75-938f-0a88fba70157@
    > 8g2000hse.googlegroups.com:
    >
    > > # cat /etc/resolv.conf
    > > nameserver 192.168.0.1

    >
    > since you run your own dns, do you have the standard elements in
    > named.conf?
    >
    > i.e. for named
    >
    > zone "localhost" {
    > * * * * type master;
    > * * * * file "standard/localhost";
    > * * * * allow-transfer { localhost; };
    >
    > };
    >
    > and
    >
    > # cat standard/localhost
    > ; $OpenBSD: db.localhost,v 1.4 2008/01/03 21:20:25 jakob Exp $
    >
    > $ORIGIN localhost.
    > $TTL 6h
    >
    > @ * * * IN * * *SOA * * localhost. root.localhost. (
    > * * * * * * * * * * * * 1 * * * ; serial
    > * * * * * * * * * * * * 1h * * *; refresh
    > * * * * * * * * * * * * 30m * * ; retry
    > * * * * * * * * * * * * 7d * * *; expiration
    > * * * * * * * * * * * * 1h ) * *; minimum
    >
    > * * * * * * * * NS * * *localhost.
    > * * * * * * * * A * * * 127.0.0.1
    > * * * * * * * * AAAA * *::1


    Yes, this looks exactly as in my files. Any other ideas?
    Thanks for the quick reply

    BR/
    Jens

  4. Re: localhost mapped to incorrect ip :(

    On 22 Maj, 09:32, "Peter Strömberg" wrote:
    > j...@zekra.se wrote in news:d04ac5ab-d756-4c75-938f-0a88fba70157@
    > 8g2000hse.googlegroups.com:
    >
    > > # cat /etc/resolv.conf
    > > nameserver 192.168.0.1

    >
    > since you run your own dns, do you have the standard elements in
    > named.conf?
    >
    > i.e. for named
    >
    > zone "localhost" {
    > * * * * type master;
    > * * * * file "standard/localhost";
    > * * * * allow-transfer { localhost; };
    >
    > };
    >
    > and
    >
    > # cat standard/localhost
    > ; $OpenBSD: db.localhost,v 1.4 2008/01/03 21:20:25 jakob Exp $
    >
    > $ORIGIN localhost.
    > $TTL 6h
    >
    > @ * * * IN * * *SOA * * localhost. root.localhost. (
    > * * * * * * * * * * * * 1 * * * ; serial
    > * * * * * * * * * * * * 1h * * *; refresh
    > * * * * * * * * * * * * 30m * * ; retry
    > * * * * * * * * * * * * 7d * * *; expiration
    > * * * * * * * * * * * * 1h ) * *; minimum
    >
    > * * * * * * * * NS * * *localhost.
    > * * * * * * * * A * * * 127.0.0.1
    > * * * * * * * * AAAA * *::1


    Another thing. This error appeared on my fresh install.
    During installation the network failed to configure because I was not
    able to connect an ethernet cable to the computer.
    I configued it afterwards by adding the hostname.* files.
    The point is that even before I begun running named on the computer
    this failed. 192.168.0.1 is my broadband router and it doesnt seem to
    have any issues. It worked before the reinstall and my other computers
    are able to ping localhost without pronlems.

    Thanks again
    BR/
    Jens

  5. Re: localhost mapped to incorrect ip :(

    On May 21, 10:14 am, j...@zekra.se wrote:
    > Hi
    >
    > I have a strange problem on my OpenBSD box.
    > localhost seem to be mapped to an incorrect ip address. (or for soem
    > other reason)
    >
    > # ping localhost
    > PING localhost.rby.se (85.228.196.87): 56 data bytes
    > --- localhost.rby.se ping statistics ---
    > 2 packets transmitted, 0 packets received, 100.0% packet loss
    >
    > So localhost gets expanded to localhost.rby.se (rby.se is my domain)
    > Then it seem to be resolved by the DNS. I am totally confused
    >
    > # cat /etc/resolv.conf
    > nameserver 192.168.0.1


    add lookup file bind to resolv.conf

  6. Re: localhost mapped to incorrect ip :(

    On May 28, 8:52*pm, ted.unan...@gmail.com wrote:
    > On May 21, 10:14 am, j...@zekra.se wrote:
    >
    >
    >
    > > Hi

    >
    > > I have a strange problem on my OpenBSD box.
    > > localhost seem to be mapped to an incorrect ip address. (or for soem
    > > other reason)

    >
    > > # ping localhost
    > > PING localhost.rby.se (85.228.196.87): 56 data bytes
    > > --- localhost.rby.se ping statistics ---
    > > 2 packets transmitted, 0 packets received, 100.0% packet loss

    >
    > > So localhost gets expanded to localhost.rby.se (rby.se is my domain)
    > > Then it seem to be resolved by the DNS. I am totally confused

    >
    > > # cat /etc/resolv.conf
    > > nameserver 192.168.0.1

    >
    > add lookup file bind to resolv.conf


    Thank you! That solved the problem !

    BR/
    Jens

+ Reply to Thread