When tcpdump and tcpdump

Source: Internet
Author: User

When tcpdump and tcpdump

To locate the problem, you need to use tcpdump on Linux and save it to the file. The following problems are encountered:

Tcpdump port 9001-w xx
Tcpdump: xx: Permission denied

Because it is already a root user, it is determined that it is not a file system permission problem.

After checking on the internet, find the solution: Change the tcpdump mode from enforce to complain mode.

The modification process is as follows:

First, check the mode in which it is located:

Grep tcpdump/sys/kernel/security/apparmor/profiles
/Usr/sbin/tcpdump (enforce)

It is not the complain mode.

Change to complain mode:

Aa-complain/usr/sbin/tcpdump
The program 'aa-complain 'is currently not installed. You can install it by typing:
Apt-get install apparmor-utils

If an error occurs, follow the prompts to install apparmor-utils. The process is omitted and then run the following command again:

Aa-complain/usr/sbin/tcpdump
Setting/usr/sbin/tcpdump to complain mode.

View:

Grep tcpdump/sys/kernel/security/apparmor/profiles
/Usr/sbin/tcpdump (complain)

 

Complete

 

Refer:

Tcpdump permission denied: https://ubuntuforums.org/showthread.php? T = 1501339

The page contains many key information:

This is probably caused by AppArmor. You need to switch from 'enabledement 'mode to 'complain 'mode on 'tcpdump '. Run the following command as root:

Code:

Aa-complain/usr/sbin/tcpdump

You can check by running the following command as root:

Code:

Grep tcpdump/sys/kernel/security/apparmor/profiles

You shoshould see (enforce) or (complain). You want it to say (complain ).

 

AppArmor Introduction: http://www.tuicool.com/articles/aeiIzq

 

Linux: Linux 10-6-13-14 3.2.0-85-generic # 122-Ubuntu SMP Tue May 26 16:14:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.