Sebagai pemilik server, sudah suatu kewajiban kita untuk melindungi server kita. Salah satunya dari orang yang coba-coba untuk mengakses server kita. Umumnya cara ini menggunakan brute force login pada jalur komunikasi SSH.
Salah satu solusi yang sering dilakukan adalah mengganti port SSH. Bisa dikatakan, tindakan ini merupakan passive defense, yang berarti hanya menahan serangan secara sementara. Pada akhirnya dengan scanning port, penyerang tentu akan tahu port SSH server kita. Alangkah baiknya jika tindakan ini ditambahkan sebuah active defense, yakni sistem pertahanan yang bereaksi secara aktif menghadapi kemungkinan serangan. Dalam hal ini kita membicarakan Fail2Ban.
Menurut Wikipedia, Fail2Ban adalah sebuah aplikasi pencegah intrusi atau akses tak sah yang melindungi komputer/server dari serangan brute-force. Fail2Ban ditulis dengan menggunakan bahasa pemrograman Python, sehingga dapat berjalan di sistem POSIX yang memiliki antarmuka pengontrol paket data atau firewall yang terpasang secara lokal, misalnya iptables atau TCP Wrapper. Fail2Ban bekerja dengan membaca log dari sebuah program yang disetel untuk diawasi. Dalam hal ini tentu saja SSH server.
Sebagai permulaan, kita harus melakukan instalasi Fail2Ban. Untuk perintah di Debian, Ubuntu dan turunannya adalah sebagai berikut:
# apt install fail2ban
Sedangkan untuk di CentOS dan turunannya adalah sebagai berikut:
# yum install epel-release
# yum install fail2ban
Untuk baris pertama, kita memasang repository enterprise karena fail2ban tidak ada dalam paket standar CentOS. Setelah perintah-perintah selesai dijalankan, saatnya untuk melakukan konfigurasi setelan pada Fail2Ban. Jalankan perintah untuk melakukan editing pada file jail.conf yang ada di direktori /etc/fail2ban. Perintahnya bisa disesuaikan dengan editor yang anda gunakan.
# cd /etc/fail2ban
# cp jail.conf jail.conf.backup
# nano /etc/fail2ban/jail.conf
Baris pertama untuk masuk ke direktori konfigurasi Fail2Ban. Baris kedua untuk melakukan backup copy file jail.conf, siapa tahu salah edit. Setelah itu menggunakan editor nano untuk buka file jail.conf. Anda bisa menyesuikan dengan editor yang anda pakai. Setelah itu cari directive [sshd], tambahkan baris “enabled = true” seperti gambar di sebelah kanan. Setelah itu simpan dan restart Fail2Ban. Kali ini kedua jalur distro, yakni Debian dan CentOS sudah bersepakat mengenai cara start, stop dan restart daemon. Yep, ini dia:
# systemctl restart fail2ban
Anda bisa melihat hasilnya dengan menjalankan perintah ps aux untuk melihat apakah daemon Fail2Ban sudah berjalan atau belum. Selain itu anda juga dapat melihat progress Fail2Ban dengan mlihat log-nya. Secara default, log Fail2Ban ada di /var/log/fail2ban.log. Disitu anda akan melihat IP-IP yang mencoba untuk log-in ke server anda. Untuk melihat yang di-banned oleh Fail2Ban, anda dapat menjalankan perintah iptables -L sehingga muncul seperti ini:
Selamat! Anda sudah satu langkah untuk mengamankan server anda. Saya ga bilang kalau server anda 100% aman, tapi setidaknya menghambat dan mempersulit orang untuk melakukan serangan kepada server anda. Ada pertanyaan? Silahkan di kolom komentar, ya.
Dibawah ini adalah pendapat yang dikirimkan pembaca atas artikel ini. Negara Kesatuan Republik Indonesia adalah negara bebas, anda boleh menulis apa saja asal mampu mempertanggungjawabkannya. Kami menerima kritik dan saran namun tidak menerima caci maki. Hidup cuma sekali, jangan sia-siakan hanya untuk menyakiti hati orang lain.
Disclaimer: Komentar adalah tanggapan pribadi, tidak mewakili kebijakan Hanya Lewat. Redaksi berhak menyunting atau menghapus kata-kata yang berbau narsisme, promosi, spam, pelecehan, intimidasi dan kebencian terhadap suatu golongan.
What’s up everyone, it’s my first pay a visit at this web page, and post is really fruitful in favor of me, keep up posting these types of posts.
Wow, awesome blog layout! How lengthy have you ever been running a blog for? you made running a blog look easy. The entire glance of your web site is wonderful, let alone the content!
cialis buy online Dro4er, USA 2022 06 28 00 27 37
I couldn’t resist commenting. Exceptionally well written!
Ӏf ѕome one needs to be updated with hottest tchnologies therefore һe must be visit this site annd be up to date daіⅼу. https://pipewiki.org/app/index.php/User:RheaHubbs07238
Verrу ɡood blog you have hһere but I was wondering if you knew of any user discussion forums tһat ϲover the
same topics talked about in this article?
I’d really like to be a paгt οf group ᴡhеre I cаn ցet oⲣinions
from other knowleԁgeabⅼе indiviԀuaⅼѕ tһat share the same interest.
If you have anyy recommendations, plеase let me know.
Kudos! https://www.indianyouthclub.org/14-oxwin77-games-produsen-saldo-biaya-termudah-pasti-membayar/
Terrific post but I was wondering if you could write a litte more on this subject? I’d be very thankful if you could elaborate a little bit further. Cheers!
I ρaay a visіt each day some web ⲣages ɑnd blogs to read articleѕ or reviews,
eⲭcept thіs weblog presentѕ feature based рoѕts. https://Beeinmotionri.org/idnscore-tempat-spekulasi-permainan-online-link-alternatif-jkt77-slot-deposit-pulsa-jempolan-serta-terlindung/
Hi there, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam feedback? If so how do you prevent it, any plugin or anything you can recommend? I get so much lately it’s driving me crazy so any help is very much appreciated.
Counter-Strike: Global Offensive (CSGO) is one of the most fashionable multiplayer shooters in the world. For players looking to make better their skills, many simulation and training platforms have been created. take a look at what’s included in the enumeration of the best.
Hello there I am so glad I found your site, I really found you by error, while I was searching on Aol for something else, Nonetheless I am here now and would just like to say thanks for a remarkable post and a all round interesting blog (I also love the theme/design), I don’t have time to look over it all at the minute but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep up the excellent work.
Hurrah, that’s what I was seeking for, what a information! existing here at this blog, thanks admin of this website.
I was curious if you ever thought of changing the layout of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 pictures. Maybe you could space it out better?
Hey I am so delighted I found your site, I really found you by mistake, while I was browsing on Google for something else, Anyways I am here now and would just like to say kudos for a remarkable post and a all round interesting blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep up the superb b.
The conciliator will discuss the arbitration process and answer any type of concerns.
I’m gone to inform my little brother, that he should also pay a quick visit this weblog on regular basis to obtain updated from most up-to-date news update.
Hi there, after reading this amazing paragraph i am too happy to share my experience here with friends.
My brother suggested I might like this website. He was entirely right.
This post actually made my day. You cann’t imagine simply how much
time I had spent for this information! Thanks!
7 Things You’ve Never Known About Local SEO Services Near Me Price
https://volga.news/683470/article/kak-vygodno-arendovat-nedvizhimost-v-sochi.html
Great goods from you, man. I have take into account your stuff prior to and you are just too excellent. I actually like what you’ve got right here, really like what you are saying and the way in which wherein you assert it. You make it enjoyable and you continue to care for to stay it smart. I cant wait to read far more from you. That is really a terrific web site.
Hello, I would like to subscribe for this web site to get newest updates, so
where can i do it please assist.
I’m not suгe ᴡһere yoᥙ’re gеtting youг informatiοn, bսt greɑt topic.I
neeԁѕ tto spend sme tіmе learning mⲟre or understanding more.
Thanis f᧐r excellent info Ι was ⅼooking fοr
thiss infoгmation for my mission.
Ꮮook at my web site – Miss Vixen – Addicted To Eating It
Модуль имеет два типа сверловки для установки крепежа и может быть закреплен вертикально и горизонтально.
Hi, after reading this amazing paragraph i am too happy to share my knowledge here with mates.
What Is Corner Sofa Grey Fabric And Why Is Everyone Talking About It?
2 seater Sofa fabric
What’s The Job Market For Online Mystery Box Professionals Like?
mystery box (maps.google.com.ua)
8 Tips To Enhance Your Private Psychology Assessment
Game Comprehensive Psychiatric Assessment
Zhao Ling directly asked the Fox Pill King for medicinal materials priligy dapoxetine
It’s actually a cool and useful piece of information. I am happy that
you simply shared this useful info with us. Please stay
us informed like this. Thank you for sharing.
Review my homepage; รับจัดงานแต่งงาน
This Week’s Most Popular Stories Concerning Door Hinge Repair Cambridge door seal repair Near me
15 Documentaries That Are Best About Electric Sport Scooters Electric mobility scooter adult
The Biggest “Myths” About Live Casino Could Be A Lie 프라그마틱 순위
It’s remarkable to visit this site and reading the views of
all mates about this post, while I am also eager of getting familiarity.
You’ve made some really good points there. I looked on the
net to find out more about the issue and found most individuals will go along with your views on this site.