Re: [Dnsmasq-discuss] Bluetooth networking issue

2017-01-26 Thread Aaron Brice
So, to summarize: after disconnecting and reconnecting the network 
device, DNS queries are returning REFUSED, with no error messages 
showing in the logs.  Is there any option to increase verbosity?  I read 
somewhere that the only reason dnsmasq returns REFUSED is if there are 
no nameservers or one of the nameservers returns REFUSED status.  
However there are several "using nameserver" entries in the logs, and no 
traffic occurs to those nameservers.


Thanks,
Aaron

On 01/23/2017 02:47 PM, Aaron Brice wrote:
I am testing a bluetooth networking (bnep0) device on an Ubuntu 16.04 
laptop.  Everything works fine if I comment out dns=dnsmasq from the 
NetworkManager.conf.  With dnsmasq on, everything works fine the first 
time I connect my bluetooth network device.  When I disconnect it and 
reconnect it, DNS lookups fail immediately with a REFUSED status.  
When I restart the NetworkManager service everything works again.


I turned on log-queries, and it shows the query is received, but no 
response is shown in the logs and also no error messages.  The logs 
show that on the reconnect the DHCP succeeded, and dnsmasq received 
the upstream nameservers from the DHCP response, but tcpdump does not 
show any DNS traffic to those nameservers when I use dig.  Is there a 
verbosity setting that might show some more information on why the DNS 
queries are being refused?


Logs:

Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: setting upstream 
servers from DBus
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: using nameserver 
192.168.10.2#53(via bnep0)
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: using nameserver 
68.105.29.16#53(via bnep0)
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: using nameserver 
68.105.28.16#53(via bnep0)
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[A] 
daisy.ubuntu.com from 127.0.0.1
Jan 18 16:56:02 datasoft-travel whoopsie[883]: [16:56:02] Cannot 
reach: https://daisy.ubuntu.com
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[SOA] local from 
127.0.0.1
Jan 18 16:56:02 datasoft-travel NetworkManager[7926]:  
[1484783762.2180] device (5C:31:3E:EC:71:B3): Activation: successful, 
device activated.
Jan 18 16:56:02 datasoft-travel nm-dispatcher: req:2 'up' [bnep0]: new 
request (1 scripts)
Jan 18 16:56:02 datasoft-travel nm-dispatcher: req:2 'up' [bnep0]: 
start running ordered scripts...
Jan 18 16:56:02 datasoft-travel whoopsie[883]: [16:56:02] The default 
IPv4 route is: /org/freedesktop/NetworkManager/ActiveConnection/2
Jan 18 16:56:02 datasoft-travel deja-dup-monito[3334]: Source ID 948 
was not found when attempting to remove it
Jan 18 16:56:02 datasoft-travel whoopsie[883]: [16:56:02] Network 
connection may be a paid data plan: 
/org/freedesktop/NetworkManager/Devices/3
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[A] 
daisy.ubuntu.com from 127.0.0.1
Jan 18 16:56:02 datasoft-travel whoopsie[883]: [16:56:02] Cannot 
reach: https://daisy.ubuntu.com
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[SOA] local from 
127.0.0.1

Jan 18 16:56:02 datasoft-travel systemd[1]: Reloading.
Jan 18 16:56:02 datasoft-travel systemd[1]: snapd.refresh.timer: 
Adding 4h 43min 19.514615s random time.
Jan 18 16:56:02 datasoft-travel systemd[1]: apt-daily.timer: Adding 2h 
3min 35.943181s random time.
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[SOA] local from 
127.0.0.1

Jan 18 16:56:02 datasoft-travel systemd[1]: Reloading.
Jan 18 16:56:02 datasoft-travel systemd[1]: snapd.refresh.timer: 
Adding 1h 9min 9.603579s random time.
Jan 18 16:56:02 datasoft-travel systemd[1]: apt-daily.timer: Adding 6h 
19min 48.788489s random time.
Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
fsodqcsvqrxnlyy.corp.datasoft.com from 127.0.0.1
Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
xasqjyv.corp.datasoft.com from 127.0.0.1
Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
ftmkaipfpi.corp.datasoft.com from 127.0.0.1
Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
daisy.ubuntu.com from 127.0.0.1
Jan 18 16:56:03 datasoft-travel whoopsie[883]: [16:56:03] Cannot 
reach: https://daisy.ubuntu.com
Jan 18 16:56:03 datasoft-travel avahi-daemon[903]: Joining mDNS 
multicast group on interface bnep0.IPv6 with address 
fe80::cf57:5122:c1f0:43cd.
Jan 18 16:56:03 datasoft-travel avahi-daemon[903]: New relevant 
interface bnep0.IPv6 for mDNS.
Jan 18 16:56:03 datasoft-travel avahi-daemon[903]: Registering new 
address record for fe80::cf57:5122:c1f0:43cd on bnep0.*.
Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
daisy.ubuntu.com from 127.0.0.1
Jan 18 16:56:03 datasoft-travel whoopsie[883]: [16:56:03] Cannot 
reach: https://daisy.ubuntu.com
Jan 18 16:56:03 datasoft-travel NetworkManager[7926]:  
[1484783763.4104] policy: set 'SIDEBRIDGE_002020 Network' (bnep0) as 
default for IPv6 routing and DNS
Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
daisy.ubuntu.com from 127.0.0.1
Jan 18 16:56:03 datasoft-travel whoopsie[883]: [16:56:03] Cannot 
reach: http

Re: [Dnsmasq-discuss] Bluetooth networking issue

2017-01-26 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Make sure you're not getting confused between "connection refused" and
a DNS reply with a REFUSED return code. The former means there's
nothing listening on port 53 at the address you're sending the query
to, which is possible if the bluetooth interface is new and network
manager hasn't prodded dnsmasq suitably. The later means the the query
is getting to dnsmasq and it's replying, which as you say, it only
does when it has no upstream servers. The log you posted doesn't seem
to show that dnsmasq has no servers, or that it's getting queries from
any address which could plausibly be a bluetooth device, so the
connection refused option looks quite likely, but it's important to
work which it is.



Cheers,

Simon.


On 26/01/17 17:26, Aaron Brice wrote:
> So, to summarize: after disconnecting and reconnecting the network 
> device, DNS queries are returning REFUSED, with no error messages 
> showing in the logs.  Is there any option to increase verbosity?  I
> read somewhere that the only reason dnsmasq returns REFUSED is if
> there are no nameservers or one of the nameservers returns REFUSED
> status. However there are several "using nameserver" entries in the
> logs, and no traffic occurs to those nameservers.
> 
> Thanks, Aaron
> 
> On 01/23/2017 02:47 PM, Aaron Brice wrote:
>> I am testing a bluetooth networking (bnep0) device on an Ubuntu
>> 16.04 laptop.  Everything works fine if I comment out dns=dnsmasq
>> from the NetworkManager.conf.  With dnsmasq on, everything works
>> fine the first time I connect my bluetooth network device.  When
>> I disconnect it and reconnect it, DNS lookups fail immediately
>> with a REFUSED status. When I restart the NetworkManager service
>> everything works again.
>> 
>> I turned on log-queries, and it shows the query is received, but
>> no response is shown in the logs and also no error messages.  The
>> logs show that on the reconnect the DHCP succeeded, and dnsmasq
>> received the upstream nameservers from the DHCP response, but
>> tcpdump does not show any DNS traffic to those nameservers when I
>> use dig.  Is there a verbosity setting that might show some more
>> information on why the DNS queries are being refused?
>> 
>> Logs:
>> 
>> Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: setting upstream 
>> servers from DBus Jan 18 16:56:02 datasoft-travel dnsmasq[7973]:
>> using nameserver 192.168.10.2#53(via bnep0) Jan 18 16:56:02
>> datasoft-travel dnsmasq[7973]: using nameserver 
>> 68.105.29.16#53(via bnep0) Jan 18 16:56:02 datasoft-travel
>> dnsmasq[7973]: using nameserver 68.105.28.16#53(via bnep0) Jan 18
>> 16:56:02 datasoft-travel dnsmasq[7973]: query[A] daisy.ubuntu.com
>> from 127.0.0.1 Jan 18 16:56:02 datasoft-travel whoopsie[883]:
>> [16:56:02] Cannot reach: https://daisy.ubuntu.com Jan 18 16:56:02
>> datasoft-travel dnsmasq[7973]: query[SOA] local from 127.0.0.1 
>> Jan 18 16:56:02 datasoft-travel NetworkManager[7926]:  
>> [1484783762.2180] device (5C:31:3E:EC:71:B3): Activation:
>> successful, device activated. Jan 18 16:56:02 datasoft-travel
>> nm-dispatcher: req:2 'up' [bnep0]: new request (1 scripts) Jan 18
>> 16:56:02 datasoft-travel nm-dispatcher: req:2 'up' [bnep0]: start
>> running ordered scripts... Jan 18 16:56:02 datasoft-travel
>> whoopsie[883]: [16:56:02] The default IPv4 route is:
>> /org/freedesktop/NetworkManager/ActiveConnection/2 Jan 18
>> 16:56:02 datasoft-travel deja-dup-monito[3334]: Source ID 948 was
>> not found when attempting to remove it Jan 18 16:56:02
>> datasoft-travel whoopsie[883]: [16:56:02] Network connection may
>> be a paid data plan: /org/freedesktop/NetworkManager/Devices/3 
>> Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[A] 
>> daisy.ubuntu.com from 127.0.0.1 Jan 18 16:56:02 datasoft-travel
>> whoopsie[883]: [16:56:02] Cannot reach: https://daisy.ubuntu.com 
>> Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[SOA] local
>> from 127.0.0.1 Jan 18 16:56:02 datasoft-travel systemd[1]:
>> Reloading. Jan 18 16:56:02 datasoft-travel systemd[1]:
>> snapd.refresh.timer: Adding 4h 43min 19.514615s random time. Jan
>> 18 16:56:02 datasoft-travel systemd[1]: apt-daily.timer: Adding
>> 2h 3min 35.943181s random time. Jan 18 16:56:02 datasoft-travel
>> dnsmasq[7973]: query[SOA] local from 127.0.0.1 Jan 18 16:56:02
>> datasoft-travel systemd[1]: Reloading. Jan 18 16:56:02
>> datasoft-travel systemd[1]: snapd.refresh.timer: Adding 1h 9min
>> 9.603579s random time. Jan 18 16:56:02 datasoft-travel
>> systemd[1]: apt-daily.timer: Adding 6h 19min 48.788489s random
>> time. Jan 18 16:56:03 datasoft-travel dnsmasq[7973]: query[A] 
>> fsodqcsvqrxnlyy.corp.datasoft.com from 127.0.0.1 Jan 18 16:56:03
>> datasoft-travel dnsmasq[7973]: query[A] xasqjyv.corp.datasoft.com
>> from 127.0.0.1 Jan 18 16:56:03 datasoft-travel dnsmasq[7973]:
>> query[A] ftmkaipfpi.corp.datasoft.com from 127.0.0.1 Jan 18
>> 16:56:03 datasoft-travel dnsmasq[7973]: query[A] daisy.ubuntu.com
>> from 127.0.0.1 Jan

Re: [Dnsmasq-discuss] About UEFI PXE booting in proxy mode

2017-01-26 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

There's no DHCP traffic in that capture. It appears to all be ssh.

Wrong interface?


Cheers,

Simon.


On 24/01/17 08:50, Steven Shiau wrote:
> Hi Simon,
> 
> Attached please find the dump file of the command "tcpdump -s 0 -w 
> capturefile". Let me know if you need more info. Thank you very
> much.
> 
> Steven
> 
> 
> On 1/24/2017 AM 05:25, Simon Kelley wrote: Thanks for the reply.
> Please could you repeat the tcpdump using the command
> 
> tcpdump -s 0 -w capturefile
> 
> and send me the resulting file? That has far more information than 
> tcpdump prints.
> 
> 
> Cheers,
> 
> Simon.
> 
> On 20/01/17 08:39, Steven Shiau wrote:
 Hi Simon,
 
 Thanks for your reply. I am answering you in the following.
 
 On 2017/01/20 06:47, Simon Kelley wrote:
> Your example 3 - I'm confused why that shouldn't work - the
> PXE client seems to be making further requests which are
> bring ignored. Would it be possible for you to get a packet
> dump of that exchange using tcpdump?
 $ sudo tcpdump -ni ens38 'udp port 67 and udp port 68'
 tcpdump: verbose output suppressed, use -v or -vv for full
 protocol decode listening on ens38, link-type EN10MB
 (Ethernet), capture size 262144 bytes 16:18:33.208355 IP
 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
 00:0c:29:1d:9a:d1, length 347 16:18:36.205647 IP
 192.168.22.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply,
 length 341 16:18:36.385548 IP 0.0.0.0.68 > 
 255.255.255.255.67: BOOTP/DHCP, Request from
 00:0c:29:1d:9a:d1, length 359 16:18:36.386212 IP
 192.168.22.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply,
 length 341 ^C 4 packets captured 4 packets received by filter
 0 packets dropped by kernel
 
> Example 4 looks quite hopeful - the client is
> succerssfully downloading the bootx64.efi file (ignore the
> error before, that's just testing for the existance of the
> file.
> 
> Can you see what's displayed on the client system at this
> point?
 It's blank screen due to the background_image for grub is
 not downloaded,  and in the end the grub shows no grub.cfg
 error, as attached. That format is from the grub prefix we
 added by: === set 
 prefix=(tftp)/grub-efi.cfg echo "Grub CPU and platform:
 \$grub_cpu, \$grub_platform" echo 'Network status: '
 net_ls_cards net_ls_addr net_ls_routes
 
 tr --set pretty_mac x: x- \$net_default_mac
 
 echo "Loading config file
 \$prefix/grub.cfg-01-\$pretty_mac..." configfile
 \$prefix/grub.cfg-01-\$pretty_mac
 
 echo "Loading config file
 \$prefix/grub.cfg-\$net_default_ip..." configfile
 \$prefix/grub.cfg-\$net_default_ip
 
 echo "Loading config file: \$prefix/grub.cfg" configfile 
 \$prefix/grub.cfg
 
 echo "Could not find config file
 \$prefix/grub.cfg-\$pretty_mac, 
 \$prefix/grub.cfg-\$net_default_ip or \$prefix/grub.cfg!"
 sleep 15 === This is
 exactly the same problem as mentioned here: 
 http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2016q4/010
931
>
 
.html
 
> i.e., only grub efi is downloaded, while the rest of required files
> are
 not downloaded. As I mentioned for comparison, for non-proxy
 mode with same configuration, it works well.
 
 Thanks again.
 
 Steven
 
 
 
 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk 
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

>>
>>
 
___
>> Dnsmasq-discuss mailing list 
>> Dnsmasq-discuss@lists.thekelleys.org.uk 
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
> 
> 
> ___ Dnsmasq-discuss
> mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJYiksHAAoJEBXN2mrhkTWin7IP+gNguubssPNtRugS0v84q0fp
FJqaaPClvxugayygm8BP/J0xD0Gy+2jV9mdOVDpIJpJFzOPYI418KhoH81fbYVa1
W26UdvWwMii4dcxhw/fqcufW/OnmZYvr9yu/N9Vchz14MAtSUKqKEekH1sXohKxP
wTywXgX7dBisbWaROiO/1EZxRN3YMJxgV4psqqsdndRqdB00HIeJmDxkUG75AqbE
JnWfwqQEod9t1SV8kMbyBxO0w6ol+eoRXHRLyfp9EyN9WjoSyUkCZxgRt/I5GB4X
cmqvChPcaicQAFwp13RJPd5LeM0NGUDZSHL2ekkvyeIKB2qlOXk87YGLPoTlmucy
FBYWAaCnj7oXdFMWQYFyl9hBU0rD03LhTnq0ss4m3SBxpYcf95ScoGF6VPKMiSwF
YuVrYDpDm4dmEfAIRCgUsd86JYG8uMoD3s9mvu4G5SbluYlB9s++OJapASTWPEvy
GLeDKZX/iQJl2TUYJKOPwYkn7Ng/LbzErIuc+ODx7Ea/m7tFqAElT4KvOVf3/olA
jNZ3dGpr9iP83brMUeu38L0AXJljFI8vjBk79p6uW7Z6LlRuasjaWrz27tQ2uL2e
xLxp8yt4hWE4cZTZ6OqqtQnSokaM1tbBDQFvx9SZ78K2dk4ilp/fQcKVjM/9NKco
dDDQm0EmfDQqc+A6k1q9
=dJa0
-END PGP SIGNATURE-

__

Re: [Dnsmasq-discuss] Bluetooth networking issue

2017-01-26 Thread Aaron Brice

Simon,

Thanks.  dnsmasq is getting the queries, you can see them in the log:

Jan 18 16:56:07 datasoft-travel dnsmasq[7973]: query[A] www.cnn.com from 
127.0.0.1


But there is neither a reply nor an error message after the query is 
received.  "dig www.cnn.com" shows "status: REFUSED".  To be clear, the 
queries are originating from the laptop and should be routed through the 
bluetooth network connection.  The network connection is there and I can 
ping the nameserver over the bluetooth network, but it's having trouble 
with the DNS.  I don't think the bluetooth part of it is exactly 
relevant, but I'm assuming that somehow disconnecting and reconnecting a 
bluetooth network does something different than disconnecting and 
reconnecting a wifi network.


Aaron


On 01/26/2017 11:25 AM, Simon Kelley wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Make sure you're not getting confused between "connection refused" and
a DNS reply with a REFUSED return code. The former means there's
nothing listening on port 53 at the address you're sending the query
to, which is possible if the bluetooth interface is new and network
manager hasn't prodded dnsmasq suitably. The later means the the query
is getting to dnsmasq and it's replying, which as you say, it only
does when it has no upstream servers. The log you posted doesn't seem
to show that dnsmasq has no servers, or that it's getting queries from
any address which could plausibly be a bluetooth device, so the
connection refused option looks quite likely, but it's important to
work which it is.



Cheers,

Simon.


On 26/01/17 17:26, Aaron Brice wrote:

So, to summarize: after disconnecting and reconnecting the network
device, DNS queries are returning REFUSED, with no error messages
showing in the logs.  Is there any option to increase verbosity?  I
read somewhere that the only reason dnsmasq returns REFUSED is if
there are no nameservers or one of the nameservers returns REFUSED
status. However there are several "using nameserver" entries in the
logs, and no traffic occurs to those nameservers.

Thanks, Aaron

On 01/23/2017 02:47 PM, Aaron Brice wrote:

I am testing a bluetooth networking (bnep0) device on an Ubuntu
16.04 laptop.  Everything works fine if I comment out dns=dnsmasq
from the NetworkManager.conf.  With dnsmasq on, everything works
fine the first time I connect my bluetooth network device.  When
I disconnect it and reconnect it, DNS lookups fail immediately
with a REFUSED status. When I restart the NetworkManager service
everything works again.

I turned on log-queries, and it shows the query is received, but
no response is shown in the logs and also no error messages.  The
logs show that on the reconnect the DHCP succeeded, and dnsmasq
received the upstream nameservers from the DHCP response, but
tcpdump does not show any DNS traffic to those nameservers when I
use dig.  Is there a verbosity setting that might show some more
information on why the DNS queries are being refused?

Logs:

Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: setting upstream
servers from DBus Jan 18 16:56:02 datasoft-travel dnsmasq[7973]:
using nameserver 192.168.10.2#53(via bnep0) Jan 18 16:56:02
datasoft-travel dnsmasq[7973]: using nameserver
68.105.29.16#53(via bnep0) Jan 18 16:56:02 datasoft-travel
dnsmasq[7973]: using nameserver 68.105.28.16#53(via bnep0) Jan 18
16:56:02 datasoft-travel dnsmasq[7973]: query[A] daisy.ubuntu.com
from 127.0.0.1 Jan 18 16:56:02 datasoft-travel whoopsie[883]:
[16:56:02] Cannot reach: https://daisy.ubuntu.com Jan 18 16:56:02
datasoft-travel dnsmasq[7973]: query[SOA] local from 127.0.0.1
Jan 18 16:56:02 datasoft-travel NetworkManager[7926]: 
[1484783762.2180] device (5C:31:3E:EC:71:B3): Activation:
successful, device activated. Jan 18 16:56:02 datasoft-travel
nm-dispatcher: req:2 'up' [bnep0]: new request (1 scripts) Jan 18
16:56:02 datasoft-travel nm-dispatcher: req:2 'up' [bnep0]: start
running ordered scripts... Jan 18 16:56:02 datasoft-travel
whoopsie[883]: [16:56:02] The default IPv4 route is:
/org/freedesktop/NetworkManager/ActiveConnection/2 Jan 18
16:56:02 datasoft-travel deja-dup-monito[3334]: Source ID 948 was
not found when attempting to remove it Jan 18 16:56:02
datasoft-travel whoopsie[883]: [16:56:02] Network connection may
be a paid data plan: /org/freedesktop/NetworkManager/Devices/3
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[A]
daisy.ubuntu.com from 127.0.0.1 Jan 18 16:56:02 datasoft-travel
whoopsie[883]: [16:56:02] Cannot reach: https://daisy.ubuntu.com
Jan 18 16:56:02 datasoft-travel dnsmasq[7973]: query[SOA] local
from 127.0.0.1 Jan 18 16:56:02 datasoft-travel systemd[1]:
Reloading. Jan 18 16:56:02 datasoft-travel systemd[1]:
snapd.refresh.timer: Adding 4h 43min 19.514615s random time. Jan
18 16:56:02 datasoft-travel systemd[1]: apt-daily.timer: Adding
2h 3min 35.943181s random time. Jan 18 16:56:02 datasoft-travel
dnsmasq[7973]: query[SOA] local from 127.0.0.1 Jan 18 16:56:02
datasoft-travel systemd[1]: