Install ModSecurity on Debian

To install ModSecurity on Debian/Ubuntu Apache web server, run

Restart Apache web server

Verify mod_security installed with

To activate ModSecurity rules, run



Get latest rules

Emable the config file

Edit file


Restart Apache

apt force IPv4

One of my internet provider only provide IPv4 connection. When i run apt install command, it failed with error as it try to connect using IPv6.

To force apt to use IPv4 only, edit


If you want to force IPv6, add

Install Elasticsearch on Debian for Magento

To install Elasticsearch for Magento on Debian, install Java 1.8 and apt-transport-https

Add key

Add repository

Install Elasticsearch

Enable and start Elasticsearch

debconf: unable to initialize frontend: Dialog

When installing a program in Ubuntu 18.04 server minimal installation, i get following error

To fix this, run

Related Posts



tor browser

Tor Hidden Service in Ubuntu/Debian

tor browser

To install tor on Ubuntu/Debian, run

Default configuration file for tor is /etc/tor/torrc

To enable hidden service, edit /etc/tor/torrc

uncomment lines

Create folder for your hidden service

You need to install Apache/Nginx etc.. to serve your web application. Make sure to configure web application listen on

Now restart tor with command

Ubuntu/Debian support multiple instances of tor. You can use command “/usr/sbin/tor-instance-create” to create new tor instance. Configuration for instanced tor available at /etc/tor/instances/INSTANCE_NAME/torrc

To see URL for your Hidden service, run


You should be able to visit the application using .onion link in Tor Browser.

You need to take backup of tor folder (/var/lib/tor/hidden_service) as it contains your secret keys, this is needed to use the .onion domain name. If you lose this, you will lose the .onion url.

To start the service on boot, run

See Tor

Install ShadowSocks server on Debian 10

To install ShadowSocks server on Debian 10, run

Create config file

Add following

You can change server_port if required.

To enable service, run

To start shadowsocks proxy, run

For status/restart

Install RabbitMQ on Ubuntu/Debian

To install rabbitmq on Ubuntu/Debian, run

To start RabbitMQ server, run

Debian 10

How to upgrade Debian 9 to Debian 10

To upgrade Debian 9 to Debian 10, first make sure your system is uptodate.

Edit file /etc/apt/sources.list. Find all occurance of “stretch” and replace it with “buster”.

Or use following

Now update the system

run dist-upgrade

During the upgrade, you will be asked to replace some of the configuration files. If this is a fresh server, you can always replace these files with newer version. If your server have these files modified, you should be careful as replacing these files will lose the changes you made.

Debian 10 upgrade

Reboot the server.

After reboot, you can verify server is running Debian 10 with commands

Debian 10

Installing r1soft server backup agent on Debian/Ubuntu

To install r1soft server backup agent on Ubuntu/Debian, add repository

Install agent

Install kernal headers

Install kernal modules

Verify backup agent works with

Start backup agent

Now you can add the server to R1Soft Backup Manager.