Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Advanced users • Re: Setting up my rpi in wifi ap mode without sharing gateway

$
0
0
To serve DHCP, NetworkManager will simply spawn a standalone instance of dnsmasq which you can configure.

You can drop dnsmasq configuration in /etc/NetworkManager/dnsmasq-shared.d/ - like /etc/NetworkManager/dnsmasq-shared.d/50-no-gateway.conf (the "shared" in the path is the same as in "method=shared" in your NetworkManager config)

If you want to send no default route, simply add the following to the dnsmasq config:

Code:

dhcp-option=3
(to understand why that works, see https://github.com/imp/dnsmasq/blob/mas ... nf.example )

You might also want to avoid sending a DNS resolver, simply by adding yet another line:

Code:

dhcp-option=6
or even disable DNS entirely with:

Code:

port=0
You might need to do a connection reload / restart NetworkManager for it to take effect (and if unsure, reboot).

That said, I wouldn't be surprised if your phone still didn't work the way you want after that. The phone OS might make the assumption that a wifi connection should always offer a default route, and may be really confused if it doesn't.

Statistics: Posted by vikmik — Tue Apr 29, 2025 6:22 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles