Re: [Dorset] New DNS Server Problem

2022-04-03 Thread Terry Coles
On Thursday, 31 March 2022 13:05:00 BST Terry Coles wrote:
> For a system that used to work, the Webserver at WMT is throwing up numerous
> problems.  After fixing the erroneous conflict yesterday, I now find that
> devices are not being given a default route.

I've resolved this. Having spent quite some time trying to get my head round 
the man 
page for dnsmasq, I came to the conclusion that the local lookups were being 
rejected 
because the device names in my hosts.dnsmasq file had no dots in them. I've 
experimented with adding various suffixes and ended up with a simple '.l' on 
the end of 
each device and it works.

(A dot on it's own didn't work, even though my reading of the man page led me 
to believe 
that it should. I also thought about using '.lc', bit that is a  real domain 
suffix (Saint Lucia) 
and also 'local', but that is apparently reserved for IETF use, so I decided to 
stick with '.l', 
since it doesn't conflict with any real ones and it's shorter to type.) I know 
my problem was 
a bit of a corner case, but I'm really pleased to finally understand it 

-- 



Terry Coles
-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-05-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] New DNS Server Problem

2022-04-01 Thread Terry Coles
On Thursday, 31 March 2022 15:36:44 BST Terry Coles wrote:
> I've just remembered that I have the ability to connect with another Kubuntu
> machine (this desktop) by plugging in a USB WiFi Adaptor, that I'd
> forgotten that I have. I did. It worked. So the problem seems to be in my
> laptop.   :oops

Hi, I've found out a couple of things since yesterday. First; ip a doesn't 
identify the DNS 
Server in use and nor does ip route, which only provides the default route. 
However, nmcli 
does. On my desktop which is connected to the Internet via Ethernet to my home 
router 
and to the test network via WiFi, I get:

nmcli dev show | grep DNS
IP4.DNS[1]: 192.168.1.1
IP4.DNS[1]: 192.168.0.1

Which shows that the machine has knowledge of a DNS Server via my home router 
and 
the DNS Server on the test network (the Webserver). I would expect therefore 
that 
nslookup should work from my desktop to identify items on the test network. The 
trouble 
is that this only half works. From my desktop:

terry@OptiPlex:~$ nslookup wmt-guest.com
Server: 127.0.0.53
Address:127.0.0.53#53

Non-authoritative answer:
Name:   wmt-guest.com
Address: 192.168.0.1
Name:   wmt-guest.com
Address: 127.0.0.1

Good. But if I try to resolve the identity of one of the other devices on the 
real network 
(held in a separate file and identified in dnsmasq.conf by the line 
'addn-hosts=/etc/
hosts.dnsmasq'), it doesn't work:

terry@OptiPlex:~$ nslookup sumppi
Server: 127.0.0.53
Address:127.0.0.53#53

** server can't find sumppi: SERVFAIL

Unless I include the identity of the server.

terry@OptiPlex:~$ nslookup sumppi 192.168.0.1
Server: 192.168.0.1
Address:192.168.0.1#53

Name:   sumppi
Address: 192.168.0.2

I can resolve sumppi when logged into the Webserver via ssh. So why does 
nslookup fail 
when I try to use it from a device logged into the test network unless I 
include the identity 
of the DNS Server?

-- 



Terry Coles
-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-05-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] New DNS Server Problem

2022-03-31 Thread Terry Coles
On Thursday, 31 March 2022 15:29:29 BST Terry Coles wrote:
> Returning to the point. All devices that I have here work properly apart
> from the laptop which apparently doesn't get given an IP Address (except
> that it does). If connecting with the laptop doesn't trigger activity in
> syslog similar to that above, the presumably the DNS Server address is
> never sent out.

I've just remembered that I have the ability to connect with another Kubuntu 
machine 
(this desktop) by plugging in a USB WiFi Adaptor, that I'd forgotten that I 
have. I did. It 
worked. So the problem seems to be in my laptop.   :oops

-- 



Terry Coles
-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-05-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] New DNS Server Problem

2022-03-31 Thread Terry Coles
On Thursday, 31 March 2022 13:05:00 BST Terry Coles wrote:
> So the problem seems to be that connecting devices don't get the identity of
> the DNS Server along with their IP Address.

A thought. While I was struggling yesterday with the apparent IP Address 
conflict, (which 
was buried using noarp), I found that my laptop didn't trigger any activity in 
syslog, but 
other devices did. By tailing syslog while connecting with my phone, I got the 
following 
(log-queries enabled in dnsmasq.conf):

Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 available DHCP 
range: 
192.168.0.100 -- 192.168.0.250
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 vendor class: 
android-
dhcp-11
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 client provides 
name: 
OnePlus-Nord2-5G
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 DHCPREQUEST(eth0) 
192.168.0.212 6e:ab:63:d7:20:a6 
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 tags: eth0
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 DHCPACK(eth0) 
192.168.0.212 6e:ab:63:d7:20:a6 OnePlus-Nord2-5G
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 requested options: 
1:netmask, 3:router, 6:dns-server, 15:domain-name, 
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 requested options: 
26:mtu, 28:broadcast, 51:lease-time, 58:T1, 
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 requested options: 
59:T2, 43:vendor-encap, 114, 108
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 next server: 
192.168.0.1
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  1 
option: 53 
message-type  5
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option: 54 
server-identifier  192.168.0.1
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option: 51 
lease-time  12h
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option: 58 
T1  6h
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option: 59 
T2  10h30m
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option:  1 
netmask  255.255.255.0
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option: 28 
broadcast  192.168.0.255
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option:  6 
dns-server  192.168.0.1
Mar 31 14:10:00 WMT-Webserver dnsmasq-dhcp[539]: 993883321 sent size:  4 
option:  3 
router  192.168.0.1


Note that the identity of the DNS Server is sent, although I can't see it on 
the phone with 
ip a. Does ip a provide the identity of the DNS Server on Android?

Returning to the point. All devices that I have here work properly apart from 
the laptop 
which apparently doesn't get given an IP Address (except that it does). If 
connecting with 
the laptop doesn't trigger activity in syslog similar to that above, the 
presumably the DNS 
Server address is never sent out.

I don't know if this gives any further clues as to what is going on here.

-- 



Terry Coles
-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-05-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] New DNS Server Problem

2022-03-31 Thread Terry Coles
For a system that used to work, the Webserver at WMT is throwing up numerous 
problems.  After fixing the erroneous conflict yesterday, I now find that 
devices are not 
being given a default route.

This hardware works fine when a phone or an iPad is connected, but not with my 
Kubuntu 
Laptop. Here is the contents of dnsmasq.conf:

interface=eth0   # Settings for interface eth0 
listen-address=192.168.0.1   # Specify the address to listen on 
server=192.168.0.1   # This is the only DNS Server 
domain-needed# Don't forward short names 
bogus-priv   # Drop the non-routed address spaces. 

dhcp-range=eth0,192.168.0.100,192.168.0.250,12h # Set IP range and lease time 
dhcp-option=3,192.168.0.1 
dhcp-option=6,192.168.0.1 
# List of domains to respond to 
address=/wmt-guest.com/192.168.0.1 
addn-hosts=/etc/hosts.dnsmasq 
# Increase logging level 
#log-dhcp 
#log-queries


I think that the mobile devices work because they are successfully intercepted 
by 
nodogsplash, the Captive Portal code which redirects them to the content. This 
doesn't 
happen with the laptop, but if I issue ip route on any device, the DNS Server 
doesn't show 
up. I know the server is working because if I do a lookup with the identity of 
the server 
included it works:

terry@XPS-13:~$ nslookup sumppi 192.168.0.1
Server: 192.168.0.1
Address:192.168.0.1#53

Name:   sumppi
Address: 192.168.0.2

So the problem seems to be that connecting devices don't get the identity of 
the DNS 
Server along with their IP Address.

The nodogsplash code on this server hasn't been updated for around a year, but 
I wouldn't 
necessarily have noticed at the time if there was a problem with  the default 
route because 
the vast majority of our Visitors don't lug laptops onto the site. I 
occasionally use a laptop 
on site, but only to ssh into devices and that works of course.

Anything else that I should check?


-- 



Terry Coles
-- 
  Next meeting: Online, Jitsi, Tuesday, 2022-05-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk