port-mirroring
port-mirroring copied to clipboard
I want to implement port mirroring function through openwrt
environment: x86 virtual machine install openwrt, add 3 network ports, 1 wan(eth2), 2 lan(eth0, eth1) 2 win virtual machines, respectively set the network connection to the x86 openwrt lan port,eth0 and eth1
the x86 virtual openwrt configuration is as follows: ======network files======= config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0'
config globals 'globals' option ula_prefix 'fdfd:8d0a:d67d::/48'
config interface 'lan' option type 'bridge' option ifname 'eth0 eth1' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60'
config interface 'wan' option ifname 'eth2'' option proto 'dhcp'
======port-mirroring==== config 'port-mirroring' option source_ports 'eth0' # interfaces (maximum of 4) to copy packets from option promiscuous '1' # put source interface(s) in promiscuous mode option target 'eth1' # interface or IP address to send packets to option protocol 'TEE' # 'TEE' iptables (default) or 'TZSP' TaZmen Sniffer Protocol option filter '' # optional tcpdump/libpcap packet filter expressions
two win virtual machines can get ip through openwrt and access the Internet, but the mirroring fails, On the win11 virtual machine, wireshark can only capture the broadcast packets of the win7 virtual machine, and cannot capture any other Internet data such as tcp udp data! please help, thank you very much!!