@@ -35,6 +35,16 @@ ip ro add 10.0.0.0/8 via 10.11.11.254
3535ip route | while read p; do echo "ip route change $p initcwnd 10 initrwnd 10"; done
3636
3737#tcpdump
38+ #tcpdump [ -AdDeflLnNOpqRStuUvxX ] [ -c count ]
39+ # [ -C file_size ] [ -F file ]
40+ # [ -i interface ] [ -m module ] [ -M secret ]
41+ # [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]
42+ # [ -W filecount ]
43+ # [ -E spi@ipaddr algo:secret,... ]
44+ # [ -y datalinktype ] [ -Z user ]
45+ # [ expression ]
46+ # expression (type:net,host,port) (dir:src,dst,src and dst, src or dst) (proto)
47+ #
3848tcpdump tcp and src 192.168.0.1 and port 80
3949# 0x4745 : [GE]T -- 0x4854 : [HT]TP
4050tcpdump -XvvennSs 0 -i eth0 tcp[20:2]=0x4745 or tcp[20:2]=0x4854
@@ -45,13 +55,14 @@ tcpdump -nnvXSs 0 -c2 icmp
4555tcpflow -cp -i eth0 "port 80"
4656
4757#iptables
58+ #iptables [-t table] command [match] [target/jump]
59+ # -t --table: table(filter, nat, mangle, raw)
60+ # -A -D -I -R: chain -L,--lsit,-F,--flush,-Z,-N,-X,-P,-E
61+ # match regx: tcp,udp,icmp,limit,mac,mark,owner,state,tos,ttl
62+ # -j target:(ACCEPT, DROP, REJECT)
4863iptables -A INPUT -p tcp --dport 80 -m time --timestart 09:00 --timestop 18:00 -j DROP
4964iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 22 -j ACCEPT
5065iptables -t filter -A INPUT -s 192.168.1.1 -j DROP
51- #-t --table: table(filter, nat, mangle, raw)
52- #-A -D -I -R: chain
53- #match regx
54- #action (ACCEPT, DROP, REJECT)
5566
5667#RAID0
5768mdadm -C /dev/md0 -a yes -l 0 -n 2 /dev/sdb /dev/sdc
0 commit comments