Three main modes of Snort-Linux general technology-Linux programming and kernel information. The following is a detailed description.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // container); "> Snort has three main modes: sniffer, packet logger, and network intrusion detection system. The sniffer mode simply captures data packets from the network and displays them on the terminal. The packet logger mode saves data packets to the disk. The network intrusion detection mode is the most complex and highly configurable. It enables Snort to analyze network traffic based on user-defined rules and respond accordingly.
1.1. Sniffer Mode
First, let's start with the basics. If you just want to print the TCP/IP packet header information on the screen, run the following command:
Snort-v
This command only displays the IP address and the header information of the TCP/UDP/ICMP data packet. To display the packet header information and the data transmitted by the application, run the following command:
Snort-vd
If you want to display link layer information, such as the Mac address of the NIC, run the following command:
Snort-vde
1.2. Packet Logger Mode
If you want to store the data Packet information on the disk, you need to use Packet Logger Mode. Run the following command to enable Snort to automatically store data packets to the disk:
Snort-vde-l log_directory
The log_directory must be created first. Otherwise, an error occurs in snort. When snort runs in this mode, it stores all captured data packets by IP address in log_directory.
-H can be used to specify the local network to enable snort to record packets related to the local network.
Snort-vde-l log_directory-h 192.168.1.0/24
If you are in a high-speed network or want to record data packets for future analysis, you can record data packets in binary mode without specifying-vde here, because the binary method records the information of the entire package. For example:
Snort-l log_directory-B
In binary mode, data packets are saved in the tcpdump format. It can be viewed by tcpdmup, Ethereal, and snort. For example:
Snort-dv-r snort. log
1.3. Network Intrusion Detection Mode
Run the following command to enable the NIDS mode:
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