无法使用 iptables 阻止发送至来宾操作系统的数据包

无法使用 iptables 阻止发送至来宾操作系统的数据包

我的家庭工作站正在运行 Windows 操作系统来宾机,并通过桥接连接到 br-ex(OVS 桥)。 enp0s25 是连接到 br-ex ovs 桥的 LAN NIC。主机操作系统的 IP 为 194.168.1.4,来宾操作系统的 IP 为 194.168.1.5。使用主机上的 iptables,除了 SSH 之外,所有内容都被阻止进出。但我仍然可以使用 RDP 连接到来宾操作系统 (194.168.1.5)。我试图找出是什么允许它。

[root@workstation ~]# ovs-vsctl show
35d1e142-cf99-44de-85e7-f21276acd9dc
    Bridge test-br
        Port test-br
            Interface test-br
                type: internal
    Bridge br-ex
        Port "vnet0"
            Interface "vnet0"
        Port br-ex
            Interface br-ex
                type: internal
        Port "enp0s25"
            Interface "enp0s25"
    ovs_version: "2.9.3"
[root@workstation ~]#

5: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 38:ea:a7:5e:54:86 brd ff:ff:ff:ff:ff:ff
    inet 194.168.1.4/24 brd 194.168.1.255 scope global br-ex
       valid_lft forever preferred_lft forever
    inet6 fe80::9cd2:bdff:fe7f:947/64 scope link
       valid_lft forever preferred_lft forever

[root@workstation ~]# iptables -L

Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh ctstate NEW,RELATED,ESTABLISHED
DROP       all  --  anywhere             anywhere             ctstate INVALID
ACCEPT     all  --  localhost            anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh ctstate ESTABLISHED
ACCEPT     all  --  anywhere             localhost

相关内容