IPTables规则缓慢连接到网桥接口

我有一个KVM主机桥接其eth0为br0。 我有一个使用桥接适配器(而不是NAT)的访客使用自己的公共IP。

如果我在主机上设置了基本的防火墙规则,它会突然开始花费很长时间在其IP上连接到ssh(或其他服务,如http)guest,无论本地(从主机)还是从另一个主机完全连接。 很长时间我的意思是20秒而不是1秒。 此外,其出站连接也需要很长时间才能打开(从访客连接到另一个主机)。

我只是简单地启用了所有转发; 没有这种说法,没有交通是来自或来自客人。 如果我冲洗所有这些规则,则连接恢复正常。

问题:1.什么给了? 2.如何排除故障 – 是否有办法logging所有拒绝?

这些是我的规则声明:

*filter # Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # Accept all established inbound connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow all outbound traffic - you can modify this to only allow certain traffic -A OUTPUT -j ACCEPT # Forward all traffic through the bridge interface -A FORWARD -j ACCEPT # Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL). -A INPUT -p tcp --dport 80 -j ACCEPT -A INPUT -p tcp --dport 443 -j ACCEPT #allow check_nrpe & check_mk -A INPUT -p tcp --dport 5666 -j ACCEPT -A INPUT -p tcp --dport 6556 -j ACCEPT -A INPUT -p tcp --dport 2220 -j ACCEPT # Allow SSH connections # # The -dport number should be the same port number you set in sshd_config # -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT # Allow ping -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT # Log iptables denied calls -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 # Reject all other inbound - default deny unless explicitly allowed policy -A INPUT -j REJECT COMMIT 

您是否设置了服务来尝试反向DNS传入的连接(通常是使用ssh的默认设置),然后通过防火墙规则阻止DNS查询?