Installing Snort on Linux
Installing Snort on Linux Step By Step
Step 1:-Open Kali And Open Terminal.
Step 2:- In Terminal Write Below Command.
sudo apt-get Install snort
This Command Will Install Snort In Your System.
It Will Ask You That You Want To Continue Or Not. Type "Y" To Continue.
After Run this Command "Snort Configuration Page" Will Open.
Replace You IP Address And Subnet Mask of Your Device. In My Case IP Address "192.168.0.101". And Subnet Mask "24", And Then Click On "Ok".
Step 3:- In Terminal Write Below Command.
touch /etc/snort/rules/custom.rules
This Command Will Create "Custom.rules" File In Side Rules Dictionary.
After that go to /etc/snort/rules/ Folder And Write Below Command To Open "Custom.rules" File.
vi custom.rules
You Can Write Your Custom Rules In This File, I Used Below Rule.
"alert tcp any any -> $HOME_NET 80 (flags: S; msg:"Possible DoS Attack Type : SYNflood"; flow:stateless; sid:3; detection_filter:track by_dst, count 20, seconds 10;)"
Step 4:- Go to /etc/snort/ Directory, And Then Run Below Command To Open Default Snort Configuration File..
vi snort.conf
Step 8: "snort.conf" File Will Open.
Add System IP Address And Subnet Mask On Place Of Any
"ipvar HOME_NET 192.168.0.100/24 (ip/subnet mask)"
Step 5:- Create New Directory In Side Your Root Directory.
mkdir log
Step 6:- Write Below Command.
snort -l ./log -b -c /etc/snort/snort.conf
This Command "Save All Logs" Into The Log File.
Step 7:- You Can Write Following Command.
snort (This Command Capture All The Network Packages )
snort -X -i eth0 (This Command Capture All The Packet Of Network Source Of eth0)











Comments
Post a Comment