Discussion:
[Dnsmasq-discuss] dnsmasq config: avoid using this network for gateway and DNS
Libor Peltan
2018-02-14 16:03:44 UTC
Permalink
Good morning,

i would like to ask how to configure dnsmasq (DHCP options) to tell the client not to use this network for accessing Internet.

My server is listening on bluetooth interface; mobile phone connects to the server and establishes networking over bluetooth. Server is serving DHCP to assign the mobile phone address for communicating with the server. This networking-over-bluetooth connection shall be only used for communication between those two. The server is offline anyway.

My problem is, that once the mobile phone connects to my server, it sometimes attempts to use the bluetooth connection to access Internet, instead of using mobile networks (4G). Often web browsers fail to show webpages (DNS probe no internet).

I tried to fix this issue with following parameters to dnsmasq:

--dhcp-option=3 --dhcp-option=6 --dhcp-option=33,<serverIP>,<serverIP> --dhcp-option-force=121, <serverIP>/24, <serverIP>

However it does not really help.

The problem is complicated, because it must work for "all" types of mobile phones (Android and iPhone) and they are difficult to debug.

Thanks much for any advices!

Libor
Libor Peltan
2018-03-05 16:31:51 UTC
Permalink
Kindly BUMP?

Von: Dnsmasq-discuss [mailto:dnsmasq-discuss-***@lists.thekelleys.org.uk] Im Auftrag von Libor Peltan
Gesendet: Mittwoch, 14. Februar 2018 17:04
An: 'dnsmasq-***@lists.thekelleys.org.uk' <dnsmasq-***@lists.thekelleys.org.uk>
Betreff: [Dnsmasq-discuss] dnsmasq config: avoid using this network for gateway and DNS


Dieser Absender hat unsere Tests zur Betrugserkennung nicht bestanden und ist möglicherweise nicht der, der er zu sein scheint. Weitere Informationen über Spoofing<http://aka.ms/LearnAboutSpoofing>

Feedback<http://aka.ms/SafetyTipsFeedback>

Good morning,

i would like to ask how to configure dnsmasq (DHCP options) to tell the client not to use this network for accessing Internet.

My server is listening on bluetooth interface; mobile phone connects to the server and establishes networking over bluetooth. Server is serving DHCP to assign the mobile phone address for communicating with the server. This networking-over-bluetooth connection shall be only used for communication between those two. The server is offline anyway.

My problem is, that once the mobile phone connects to my server, it sometimes attempts to use the bluetooth connection to access Internet, instead of using mobile networks (4G). Often web browsers fail to show webpages (DNS probe no internet).

I tried to fix this issue with following parameters to dnsmasq:

--dhcp-option=3 --dhcp-option=6 --dhcp-option=33,<serverIP>,<serverIP> --dhcp-option-force=121, <serverIP>/24, <serverIP>

However it does not really help.

The problem is complicated, because it must work for "all" types of mobile phones (Android and iPhone) and they are difficult to debug.

Thanks much for any advices!

Libor
Pali Rohár
2018-03-05 21:43:07 UTC
Permalink
Post by Libor Peltan
Good morning,
Hi!
Post by Libor Peltan
i would like to ask how to configure dnsmasq (DHCP options) to tell the client not to use this network for accessing Internet.
My server is listening on bluetooth interface; mobile phone connects to the server and establishes networking over bluetooth. Server is serving DHCP to assign the mobile phone address for communicating with the server. This networking-over-bluetooth connection shall be only used for communication between those two. The server is offline anyway.
My problem is, that once the mobile phone connects to my server, it sometimes attempts to use the bluetooth connection to access Internet, instead of using mobile networks (4G). Often web browsers fail to show webpages (DNS probe no internet).
--dhcp-option=3 --dhcp-option=6 --dhcp-option=33,<serverIP>,<serverIP> --dhcp-option-force=121, <serverIP>/24, <serverIP>
However it does not really help.
For a very similar setup I'm using following dnsmasq options:

-C /dev/null -F <first_ip>,<last_ip> -K -p 0 -O 3 -O 6

and it works fine for me. DHCP client does not set any gateway nor
recursive dns server, but sets an ip address.

If it does work, does it mean that your phone assigns some (random?)
gateway address? Or how that phone attempts to use bluetooth connection
if it does not have default gateway?
Post by Libor Peltan
The problem is complicated, because it must work for "all" types of mobile phones (Android and iPhone) and they are difficult to debug.
Thanks much for any advices!
Libor
--
Pali Rohár
***@gmail.com
Loading...