Dnsmasq没有分配地址作为DHCP服务器

我有一个Debian Linux服务器连接到一个Netgear接入点(Wnr2000)的以太网电缆。

我希望无线连接到接入点的所有用户都有Debian Linux服务器作为网关。

Netgear wnr2000不会允许我这样做,所以我想closures它的dhcp服务器,并使用dnsmasq(如下面的答案中所build议的)作为DHCP服务器。

我有我的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 

我的Netgear有一个静态configuration:192.168.1.1和我的Debian服务器是(总是静态的):192.168.1.100

它看起来像我的ip不是由dnsmasq dhcp服务器分配的…

哪里不对?

UPDATE

dnsmasq正在运行,这是我的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 

据推测,你的客户通过DHCP从Netgear获得他们的IP地址(以及网关)。 如果您禁用Netgear上的DHCP服务器并在RPi上运行它,您将能够指定您希望客户拥有的任何网关。

我的dnsmasq.conf是错误的(检查IP范围)。

这是正确的:

 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