在桥接模式下使用wireshark设置流量监控服务器

网络工程 线鲨 带宽 网络
2022-02-13 15:09:59

我能够获得一台带有 2 个以太网端口的服务器,开始学习使用wireshark 进行流量检查。

服务器和软件设置完毕。我想知道如何将服务器配置为桥接模式。

我的调制解调器是一个 3g 接入点,以太网端口位于 ip 192.168.1.1,插入到 ip 192.168.2.1 的 assus wifi/路由器。

我想把我的wireshark放在这两个之间,看看有多少数据被消耗了,被什么设备消耗了。

有人可以指导我采取的步骤吗?

谢谢。

1个回答

要解决此问题,您可以使用bridge-utils. 使用 bridge-utils,您可以将两个或多个接口桥接在一起。

首先,您必须将设备放在同一网络上,因此将 ip 192.168.2.1 的 assus wifi/router 移动到例如 192.168.1.2

  1. 安装sudo apt-get install bridge-utils

  2. 编辑/etc/network/interfaces使其看起来像这样

iface eth0 inet manual

iface eth1 inet manual

# Bridge setup iface br0 inet static bridge_ports eth0 eth1 address 192.168.1.10 broadcast 192.168.1.255 netmask 255.255.255.0 gateway 192.168.1.1

然后重启网络服务service networking restart

这会将 eth0 和 eth1 桥接到桥 br0 并设置 IP 地址。在 br0 到 192.168.1.10 上并空白 IP 广告。在 eth0 和 eth1 上。

+--------+ +--------------+ +--------+ | 3G | | Server | | ASUS | | Modem | | | | wifi/ | | | | br0 | | router | +----+---+ +--+------+----+ +----+---+ | eth0| |eth1 | | | | | \---------- \---------------