Linux - Trick

Tý trick nho nhỏ:
Banner:

/etc/issue ( before)
/etc/motd (after)

sshd_config

#Banner ... SSH Banner

last
Tra ve user dang login
netstat -nlp -ntlp -nulp
Show Listening socket
-ant
Show listen port va cac connect toi
lsof

lsof -i :53

ping

-c number : ping với số lần
-s size
-i s : khoảng cách giữa các đợt

tcpdump

#tcpdump -D : Network interfaces available for the capture

#tcpdump -n : To display numerical addresses rather than symbolic (DNS) addresses
tcpdump -i eth0

#tcpdump udp

#tcpdump port http

#tcpdump -c 20 : To stop the capture after 20 packets

#tcpdump -w capture.log

Sử dụng vim tìm kiếm: / sau hoặc ? trước, n để next
:set number show lines
:set number hide lines

:0 go to first line
:$ go to end line
Mình dùg vim, ko biết nano
Thanks for reading
--------------------------------------------------------------------------
All my Lab:
Linux Lab -- window and Cisco Lab
to be continued - I will update more.

Nam Habach