• telnet 0 vs telnet `hostname` vs telnet 127.0.0.1

    From hambone318@googlemail.com@21:1/5 to Legend on Wed Aug 23 19:20:16 2017
    On Tuesday, October 5, 1999 at 12:00:00 AM UTC-7, Legend wrote:
    Hello all,

    I have a question in networking

    What does the command telnet 0 do? I know it will telnet to itself, but does it go through anything? I mean gateway and anything else? How is it
    different from telnet-ing to its nodename? Also What about "telnet 127.0.0.1?" All these telnet do the same thing but are they different? and How?

    Regards,


    Benny Pei

    Hey, I'm not Linux guru either but I remember coming by some instructions on how to change the address for telnet 0. I believe the difference between telnet 0 and 127.0.0.1 is that you can define 0 as anything you want to. The instructions are below.

    Overview
    With the newer versions of iDX, the telnet 0 option may not work because the “hosts” file is lacking the entry to point the “0” portion of the command back to the home address of 127.0.0.1. This issue can be resolved by editing the “hosts”
    file using the vi command.

    Modifying the “hosts” file

    1. Log in to the machine and ensure you have the root access, as indicated by the # prompt, using the correct login and password. Once at the # prompt, follow the directions below:

    Type cd /etc/ and hit enter (there is a space between the cd and the /etc/).

    #cd /etc/

    Type vi hosts and hit enter.

    #vi hosts

    Note: DO NOT MODIFY THE FIRST LINE!!

    2. Arrow down to the last entry and using the arrow keys, move to the end of the line. Once there, type the letter “i”, and arrow to the right one more space. Then hit the enter key and then add the following:

    127.0.0.1 localhost 0

    Hit the escape key.
    Type :wq! and press the enter key.
    :wq!
    This will save the updated hosts file, and the telnet 0 function will be restored.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to hambone318@googlemail.com on Thu Aug 24 11:49:56 2017
    hambone318@googlemail.com wrote:

    On Tuesday, October 5, 1999 at 12:00:00 AM UTC-7, Legend wrote:
    Hello all,

    I have a question in networking

    What does the command telnet 0 do? I know it will telnet to itself, but
    does it go through anything? I mean gateway and anything else? How is it
    different from telnet-ing to its nodename? Also What about "telnet
    127.0.0.1?" All these telnet do the same thing but are they different?
    and How?

    Regards,


    Benny Pei

    Hey, I'm not Linux guru either but I remember coming by some instructions
    on how to change the address for telnet 0. I believe the difference
    between telnet 0 and 127.0.0.1 is that you can define 0 as anything you
    want to. The instructions are below.
    [snip]

    First off, you replied (today, Wednesday 23 August 2017 22:20:16) to a
    question posted almost 18 years ago, on Tuesday, October 5, 1999. I
    sincerely doubt that the OP cares about the answer any more.

    Secondly, your suggested "fix" (snipped, both for brevity and accuracy) is incorrect; in /etc/hosts, the "hostname" part (including aliases) must begin with an alphabetic character; 0 is not a hostname or an alias, and breaks
    the format and functionality of /etc/hosts

    Thirdly, "telnet 0" is a valid telnet command to connect to IPv4 address 0.0.0.0. On Unix systems, IPv4 address 0.0.0.0 is a special-case address, reserved for "any local IP address". Telnet will, in this case, connect to
    the first available /local/ IP address accessable telnet server. If the OP
    has a public IP address on his system, and the loopback 127.0.0.1, and
    telnet is accessable from either address, "telnet 0" will connect to one of those two addresses. If the OP's "telnet 0" does not connect to any telnet server, changing the /etc/hosts will not solve his problem.

    --
    Lew Pitcher
    "In Skills, We Trust"
    PGP public key available upon request

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Moe Trin@21:1/5 to Lew Pitcher on Fri Aug 25 03:43:16 2017
    On Thu, 24 Aug 2017, in the Usenet newsgroup comp.unix.admin, in article <onmsb2$qtn$1@dont-email.me>, Lew Pitcher wrote:

    hambone318@googlemail.com wrote:

    On Tuesday, October 5, 1999 at 12:00:00 AM UTC-7, Legend wrote:

    uhuh

    What does the command telnet 0 do? I know it will telnet to itself,
    but does it go through anything? I mean gateway and anything else?
    How is it different from telnet-ing to its nodename? Also What about
    "telnet 127.0.0.1?" All these telnet do the same thing but are they
    different? and How?

    Hey, I'm not Linux guru either

    Actually, it's a networking question, rather than *nix

    First off, you replied (today, Wednesday 23 August 2017 22:20:16) to a >question posted almost 18 years ago, on Tuesday, October 5, 1999. I
    sincerely doubt that the OP cares about the answer any more.

    PICKY PICKY PICKY!

    the "hostname" part (including aliases) must begin with an alphabetic >character; 0 is not a hostname or an alias, and breaks the format and >functionality of /etc/hosts

    Welll.... we'll ignore IDN for now - technically, RFC0952 was based on
    ASCII characters.

    On Unix systems, IPv4 address 0.0.0.0 is a special-case address,

    IPv4 address 0.0.0.0 is a special-case address - not limited to *nix

    See RFC6890 section 2.2.2 (which actually refers back to RFC1122 from
    1981). It means "This host on this network", and is a legal (though restricted) source address, but it's not a legal _destination_ address.
    "You can't get there from here." But the same token, 127.0.0.0/8 is
    also a special address (same reference). The exact behavior of a
    system is dependent on what's coded in the networking software ("the
    stack") of the operating system, but 0.0.0.0/8 and 127.0.0.0/8 are most
    often interpreted as meaning "me". If hambone318@googlemail.com
    isn't familiar with this notation, the "/8" means all addresses in the
    range "x.0.0.0" to "x.255.255.255". Try telnetting to 127.127.127.127
    and see what happens. (Of course few sane systems are running telnet
    rather than SSH, but hey!)

    Old guy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Moe Trin on Fri Aug 25 10:35:21 2017
    Moe Trin wrote:

    On Thu, 24 Aug 2017, in the Usenet newsgroup comp.unix.admin, in article <onmsb2$qtn$1@dont-email.me>, Lew Pitcher wrote:

    hambone318@googlemail.com wrote:

    On Tuesday, October 5, 1999 at 12:00:00 AM UTC-7, Legend wrote:

    uhuh

    What does the command telnet 0 do? I know it will telnet to itself,
    but does it go through anything? I mean gateway and anything else?
    How is it different from telnet-ing to its nodename? Also What about
    "telnet 127.0.0.1?" All these telnet do the same thing but are they
    different? and How?

    Hey, I'm not Linux guru either

    Actually, it's a networking question, rather than *nix

    First off, you replied (today, Wednesday 23 August 2017 22:20:16) to a >>question posted almost 18 years ago, on Tuesday, October 5, 1999. I >>sincerely doubt that the OP cares about the answer any more.

    PICKY PICKY PICKY!

    Duh

    the "hostname" part (including aliases) must begin with an alphabetic >>character; 0 is not a hostname or an alias, and breaks the format and >>functionality of /etc/hosts

    Welll.... we'll ignore IDN for now - technically, RFC0952 was based on
    ASCII characters.

    No. Here, I'm referring to the actual format of the /etc/hosts file, which hambone318 suggested editing. Specifically, in the part that I snipped, hambone318 suggested that the OP should add an alias to his localhost entry
    in /etc/hosts, changing
    127.0.0.1 localhost
    to
    127.0.0.1 localhost 0

    thus giving the "hostname" 0 an IP address of 127.0.0.1.

    I point out that this is not legal in /etc/hosts.
    "Host names may contain only alphanumeric characters, minus signs
    ("-"), and periods ("."). They must begin with an alphabetic character **---------------------------==============================================
    and end with an alphanumeric character. Optional aliases provide for
    name changes, alternate spellings, shorter hostnames, or generic hostnames
    (for example, localhost)."

    On Unix systems, IPv4 address 0.0.0.0 is a special-case address,

    IPv4 address 0.0.0.0 is a special-case address - not limited to *nix

    Since hambone318 was talking specifically about a Unix/Linux "fix" to an 18- year-old non-problem posted in comp.unix.admin, I decided to keep my remarks specific to Unix/Linux. Yes, I know about the RFC; I doubt that hambone318
    even knows how to spell RFC.

    See RFC6890 section 2.2.2 (which actually refers back to RFC1122 from
    1981). It means "This host on this network", and is a legal (though restricted) source address, but it's not a legal _destination_ address.
    "You can't get there from here." But the same token, 127.0.0.0/8 is
    also a special address (same reference). The exact behavior of a
    system is dependent on what's coded in the networking software ("the
    stack") of the operating system, but 0.0.0.0/8 and 127.0.0.0/8 are most
    often interpreted as meaning "me". If hambone318@googlemail.com
    isn't familiar with this notation, the "/8" means all addresses in the
    range "x.0.0.0" to "x.255.255.255". Try telnetting to 127.127.127.127
    and see what happens. (Of course few sane systems are running telnet
    rather than SSH, but hey!)

    Old guy

    --
    Lew Pitcher (also an old guy ;-)
    "In Skills, We Trust"
    PGP public key available upon request

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Moe Trin@21:1/5 to Lew Pitcher on Fri Aug 25 22:03:23 2017
    On Fri, 25 Aug 2017, in the Usenet newsgroup comp.unix.admin, in article <onpcb6$uob$1@dont-email.me>, Lew Pitcher wrote:

    Moe Trin wrote:

    Lew Pitcher wrote:

    First off, you replied (today, Wednesday 23 August 2017 22:20:16) to
    a question posted almost 18 years ago, on Tuesday, October 5, 1999.
    I sincerely doubt that the OP cares about the answer any more.

    PICKY PICKY PICKY!

    Duh

    It happens when the poster is using google rather than a regular news
    server. ;-} None the less, I was tempted to point the poster to the
    Linux Documentation Project - specifically the Networking-Overview-HOWTO
    and the NET3-4-HOWTO from that era. Hitting a search engine looking for
    those two strings may help. (Hmmm... sunsite is gone, and ibiblio.org
    is refusing a connection - well, tldp.org is still ok.)

    The Linux Networking Overview HOWTO
    Updated: Jul 2000. Overview of the networking capabilities of the
    Linux Operating System; provides pointers for further information
    and implementation details.

    Linux Networking HOWTO
    Updated: Aug 1999. Aims to describe how to install and configure
    the Linux networking software and associated tools.

    the "hostname" part (including aliases) must begin with an
    alphabetic character

    as it says in the hosts(5) manual page - hambone318 should try the
    command 'man 5 hosts'

    Welll.... we'll ignore IDN for now - technically, RFC0952 was based
    on ASCII characters.

    No. Here, I'm referring to the actual format of the /etc/hosts file,

    I've noticed that there isn't much material on i18n relating to host
    names and domains. You and I were used to top-level domains being
    limited to a half-dozen generics (.com, .edu, .gov, .org, and so-on)
    and ISO-3166 country codes. IANA in their "wisdom" has dramatically
    increased the name-space, as seen in http://www.iana.org/domains/root/db
    which now lists

    [juno ~]$ sed -n '/.aaa /,/Zimbabwe/p' < db | awk '{ print $2 }' |
    sort | uniq -c | column
    311 country-code 1 infrastructure
    1232 generic 15 sponsored
    3 generic-restricted 11 test
    [juno ~]$

    a few more than that. If you look near the end of that web-page, there
    are over 150 top-level-domains that don't render in ASCII, much less
    follow the hosts(5) man-page. i18n hostnames _usually_ use character
    sets other than ASCII - see RFC3290 and RFC4290. I also know that Linux
    does support non-ASCII hostnames (which wouldn't follow hosts(5)).

    Yes, I know about the RFC; I doubt that hambone318 even knows how to
    spell RFC.

    He appears to have found a search-engine/data-miner, which is a start

    Old guy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Moe Trin on Fri Aug 25 19:44:20 2017
    Moe Trin wrote:

    On Fri, 25 Aug 2017, in the Usenet newsgroup comp.unix.admin, in article <onpcb6$uob$1@dont-email.me>, Lew Pitcher wrote:

    Moe Trin wrote:

    Lew Pitcher wrote:

    First off, you replied (today, Wednesday 23 August 2017 22:20:16) to
    a question posted almost 18 years ago, on Tuesday, October 5, 1999.
    I sincerely doubt that the OP cares about the answer any more.

    PICKY PICKY PICKY!

    Duh

    It happens when the poster is using google rather than a regular news
    server. ;-} None the less, I was tempted to point the poster to the
    Linux Documentation Project - specifically the Networking-Overview-HOWTO
    and the NET3-4-HOWTO from that era. Hitting a search engine looking for those two strings may help. (Hmmm... sunsite is gone, and ibiblio.org
    is refusing a connection - well, tldp.org is still ok.)

    The Linux Networking Overview HOWTO
    Updated: Jul 2000. Overview of the networking capabilities of the
    Linux Operating System; provides pointers for further information
    and implementation details.

    Linux Networking HOWTO
    Updated: Aug 1999. Aims to describe how to install and configure
    the Linux networking software and associated tools.

    the "hostname" part (including aliases) must begin with an
    alphabetic character

    as it says in the hosts(5) manual page - hambone318 should try the
    command 'man 5 hosts'

    Welll.... we'll ignore IDN for now - technically, RFC0952 was based
    on ASCII characters.

    No. Here, I'm referring to the actual format of the /etc/hosts file,

    I've noticed that there isn't much material on i18n relating to host
    names and domains. You and I were used to top-level domains being
    limited to a half-dozen generics (.com, .edu, .gov, .org, and so-on)
    and ISO-3166 country codes. IANA in their "wisdom" has dramatically increased the name-space, as seen in http://www.iana.org/domains/root/db which now lists

    [juno ~]$ sed -n '/.aaa /,/Zimbabwe/p' < db | awk '{ print $2 }' |
    sort | uniq -c | column
    311 country-code 1 infrastructure
    1232 generic 15 sponsored
    3 generic-restricted 11 test
    [juno ~]$

    a few more than that. If you look near the end of that web-page, there
    are over 150 top-level-domains that don't render in ASCII, much less
    follow the hosts(5) man-page. i18n hostnames _usually_ use character
    sets other than ASCII - see RFC3290 and RFC4290.

    ITYM RFC3492 (not RFC3290).

    RFC3492 references PunyCode, which is a standardized algorithm to encode
    UTF8 "international" strings in 7-bit ASCII, and decode them again. It was selected as a method to permit non-ASCII charactersets in the (already
    defined as ASCII) Domain Name system. Modern programs that manipulate domain names (such as your browser, etc) should already have the punycode transform coded into it such that a non-ASCII domain name (as shown, for instance, in
    the URL bar of the browser) is silently and invisibly translated into
    Punycode ASCII for a DNS lookup.

    I also know that Linux
    does support non-ASCII hostnames (which wouldn't follow hosts(5)).

    Yes, I know about the RFC; I doubt that hambone318 even knows how to
    spell RFC.

    He appears to have found a search-engine/data-miner, which is a start

    Old guy


    --
    Lew Pitcher
    "In Skills, We Trust"
    PGP public key available upon request

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Moe Trin@21:1/5 to Lew Pitcher on Sat Aug 26 03:53:48 2017
    On Fri, 25 Aug 2017, in the Usenet newsgroup comp.unix.admin, in article <onqcgf$55o$1@dont-email.me>, Lew Pitcher wrote:

    Moe Trin wrote:

    i18n hostnames _usually_ use character sets other than ASCII - see
    RFC3290 and RFC4290.

    ITYM RFC3492 (not RFC3290).

    Actually, what I was thinking of was

    3490 Internationalizing Domain Names in Applications (IDNA). P.
    Faltstrom, P. Hoffman, A. Costello. March 2003. (Format: TXT=51943
    bytes) (Obsoleted by RFC5890, RFC5891) (Status: PROPOSED STANDARD)
    (DOI: 10.17487/RFC3490)

    RFC3492 references PunyCode, which is a standardized algorithm to encode
    UTF8 "international" strings in 7-bit ASCII, and decode them again.

    I've seen a bit of that during DDOS episodes - usual mess was some id10t banging on open DNS servers in .cn with various names. I think they're
    using random-number generators to come up with the "requested" hostnames, because most of the time, the reply is NXDOMAIN (with the b0rken DNS
    server repeating the whole query back to be "helpful"). It's UDP, so
    there is no "connection", and a faked request can come from anywhere.
    My firewall normally simply drops unexpected "replies", but I can still
    see the bandwidth being wasted.

    Old guy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)