0

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

closed as off topic by Sven, Dave M, Ward, Michael Hampton, Ladadadada May 4 '13 at 22:33

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    A comment about why this question should be closed would be really appreciated – Pitto May 2 '13 at 11:49
  • 1
    A comment about why downvoting is appreciated too – Pitto May 2 '13 at 12:07
  • 1
    I 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... – bortzmeyer May 2 '13 at 17:24
  • 1
    That'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 May 2 '13 at 19:11
0

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.

  • It's a good idea. I add details to the question now... – Pitto May 2 '13 at 11:37
  • I 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. – Pitto May 2 '13 at 11:55
1

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
  • If this is the correct answer, you should mark this as the accepted answer. – StockB Oct 20 '17 at 20:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.