SSH PORT CHANGE and BLOCK PORT SCANNING on Linux Ubuntu 18.04

Опубликовано: 07 Октябрь 2024
на канале: Safron Proxy Script
430
5

In this video you will learn how to enable SSH Root login and then change SSH Port and also Block Port Scanning.
The Commands used in this tutorial are as follows.
==================================
Enable Root Login: and change SSH PORT
==================================
vi /etc/ssh/sshd_config
change port 22 to any desired port
port 62223 (example)
search for PermitRootLogin then
PermitRootLogin yes
systemctl restart sshd.service

=========================
For Block Port Scanning
=========================
apt-get update
apt-get install psad
vi /etc/rsyslog.conf
Add the following line.
kern.info |/var/lib/psad/psadfifo
/etc/init.d/rsyslog restart
vi /etc/psad/psad.conf
change the hostname
/etc/init.d/psad restart

iptables -A INPUT -j LOG
iptables -A FORWARD -j LOG
ip6tables -A INPUT -j LOG
ip6tables -A FORWARD -j LOG

psad -R
psad --sig-update
psad -H
/etc/init.d/psad restart