![启用 VPN 和 ufw 后无法访问本地网络上的 IP 地址](https://linux22.com/image/1174281/%E5%90%AF%E7%94%A8%20VPN%20%E5%92%8C%20ufw%20%E5%90%8E%E6%97%A0%E6%B3%95%E8%AE%BF%E9%97%AE%E6%9C%AC%E5%9C%B0%E7%BD%91%E7%BB%9C%E4%B8%8A%E7%9A%84%20IP%20%E5%9C%B0%E5%9D%80.png)
截至今天,我无法在 Ubuntu 20.04 上访问本地网络上的 IP 地址。昨天一切都很好,显然进行了一些更新并搞乱了一切。我正在使用本机 VPN 客户端,并使用防火墙的默认设置启用了 ufw:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
禁用 VPN 或 ufw 后,我的本地网络就可以访问了。看来我需要为 VPN 接口设置一条特定规则,但试过了,sudo ufw allow from 192.168.1.0/24
没有成功。
我想设置一条严格的规则,允许我在运行 VPN 且启用 ufw 时访问网络上的特定 IP 地址,比如说 192.168.1.1。谢谢。
编辑:这是grep UFW /var/log/syslog
输出:
[UFW BLOCK] IN=wlp5s0 OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:00:00 SRC=192.168.1.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2
编辑2:这是/var/log/apt/history.log
输出:
Start-Date: 2020-06-25 09:17:29
Commandline: apt-get upgrade
Requested-By: XYZ (1000)
Upgrade: linux-libc-dev:amd64 (5.4.0-37.41, 5.4.0-39.43), libcurl4:amd64 (7.68.0-1ubuntu2, 7.68.0-1ubuntu2.1), curl:amd64 (7.68.0-1ubuntu2, 7.68.0-1ubuntu2.1), libcurl3-gnutls:amd64 (7.68.0-1ubuntu2, 7.68.0-1ubuntu2.1), libcurl3-gnutls:i386 (7.68.0-1ubuntu2, 7.68.0-1ubuntu2.1)
End-Date: 2020-06-25 09:17:32
Start-Date: 2020-06-25 09:19:34
Commandline: aptdaemon role='role-commit-packages' sender=':1.126'
Install: linux-image-5.4.0-39-generic:amd64 (5.4.0-39.43, automatic), linux-headers-5.4.0-39:amd64 (5.4.0-39.43, automatic), linux-modules-extra-5.4.0-39-generic:amd64 (5.4.0-39.43, automatic), linux-headers-5.4.0-39-generic:amd64 (5.4.0-39.43, automatic), linux-modules-5.4.0-39-generic:amd64 (5.4.0-39.43, automatic)
Upgrade: linux-headers-generic-hwe-20.04:amd64 (5.4.0.37.40, 5.4.0.39.42), linux-image-generic-hwe-20.04:amd64 (5.4.0.37.40, 5.4.0.39.42), linux-generic-hwe-20.04:amd64 (5.4.0.37.40, 5.4.0.39.42)
End-Date: 2020-06-25 09:20:12