IPTABLES – Log network traffic

Intend: Workaround when tcpdump tool not available. Issue: Tool tcpdump not available on the system troubleshooting. Notes: Log everything (depending on target chain): # iptables -I INPUT 1 -j LOG –log-prefix “#### Tmp logging ####” # iptalbes -I FORWARD 1 -j LOG –log-prefix “#### Tmp logging ####” # # iptables -I OUTPUT 1 -j LOG […]

Short Linux commands

• Use command sed to delete line 5 and line 20-25: # sed -i ‘5d;20,25d’ /tmp/example.file • Command to modify group membership • Short loop to set password for multiple users • 786: Add IP address to NIC with ip command: # ip a add <192.168.55.0/24> dev eth0 • Useful package that allow tab completion: […]