Jump to content

Cheatsheet: Difference between revisions

Line 1,153:
Time Breakdown
curl https://www.booleanworld.com/ -sSo /dev/null -w 'namelookup:\t%{time_namelookup}\nconnect:\t%{time_connect}\nappconnect:\t%{time_appconnect}\npretransfer:\t%{time_pretransfer}\nredirect:\t%{time_redirect}\nstarttransfer:\t%{time_starttransfer}\ntotal:\t\t%{time_total}\n'
 
* IPtables
 
iptables -L ==> List rules
iptables -F ==> Stop iptables
iptables -nvL ==> Check Stats
iptables --flush MYCHAIN ==> Flush Chain
iptables -X MYCHAIN ==> Delete Empty Chain
iptables -A INPUT -p tcp --dport ssh -j ACCEPT ==> Allow SSH
iptables -A INPUT -p tcp --dport 80 -j ACCEPT ==> Allow incoming web traffic
iptables -A INPUT -j DROP ==> Blocking Traffic
iptables -A INPUT -i ens160 -s 10.140.198.7 -j DROP ==> Blocking Traffic
iptables -I INPUT 1 -i lo -j ACCEPT ==> Allow loopback
iptables -I INPUT 5 -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 ==> Logging
 
 
* TCPDump
 
sudo tcpdump -s 0 -i ens160 host 10.1.1.1 -v -w /tmp/packet_capture.cap
sudo tcpdump -s 0 -i ens160 host 10.1.1.1 and port 22 -v -w /tmp/packet_capture.cap
sudo tcpdump -s 0 -i ens160 host 10.1.1.1 and port not 22 and port not 80 -v -w /tmp/packet_capture.cap
sudo tcpdump -s 0 -i ens160 host 10.1.1.1 and tcp port not 22 and tcp port not 80 -v -w /tmp/packet_capture.cap
 
for i in `find . -type f | egrep "All.pcap"`; do echo $i; tcpdump -r $i '((host 1.1.1.1 or host 2.2.2.2) and host 3.3.3.3) and port 445' ; echo -e "\n"; done
 
 
* MTR
Cookies help us deliver our services. By using our services, you agree to our use of cookies.