防火墙(防火墙)与桥:如何过滤

我有两个接口:eth0(公共地址)和10.0.3.1的lxcbr0。
我有一个LXC客户端运行IP 10.0.3.10

这是我的fireholconfiguration:

version 5 trusted_ips=`/usr/local/bin/strip_comments /etc/firehol/trusted_ips` trusted_servers=`/usr/local/bin/strip_comments /etc/firehol/trusted_servers` blacklist full `/usr/local/bin/strip_comments /etc/firehol/blacklist` interface lxcbr0 virtual policy return server "dhcp dns" accept router virtual2internet inface lxcbr0 outface eth0 masquerade route all accept interface any world protection strong #Outgoing these protocols are allowed to everywhere client "smtp pop3 dns ntp mysql icmp" accept #These (incoming) services are available to everyone server "http https smtp ftp imap imaps pop3 pop3s passiveftp" accept #Outgoing, these protocols are only allowed to known servers client "http https webcache ftp ssh pyzor razor" accept dst "${trusted_servers}" 

在我的主机上,我只能连接到端口80上的“受信任的服务器”。在我的访客中,我可以连接到每个主机上的端口80。 我以为火炮会阻止。

有什么我可以添加/更改,以便我的客人(S)inheritanceeth0接口的规则?

你想打开net.bridge.bridge-nf-call-iptables sysctl,它会在传递它们之前通过iptables运行桥接数据包。 您可能需要设置单独的规则,具体取决于网桥的设置方式,但是如果打开该sysctl,您肯定可以使用iptables通过网桥过滤数据包。