How Do You Secure A Linux Server?
• Learn to use Linux from the shell (command line). Every layer of software added on to make your system administration “easier” actually adds more methods for crackers to gain access to your machine and also reduces performance. All the further steps will assume your familiarity with using a shell. • Using lsof or a similar tool, find out on which ports your computer is listening for connections: ns003:~# lsof -i COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME named 17829 root 4u IPv6 12689530 UDP *:34327 named 17829 root 6u IPv4 12689531 UDP *:34329 named 17829 root 20u IPv4 12689526 UDP ns003.unternet.net:domain named 17829 root 21u IPv4 12689527 TCP ns003.unternet.net:domain (LISTEN) named 17829 root 22u IPv4 12689528 UDP 209.40.205.146:domain named 17829 root 23u IPv4 12689529 TCP 209.40.205.146:domain (LISTEN) lighttpd 17841 www-data 4u IPv4 12689564 TCP *:www (LISTEN) sshd 17860 root 3u IPv6 12689580 TCP *:ssh (LISTEN) sshd 17880 root 3u IPv6 12689629 TCP *:8899 (LISTEN) sshd 304