首页
学习
活动
专区
圈层
工具
发布

UFW块DHCP
EN

Unix & Linux用户
提问于 2021-03-08 18:06:03
回答 1查看 6.5K关注 0票数 4

我在玩Debian Buster。

我的服务器上有两个网络设备。Wifi连接到互联网,以太网卡连接到家中的小型intranet。

我已经安装了dnsmasq,它通过以太网卡作为内部网的DHCP服务器。

连接到同一以太网交换机的其他PC机获得由dnsmasq定义的IP号。我可以传输文件等没有问题。

如果启用了防火墙ufw,则客户端PC不会获得IP号。一旦我禁用de,所有客户端PC都会得到IP号码。

我允许53,67,68,.我不知道我从不同的论坛尝试了多少端口。

目前,我的ufw状态是:

*$ sudo ufw状态:状态:活动到行动

22/tcp允许任何地方 80/tcp允许Anywhere 443/udp允许Anywhere DNS允许Anywhere 67/udp允许Anywhere 68/udp允许Anywhere 53允许Anywhere 22/tcp (v6)允许任何地方(v6) 80/tcp (v6)允许任何地方(v6) 443/udp (v6)允许任何地方(v6) 67/udp (v6)允许任何地方(v6) 68/udp (v6)允许任何地方(v6) 53允许任何地方

我翻阅了一堆论坛。他们建议端口67、udp、proto等,但什么都没有用。

有什么想法吗?

编辑我运行tcpdump -i mydev然后禁用ufw,tcp日志是:

代码语言:javascript
复制
23:00:18.939873 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:11:71:56:18:q6 (oui Unknown), length 286
23:00:21.788245 IP PersonalCloud.local.57586 > all-systems.mcast.net.4448: UDP, length 116 
23:00:21.788333 IP PersonalCloud.local.57586 > 224.0.0.249.4448: UDP, length 116
23:00:21.941823 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 01:11:71:51:18:a6 (oui Unknown), length 286
23:00:22.780809 IP dnsmasq.netbios-dgm > 192.168.2.255.netbios-dgm: UDP, length 219 
23:00:24.192421 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 14:01:6a:1c:1c:we (oui Unknown), length 300  
23:00:24.945175 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 01:11:15:56:18:a6 (oui Unknown), length 286 
23:00:27.211282 IP dnsmasq.17500 > 192.168.2.255.17500: UDP, length 449   
23:00:27.211701 IP dnsmasq.17500 > 192.168.2.255.17500: UDP, length 445 
23:00:28.927026 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 61:51:31:91:e3:4a (oui Unknown), length 300 
23:00:29.127449 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 61:01:61:51:d1:31 (oui Unknown), length 300 
23:00:30.808357 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 61:51:31:91:e1:41 (oui Unknown), length 300 
23:00:33.551227 IP > 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 61:51:31:91:e1:41 (oui Unknown), length 300 
23:00:35.618172 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 61:01:61:51:d1:31 (oui Unknown), length 300 
23:00:37.899922 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 68:51:31:91:e1:41 (oui Unknown), length 300 
23:00:42.752985 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 6a:01:61:51:dc:3e (oui Unknown), length 300 
23:00:46.392675 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 61:51:31:91:e1:41 (oui Unknown), length 300 
23:00:46.405925 IP dnsmasq.bootps > Mac-mini.bootpc: BOOTP/DHCP, Reply, length 300

我只是复制粘贴从我禁用ufw,直到我有IP号码,在MAc-迷你PC。

那么,港口是什么?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-03-10 04:24:20

代码语言:javascript
复制
sudo ufw allow bootps
sudo ufw allow 53/udp
sudo ufw allow 53/tcp
票数 8
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/638232

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档