求助,iptables能否NAT DHCP的67端口为60067?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
liuhuan22
帖子: 9
注册时间: 2014-10-05 9:41
系统: ubuntu12.04

求助,iptables能否NAT DHCP的67端口为60067?

#1

帖子 liuhuan22 » 2018-09-09 10:37

我把dnsmasq 监听60067端口了,dhcp-alternate-port=60067,68,我想双开dnsmasq 。


root@list:~# netstat -anlp|grep dns
tcp 0 0 127.0.0.1:60053 0.0.0.0:* LISTEN 2308/dnsmasq
tcp 0 0 192.168.14.1:60053 0.0.0.0:* LISTEN 2308/dnsmasq
udp 0 0 127.7.7.7:40053 0.0.0.0:* 2308/dnsmasq
udp 0 0 127.0.0.1:60053 0.0.0.0:* 2308/dnsmasq
udp 0 0 192.168.14.1:60053 0.0.0.0:* 2308/dnsmasq
udp 0 0 0.0.0.0:60067 0.0.0.0:* 2308/dnsmasq
udp 0 0 0.0.0.0:61153 0.0.0.0:* 2308/dnsmasq
unix 3 [ ] STREAM CONNECTED 3713 2308/dnsmasq
root@list:~#
liuhuan22
帖子: 9
注册时间: 2014-10-05 9:41
系统: ubuntu12.04

Re: 求助,iptables能否NAT DHCP的67端口为60067?

#2

帖子 liuhuan22 » 2018-09-09 11:08

iptables -t nat -I PREROUTING 1 -i br-lan -p udp --sport 68 -j ACCEPT
没有任何包匹配,广播包好像不进入nat表
回复