每次dhcp服务启动时,它不仅侦听0.0.0.0:67,而且侦听0.0.0.0:端口是随机数的端口。
有人知道这种行为是从哪里来的吗?
root@OpenWrt:/# netstat -ntapue
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 10.0.16.1:22 0.0.0.0:* LISTEN 898/sshd
netstat: /proc/net/tcp6: No such file or directory
udp 0 0 10.0.16.1:514 0.0.0.0:* 922/syslog-ng
udp 0 0 0.0.0.0:60738 0.0.0.0:* 1290/dhcpd
udp 0 0 0.0.0.0:67 0.0.0.0:* 1290/dhcpd
udp 0 0 10.0.16.1:69 0.0.0.0:* 974/tftpd-hpa
netstat: /proc/net/udp6: No such file or directory我的配置是:
# dhcpd.conf
ddns-updates off;
authoritative;
# don't let clients modify their own A records
ignore client-updates;
default-lease-time 3600;
max-lease-time 86400;
option domain-name "lan";
option domain-name-servers 212.24.188.130, 212.24.188.131;
subnet 10.0.16.0 netmask 255.255.255.0 {
host marvin
{ hardware ethernet 48:5D:11:2F:22:31;
fixed-address 10.0.16.202; }
range 10.0.16.207 10.0.16.209;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.16.255;
option routers 10.0.16.1;
deny unknown-clients;
next-server 10.0.16.1;
filename "pxelinux.0";
}发布于 2014-01-23 08:50:45
google中的搜索返回到它是一种bug:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1176046
在启动板上还有一个指向建议的解决方案的链接(从源代码构建包,并提供额外的./配置脚本选项):
http://forums.debian.net/viewtopic.php?f=10&t=95273
我已经检查了ISC DHCPD的最新稳定版本(4.2.5-P1)和开发版本(4.2.6b1和4.3.0b1)的发行说明,而且这个bug似乎没有得到修复。
要让OpenWRT使用自定义选项从源代码重新构建包,您需要使用交叉编译器为路由器的体系结构构建自己的opkg包,甚至重建整个OpenWRT映像:http://wiki.openwrt.org/doc/devel/packages。
因此,为了解决安全问题,我建议您只使用防火墙阻塞所有端口,除非需要(22、67、69、514)。
https://serverfault.com/questions/409919
复制相似问题