Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2000 00:41:45 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        cjclark@alum.mit.edu
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Confused by Loopback
Message-ID:  <20000623004145.B17268@hades.hell.gr>
In-Reply-To: <20000621205221.A43715@pool0586.cvx20-bradley.dialup.e>; from cristjc@earthlink.net on Wed, Jun 21, 2000 at 08:52:21PM -0700
References:  <20000621205221.A43715@pool0586.cvx20-bradley.dialup.e>

next in thread | previous in thread | raw e-mail | index | archive | help
> $ netstat -rn
> Routing tables
>   
> Internet:
> Destination        Gateway            Flags     Refs     Use     Netif Expire
> default            207.217.148.27     UGSc       11       22     tun0
> 127.0.0.1          127.0.0.1          UH          0        0      lo0
> 207.217.148.27     209.179.254.29     UH         12        0     tun0

While not connected to the network, I can see in my machine:

  % netstat -rn
  Routing tables

  Internet:
  Destination        Gateway            Flags     Refs     Use     Netif Expire
  127.0.0.1          127.0.0.1          UH          1    11250      lo0

> Notice there is no LAN entry for the 127-net like the ifconfig(8) mask
> says. So if I were to do something silly like,
> 
>   $ ping 127.0.0.2
>
> It goes out over the tun0 interface. I noticed this because for some
> perverse reason I tried,
> 
>   $ ping 127.255.255.255
> 
> And started getting replies from other hosts! I tried a traceroute(8)
> and watched 127.0.0.2 packets make their happy way out towards the
> I'net.
> 
> Tell me I'm missing something silly here.

You have not missed anything.  That is exactly the way it works.
Why does it puzzle you?  Because a network route for 127.0.0.0/8 does
not exist in your routing table by default?

If what puzzles you is that you actually *got* some replies back, you
have to use a firewall to stop packets originating from, or destined to
hosts in 127.0.0.0/8, from traversing your tun0 interface :)

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
For my public key: finger keramida@ceid.upatras.gr


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000623004145.B17268>