Linux, Networking, Opensource, Server

Mengamankan Server Linux [Tips] Part I

Matikan Akses SSH Root

/var/log/auth.log coba cek log siapa saja yang mencoba masuk kedalam server melalui SSH.

Nov  2 21:09:56 mars sshd[29617]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=119.188.3.56  user=root
Nov  2 21:09:58 mars sshd[29617]: Failed password for root from 119.188.3.56 port 53661 ssh2
Nov  2 21:10:02 mars sshd[29619]: Invalid user abuse from 119.188.3.56
Nov  2 21:10:02 mars sshd[29619]: pam_unix(sshd:auth): check pass; user unknown
Nov  2 21:10:02 mars sshd[29619]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=119.188.3.56 
Nov  2 21:10:04 mars sshd[29619]: Failed password for invalid user abuse from 119.188.3.56 port 55378 ssh2
Nov  2 21:10:08 mars sshd[29621]: Invalid user ac from 119.188.3.56
Nov  2 21:10:08 mars sshd[29621]: pam_unix(sshd:auth): check pass; user unknown
Nov  2 21:10:08 mars sshd[29621]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=119.188.3.56 
Nov  2 21:10:10 mars sshd[29621]: Failed password for invalid user ac from 119.188.3.56 port 56595 ssh2

 

Matikan SSH --> nano /etc/ssh/sshd_config
PermitRootLogin no
Buat user dengan nama se alay mungkin tapi mudah diingat.
usermod -G wheel alay321
usermod -G sudo alay321
-wheel untuk RHEL
-sudo untuk DEB

Tambahkan baris ini:
di DEB:
%sudo ALL=(ALL) ALL

di Redhat:

%wheel ALL=(ALL) ALL
Test dengan login ke Server dengan SSH user alay321. setelah itu jadikan root dengan perintah.
sudo -i

 

 


 

Advertisements
Standard

samba

Ppentest

[dokumentasi] window to linux

Image
Linux, Networking, Opensource, Server

Dokumentasi: Samba Debian

Windows Ready to share.

OS. Debian Ready

  1.  gnome-commander
  2. samba allready shared

Installing SWAT DEBIAN

#apt-get install swat xinetd

#nano /etc/xinetd.d/swat

service swat
{
port            = 901
socket_type     = stream
wait            = no
only_from       = 192.168.56.101/24
user            = root
server          = /usr/sbin/swat
log_on_failure  += USERID
disable         = no
}

#xinet.d restart#Samba restart

>>Pict Gnome-Commander

gnome-commander

 

 

Standard