How to Mount a USB Drive in Debian Linux

Most Linux distributions are configured to automatically mount USB devices as soon as they are inserted into the USB ports. The system itself mounts the USB drives to a directory under /media folder and you can access them using your File Manager. However, in some cases, you are still required to mount the USB drives manually in order to access them.


In this article, we will discuss how to mount a USB drive in a Debian OS in case it is not detected by the system automatically.

How to Mount

Install and Configure Zabbix Agent on Ubuntu 20.04/18.04

Zabbix agent is a program developed in C. It runs on various supported platforms, including Linux, UNIX, and Windows. The work of the Zabbix agent is to collect data such as CPU, memory, disk and network interface usage from a device. It has a small resource footprint considering that monitoring configurations are centralized on Zabbix server.

Read more

Create MariaDB windows service using sc command

Sometimes I’d had difficulty manually creating service in windows, especially mariadb or mysql. Here it is how to do it

sc create "maria55" binpath= "\"d:/var/apps/Maria-10.1.22-x64/bin/mysqld\" \"--defaults-file=d:/var/mysql/conf/mysql-99.ini\" maria55" DisplayName= "Maria55" start= "auto"
sc create [ServiceName]

mysqld bin location: d:\var\apps\Maria-10.1.22-x64\bin
configuration: d:\var\mysql\conf\mysql-99.ini

To delete service

sc delete [ServiceName]

Howto Clear Bash History in Linux

Sometime you need to clear bash history for some reason like privacy or something else. Clearing bash history is pretty simple just run this command in your linux terminal

history -c

Or

rm ~/.bash_history

Prevent Saving History

You can add the command to your ~/.bash_logout so that history will get cleared everytime you logout from terminal

echo 'history -c' >> ~/.bash_logout

Finding Max History Can Be Stored

echo $HISTSIZE
1000

My history stored in ~/.bash_history file can hold up to 1000 last commands

Mikrotik Brute Force Login Prevention

/ip firewall filter
add chain=input protocol=tcp dst-port=21 src-address-list=ftp_blacklist action=drop \
comment="drop ftp brute forcers"

add chain=output action=accept protocol=tcp content="530 Login incorrect" dst-limit=1/1m,9,dst-address/1m

add chain=output action=add-dst-to-address-list protocol=tcp content="530 Login incorrect" \
address-list=ftp_blacklist address-list-timeout=3h

add chain=input protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop \
comment="drop ssh brute forcers" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new \
src-address-list=ssh_stage3 action=add-src-to-address-list address-list=ssh_blacklist \
address-list-timeout=10d comment="" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new \
src-address-list=ssh_stage2 action=add-src-to-address-list address-list=ssh_stage3 \
address-list-timeout=1m comment="" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1 \
action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m comment="" disabled=no

add chain=input protocol=tcp dst-port=22 connection-state=new action=add-src-to-address-list \
address-list=ssh_stage1 address-list-timeout=1m comment="" disabled=no