Dnsmasq not distributing address as dhcp server
Solution 1
Presumably your clients are getting their IP addresses (and thus gateways) via DHCP from the Netgear. If you disable the DHCP server on the Netgear and run it on the RPi instead, you'll be able to specify whatever gateway you want your clients to have.
Solution 2
My dnsmasq.conf was wrong (check the ip range).
Here's the correct one:
expand-hosts
domain=test.com
dhcp-range=192.168.1.40,192.168.1.99,12h
dhcp-option=1,255.255.255.0
dhcp-option=3,192.168.1.100
dhcp-option=6,192.168.1.100
Related videos on Youtube
![Pitto](https://i.stack.imgur.com/DxOt0.jpg?s=256&g=1)
Pitto
Updated on September 18, 2022Comments
-
Pitto almost 2 years
I have a Debian Linux server connected with ethernet cable to a Netgear Access Point (Wnr2000).
I want all users wirelessly connected to the access point to have the Debian Linux server as gateway.
The Netgear wnr2000 won't allow me to do this so I thought about switching its dhcp server off and use dnsmasq (as suggested in the answer below) as dhcp server.
I have my dnsmasq.conf:
expand-hosts domain=test.com dhcp-range=192.168.1.40,128.0.1.99,12h dhcp-option=1,255.255.255.0 dhcp-option=3,192.168.1.100 dhcp-option=6,192.168.1.100
My Netgear has a static configuration: 192.168.1.1 and my Debian Server is (always static): 192.168.1.100
It looks like my ip are not assigned by the dnsmasq dhcp server...
What is wrong?
UPDATE
dnsmasq is running, here's my ps aux | grep dnsmasq:
dnsmasq 2974 0.0 0.1 4732 924 ? S 14:13 0:00 /usr/sbin/dnsma sq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg -old,.dpkg-new root 20772 0.0 0.1 3540 868 pts/2 S+ 21:13 0:00 grep --color=au to dnsmasq
-
Pitto about 11 yearsA comment about why this question should be closed would be really appreciated
-
Pitto about 11 yearsA comment about why downvoting is appreciated too
-
bortzmeyer about 11 yearsI did not downvote so I can only guess (downvotes without a comment is the biggest StackExchange plague): you do not explain how you tested and what were the results, apart for a very vague "It looks like my ip are not assigned by the dnsmasq dhcp server..." Log entries, tcpdump output, etc would help us not to resort to crystal ball. For what you say, it could simply be that dnsmasq is not started...
-
Pitto about 11 yearsThat's good hint and point of view, my friend. The problem about StackExchange in my opinion is that everyone should be a great expert not to get downvotes (never read about tcpdump, for example)... If I was one I'd not be here to ask, right? Of course errors can be made writing questions but a little help from who's better (and downvoting) would be a good thing, imho. :D Anyway your ideas are of help. I'll investigate about tcpdump and try to post more details (I think I am able to find out if dnsmasq is running or not)
-
-
Pitto about 11 yearsIt's a good idea. I add details to the question now...
-
Pitto about 11 yearsI am trying this (with simple dnsmasq) but when I connect the phone to this open network with the raspberry as dhcp server the phone disconnects saying "poor quality network" which happens when the dhcp is not there... I post my dnsmasq config file.
-
StockB over 6 yearsIf this is the correct answer, you should mark this as the accepted answer.