Category: Server Administration

Mendeteksi DDOS

Terkadang sering sekali server terkena DDOS, entah itu dari salah satu domain, maupun berbagai domain.

Bagaimana cara mendeteksinya?

Login di Server sebagai Root, dan jalankan perintah

netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n

setelah itu, akan muncul daftar IP, normalnya koneksi web tidak lebih dari 10 koneksi per IP, namun anda harus waspada apabila terdapat lebih dari 20 koneksi dari IP yang sama, ada kemungkinan Ip tersebut melakukan DDOS

Keep Your SSH Session Running when You Disconnect

Screen is like a window manager for your console. It will allow you to keep multiple terminal sessions running and easily switch between them. It also protects you from disconnection, because the screen session doesn’t end when you get disconnected.

You’ll need to make sure that screen is installed on the server you are connecting to. If that server is Ubuntu or Debian, just use this command:

sudo apt-get install screen

Now you can start a new screen session by just typing screen at the command line. You’ll be shown some information about screen. Hit enter, and you’ll be at a normal prompt.

To disconnect (but leave the session running)

Hit Ctrl + A and then Ctrl + D in immediate succession. You will see the message [detached]

To reconnect to an already running session

screen -r

To reconnect to an existing session, or create a new one if none exists

screen -D -r

To create a new window inside of a running screen session

Hit Ctrl + A and then C in immediate succession. You will see a new prompt.

To switch from one screen window to another

Hit Ctrl + A and then Ctrl + A in immediate succession.

To list open screen windows

Hit Ctrl + A and then W in immediate succession

There’s lots of other commands, but those are the ones I use the most.

Enabling Automatic Software Updates on CentOS 5

It’s important to keep your server software up-to-date. The commands below will enable automatic nightly updates using CentOS 5’s default yum package manager.

# yum -y install yum-cron crontabs vixie-cron
# service cron start
# chkconfig –level 2345 yum-cron on
# service yum-cron start

Copyright © 2024 PLiKhost Web Hosting Indonesia Blog

Theme by Anders NorenUp ↑