NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Routing ppp (Was: Getty on USB serial port)



On Sun, Sep 17, 2017 at 09:50:10AM -0400, William D. Jones wrote:
> Sent the prev email before I was ready. One unexpected behavior I got from
> pppd is that it seems to be able to "swap" the interfaces daemons are bound
> to.
> 
> As an example, I have sshd enabled in my /etc/rc.conf, and `ppp.115200` in
> `/etc/ttys`. When my Pi boots, `ifconfig` only shows the loopback interface,
> but when I enable `pppd` on the other end (Beagle), I can `ssh` into the Pi
> without problem, as if ssh was listening on `ppp0` from the beginning before
> it was created. How is this possible?

sshd isn't listening on a particular interface but on an IP address.
By default this is the 0.0.0.0 wildcard address. Then a connection made
to any address configured on any interface will work, even when the
interface didn't exist when sshd started.

That's the normal behaviour for most network services and is good
for normal computers that have a single network connection.

Things are more complicated for so-called 'multi-homed' setups,
i.e. computers that have multiple network interfaces connected
to multiple networks. There you often want to provide services
only to specific networks. Combining that with interfaces that
are created on the fly (like your ppp setup) can be, well,
complicated.


Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index