Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2013 09:26:55 +0100
From:      Frank Leonhardt <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Network Question
Message-ID:  <5232CC4F.8070004@fjl.co.uk>
In-Reply-To: <CAOtnnwv991=o-vqwJ4tqWXs6PuTwod49vNOsKLJfLwEk%2B18yow@mail.gmail.com>
References:  <CAOtnnwvU=n55PtRpw6KWwt9uEMqHj=3PJu3KBimAde0EW39rjg@mail.gmail.com> <CA%2BtpaK24iobh5RzJ_JZ_3HO1U-3tcnTOkfNRNaDHUQtAtaw8bA@mail.gmail.com> <CAOtnnwv991=o-vqwJ4tqWXs6PuTwod49vNOsKLJfLwEk%2B18yow@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/09/2013 20:16, Daniel Nang wrote:
> That was easier than I thought. My initial approach already looked
> something like
> this, except that for the ip address I always put the machine's name as in:
>
> machine1# ssh user@machine2.example.com
>
> which results in
>
> ssh: Could not resolve hostname machine2.example.com: hostname nor servname
> provided, or not known
>
> I think the problem here lies with the /etc/hosts file where machine1 and
> machine2 have
> to be registered respectively. The thing here is that the ip isn't static
> which makes
> this approach somewhat difficult to realize.
>
> Got it.
>
> Thanks.
>
>
>
> On Fri, Sep 13, 2013 at 2:51 AM, Adam Vande More <amvandemore@gmail.com>wrote:
>
>> On Thu, Sep 12, 2013 at 1:45 PM, Daniel Nang <daniel.nang01@gmail.com>wrote:
>>
>>> Hello,
>>>
>>> I have two computers, both running FreeBSD, accessing the
>>> web via DHCP from the router. The setup looks like this:
>>>
>>>
>>>                                         Internet
>>>                                              |
>>>                                              |
>>>                                              |
>>> machine1.example.com --- Router --- machine.2.example.com
>>>           - DHCP -                                            - DHCP -
>>>
>>>
>>> Both computers can access the internet with no problems.
>>> So far so good...
>>>
>>> My question is, if I can simultaneously have the computers access
>>> the net as in the given picture and also let them communicate with
>>> each other e.g. via ssh?
>>>
>>
>> machine1# ssh `ip of machine2`
>>
>>
>> --
>> Adam Vande More
>>
> _______________________________________________
>

If you really only have two (or a very few machines) just give them 
static local IP addresses and add the host names to /etc/hosts on each 
box. Find out the address pool used by the DHCP server (presumably in 
the router) and choose your static addresses to avoid it.

If you use dynamic IP addresses (form DHCP) you may have some fun and 
games when it comes to security certificates.

Regards, Frank.




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