daeuniverse / dae

eBPF-based Linux high-performance transparent proxy solution.
GNU Affero General Public License v3.0
2.96k stars 187 forks source link

[Workaround] 使用运行着dae的Debian 12作二级路由时无法访问国内网站 #340

Closed Karmylr closed 11 months ago

Karmylr commented 11 months ago

Checks

Support Request

在作二级路由的Debian 12上安装了dae,但是只有国外的网站能访问。

dae-prow[bot] commented 11 months ago

Thanks for opening this issue!

Karmylr commented 11 months ago

解决了。启用 nftables 的 nat 就能转发流量了

piyoki commented 11 months ago

@Karmylr Yes, it’s a known issue.

kyleli666 commented 7 months ago

解决了。启用 nftables 的 nat 就能转发流量了

@Karmylr @yqlbu 我也有类似的问题,请教一下应该怎么设置nat?

TnZzZHlp commented 7 months ago

解决了。启用 nftables 的 nat 就能转发流量了

@Karmylr @yqlbu 我也有类似的问题,请教一下应该怎么设置nat?

请参考 https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html/securing_networks/configuring-nat-using-nftables_getting-started-with-nftables 并且根据自身环境配置

kyleli666 commented 7 months ago

解决了。启用 nftables 的 nat 就能转发流量了

@Karmylr @yqlbu 我也有类似的问题,请教一下应该怎么设置nat?

请参考 https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html/securing_networks/configuring-nat-using-nftables_getting-started-with-nftables 并且根据自身环境配置

我根据文章里的2.4.2节开启masquerade后,国内网站可以访问了。

nft add table nat
nft add chain nat postrouting { type nat hook postrouting priority 100 \; }
nft add rule nat postrouting oifname "ens3" masquerade

其中ens3替换为自己对应的网卡即可。

fghwett commented 5 months ago

感谢 我遇到了同样的问题,一开始的环境安装了1panel还不成功,后来重新用初始的debian12环境试了一下正常了。

unaya commented 1 month ago

我通过这篇文章解决了问题,供后来者参考 https://www.server-world.info/en/note?os=Ubuntu_22.04&p=ufw&f=2