Macvlan上的Pi hole+Unbound(native.install):如何配置Unbound以使用Macvl



我的设置/目标

我正在我的rpi4b上运行特定版本的Debian10,并在上面安装了nextcloudpi。这导致需要另一个(虚拟(接口,因为nextcloudpi运行在apache2端口80(以及pi孔(上。我本可以更改apache端口80,但我想要另一个接口/IP用于我的pihole/unbound设置。我也可以通过使用docker来实现它,但它失败了(要么是因为IPv6和macvlan有时在docker中有点bug,要么是因为我的大脑有点bug(。

然而,我已经使用我的macvlan的IPv4和IPv6(本地单播fd00(成功安装了Pihole。我已经告诉apache只使用我的物理接口IP,将lighttpd绑定到我的Macvlan的另一个IPv4,并将pihole配置为使用我的Macvlan的IPv4和IPv6本地单播(setupvars.conf(。

中心问题

我的核心问题是:如何正确配置unbound以使用Macvlan接口?我必须更改默认配置吗?

假设我的macvlan IPv4看起来像:192.168.178.123/24,我的接口线会是什么样子?我只需要添加吗

interface: 192.168.178.123@5335
interface: my corresponding local unicast address of my Macvlan@5335 (fd00....)

关于Macvlan:的一些进一步问题

我的Macvlan也有一个全局单播地址,我不确定,因为我记得有一篇帖子告诉我,具有全局单播地址的Macvlan可能存在安全风险?如果这是真的:我如何禁用我的Macvlan的全局地址?

如果我的interfaces.d文件是重要的一行:

pre-up ip link add name macvlan1 link eth0:1 address 02:3E:A6:22:01:05 type macvlan

我必须加上";模式桥";?它到底做什么?我已经阅读了一些关于网络和桥接模式的信息,但我仍然不确定是否使用?那会是吗

.... type macvlan mode bridge

非常感谢你的帮助!

我成功地使用了run命令。

docker run --name=unbound --net=macvlan_network --ip=xxx.xxx.xx.x --restart=unless-stopped --detach=true mvance/unbound-rpi

最新更新