Linux important files

~/.bashrc script what is run when you log in to shell non-interactively (for example via su command) or open a separate shell ~/.bash_profile script what is run when you log in to shell interactively way ( login, password) example if you remote connect to ssh.

Linux cheatsheet – usefull commands

Network netstat -tulpn | grep LISTEN show all opened TPC/UDP sockets sudo ip link set eth0 up enable/disable network interface eth0-interface name up/down cat /etc/services | less list of services and ports

Essentials linux commands

exit Exit actual session, exit from the program whatis [command] Show a one-line description of the command clear clear terminal window man [command] show manual page for command less [file] allow you to view, search in many ways in text files pwd print current working directory ls list files/folders in the directory cd change directory …

Essentials linux commands Read More »

Linux cheat sheet

A Standard Linux Directory Structure Below is a reference to the basic structure of directories for most Linux distributions. Find more at the Linux Filesystem Hierarchy Standard, on Wikipedia. / – the root or base of the filesystem /bin – operating system binaries /boot – Linux kernel and programs run at startup /dev – devices /etc – system configuration files /home – …

Linux cheat sheet Read More »

Apache – Top 10 IP addresses accessing your Apache webserver

Default log paths /var/log/http/access_log [For RedHat based systems] /var/log/apache2/access.log [For Debian based systems] /var/log/http-access.log [For FreeBSD] Command Output 5482 Command explain awk ‘{ print $1}’ access.log – take the access.log and print first group (separated by white space) sort – sort records uniq -c – …

Apache – Top 10 IP addresses accessing your Apache webserver Read More »

Fail2Ban – unban IP

First, you need to connect to the terminal and find the right jail. Open terminal iptables -L -n to find the rule name, it could be quite messy so I recommend skip this step 🙂 fail2ban-client status to show names of all fail2ban jails For F2B before v0.8.8 ffail2ban-client get YOURJAILNAMEHERE actionunban IPADDRESSHERE For F2B …

Fail2Ban – unban IP Read More »