Re: DNS lookup failing for LAN hosts with fixed DHCP leases

Network Administrator <netadmin-vkMKHgLPN8f9Ak/[email protected]> Fri, 2 Jun 2017 09:56:35 -0500
Newsgroups gmane.comp.security.ipcop.user
Message-ID <[email protected]>
If you want the hosts to resolve a ping just inside of the lan, then you
need to

1.  ensure that the main domain:  holgerdanske.com resolves to the ip
address of your lan

2.  Each host is added in ipcop to the edit hosts section like this:

     host ip address 192.168.5.32

     hostname: p43200

     domain name:  holgerdanske.com

      checkbox enabled is checked

3.  Set the workstations to use the IP address of the ipcop box for dns,
not opendns servers directly (most likely 192.168.5.1 - or whatever the
green interface ip address is in ipcop)

4.  Flush the dnscache of your workstations

5.  Test ping by on the command line of the ipcop box to ensure that the
p43200.holgerdanske.com resolves to 192.168.5.32

6.  Test ping on the workstation in the same way

The ipcop server can still use opendns servers to resolve other non-lan
domains, (google.com etc) and this can be setup from the command line of
ipcop by running setup then follow the menus, just make sure your
workstations are only looking at ipcop for dns not any opendns.com
servers directly, flush the cache and they should be fine.

The only other thing to check is to make sure that /etc/hosts on the
workstation only contains that local workstation, not other hosts on the
lan.

The resolving order for domains on the workstation will then be

1.  /etc/hosts

2.  ipcop hosts

3.  Opendns

Chris

On 6/2/2017 8:43 AM, G.W. Haywood wrote:
> Hi there,
>
> On Fri, 2 Jun 2017, David Christensen wrote:
>
>> I am setting up an IPCop 2.1.9 machine for my home LAN.  I have created
>> fixed DHCP leases for two workstations.  When I try to ping from one
>> workstation to the other workstation, and vice-versa, DNS is failing:
>
> It isn't clear to me how you expect the name resolution to happen, and
> what results you expect if it does.
>
> The OpenDNS nameservers don't recognize p43200.holgerdanske.com.  Is
> dpchrist.holgerdanske.com the other workstation you're trying to ping?
> They don't recognize that either.  Do you have public IP addresses for
> the workstations or are they private only?  A public nameserver won't
> resolve anything to 192.168.5.0/24 because that's not a public IP, and
> you'll need your own private nameserver (whatever it is) to do that.
> IPCop can do it but you have to tell the workstation's resolver to ask
> it, and your existing resolv.conf:
>
>> $ cat /etc/resolv.conf
>> # Generated by NetworkManager
>> search holgerdanske.com
>> nameserver 208.67.222.222
>> nameserver 208.67.220.220
>
> won't do that.  You could try adding a line to /etc/resolv.conf on
> each workstation:
>
> nameserver ipcop.ip.addr.ess
>
> but be aware that if you just edit the file, NetworkManager will then
> overwrite it at the drop of a hat.  (One of the first things I do on a
> Debian box is uninstall NetworkManager but I'm not suggesting you need
> do that.)  You'll need to put the nameserver addresses in an 'iface'
> stanza in /etc/network/interfaces (see 'man interfaces' on the Debian
> machine) or set the interface to get the nameserver IPs to be used via
> DHCP (so IPCop can supply them - but you'll need to make sure IPCop is
> configured to do that and I'm afraid I don't know enough about IPCop 2
> to tell you where the configuration resides.  On a 1.4.x IPCop it's in
> /var/ipcop/dhcp/dhcpd.conf).  When you've edited the configuration you
> need to reload the config with something like
>
> ifdown eth0
> ifup eth0
>
> but as I've implied I'm not a great fan of Debian's networking so there
> may be a more generic/DebianApproved way.
>
>> I could add hosts entries on the workstations, but I'd rather let IPCop
>> handle this for me (e.g. DHCP and DNS cache integration?).
>
> Whatever you want, you have to do some configuration.
>
>> I tried creating hosts entries on IPCop for the workstations, but that
>> didn't work either.
>
> IPCop will only give the answers if it's asked the questions.  The
> /etc/resolv.conf you show above tells the resolver to ask OpenDNS.
> You can ask your IPCop to tell you what it thinks by using '@host'
> in a 'dig' query, for example
>
> dig @ipcop.ip.addr.ess p43200
> dig @ipcop.ip.addr.ess p43200.holgerdanske.com
> dig @ipcop.ip.addr.ess p43200.local.holgerdanske.com
>
> Note that I've added 'local.' into that but it needs some explanation.
> I'd arrange p43200.holgerdanske.com and p43200.local.holgerdanske.com
> to resolve to different IP addresses, one being a private LAN address.
> When I set up workstations with RFC1918 private IPs on a LAN for an
> entity which has a public domain name such as 'example.com' I create a
> nameserver zone file for 'local.example.com' which gives non-routeable
> IP addresses to the local workstations.  It would contain a line like
>
> p43200 A 192.168.5.32
>
> for the workstation in question.  You probably should read a good DNS
> book like "DNS and BIND", or, if things aren't going to get a lot more
> complex than they are now, just add the IPs to /etc/hosts on the two
> workstations as you originally suggested.  There isn't a lot to do but
> for it to make any sense you need to know quite a bit about it before
> you actually do it.
>
> HTH
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
IPCop-user mailing list
[email protected]
Manage your subscription or unsubscribe
https://lists.sourceforge.net/lists/listinfo/ipcop-user