Wireshark installation under CentOS

本文介绍了如何在Linux系统上安装Wireshark网络协议分析器,并详细解释了配置非root用户使用dumpcap文件的方法,使普通用户也能启动并正常使用Wireshark进行网络包捕获。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Installing wireshark


1. #yum install wireshark

2.#yum install wireshark-gnome


Perform the following steps to allow non-root users access to the dumpcap file so that they can open it for use within wireshark.

$ sudo groupadd wireshark
$ sudo usermod -a -G wireshark saml
$ setcap cap_net_raw,cap_net_admin=eip /usr/sbin/dumpcap

Launching wireshark

Once you've made the above changes you can now launch wireshark. It should be noted that when you run it you'll still be presented with a dialog which makes you think it didn't work, but this is just giving you the opportunity to either run wireshark as yourself, "unprivileged", or as root.

Step #1: After launching, you'll see this dialog.

                         ss #1

Step #2: If you select unprivileged, you'll be presented with the main wireshark GUI:

   ss #2

Step #3: If you select the available devices, you'll notice that you can see these in promiscuous mode, which typically is not an option without the above capabilities changes:

  ss #3


您好!要在Windows上使用Wireshark远程抓取CentOS服务器的流量,您可以按照以下步骤进行操作: 1. 首先,在CentOS服务器上安装并配置tcpdump。使用以下命令安装tcpdump: ``` sudo yum install tcpdump ``` 然后,使用以下命令启动tcpdump进行网络流量捕获: ``` sudo tcpdump -i <interface> -w <filename> ``` 其中,`<interface>` 是您要捕获流量的网络接口,例如eth0或ens33等;`<filename>` 是保存捕获数据的文件名。 2. 接下来,在Windows上安装Wireshark。您可以从Wireshark官方网站(https://www.wireshark.org/)下载并安装最新版本的Wireshark。 3. 在Windows上,打开Wireshark应用程序。然后,单击菜单栏的“Capture”选项,选择“Options”以打开“Capture Options”对话框。 4. 在“Capture Options”对话框中,选择“Remote”选项卡。 5. 在“Remote”选项卡中的“Interface List”部分,单击“Manage Interfaces”。 6. 在“Manage Interfaces”对话框中,单击“New”按钮以添加新的远程接口。 7. 在“New Interface”对话框中,输入您的CentOS服务器的IP地址和ssh端口号,并提供ssh用户名和密码。选择“SSH remote capture”选项,并在“Path to tcpdump on remote host”字段中输入tcpdump的路径(通常是/usr/sbin/tcpdump)。 8. 单击“OK”保存设置,并关闭对话框。 9. 返回“Capture Options”对话框,在“Remote”选项卡中,您应该能够看到刚刚添加的远程接口。选中它,并单击“Start”按钮开始远程捕获。 10. Wireshark将开始远程捕获CentOS服务器上的网络流量。您可以使用Wireshark的过滤器和分析功能来查看和分析捕获的数据。 请注意,为了进行远程捕获,您的Windows计算机和CentOS服务器必须能够互相访问,并且必须具有正确的权限和配置。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值