Posts

Showing posts with the label tutorial

How to Enable HSTS in Webmin

HSTS, which is short for HTTP Strict Transport Security, is a security feature that lets a web site tell browsers that it should only be communicated with using HTTPS, instead of using HTTP. This tutorial will help you setting HSTS in webmin. First, navigate to "Servers"-->"Apache Webserver", click the virtual server with SSL enabled which you want to edit. Then click "Edit Directives" to edit configuration file manually. Second, add the following configs to the bottom of the file. Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;" Click "Save and close" and restart Apache by clicking the "Apply Changes" on the top right. It's done and now HTTP Strict Transport Security has been enabled. You can run a ssl test here to find if it was enabled.

How to Enable Forward Secrecy in Webmin

It's pretty easy to enable Forward Secrecy in Webmin, here is the instruction. First, navigate to "Servers"-->"Apache Webserver", click the virtual server with SSL enabled which you want to edit. Then click "Edit Directives" to edit configuration file manually. Second, add the following configs to the bottom of the file, if it were exist, replace them. SSLProtocol all -SSLv2 -SSLv3 SSLHonorCipherOrder on SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4" Click "Save and close" and restart Apache by clicking the "Apply Changes" on the top right. It's done and now Forward Secrecy has been enabled. You can run a ssl test here to find if it was enabled.

Hide Apache Software Version and Module Version

Image
By default, Apache will show its version and moudules installed in HTTP Header and error messages pages. It's vulnerable and dangerous, we need to make changes in Apache main configuration file. According to your Linux distribution, you can find Apache main configuration here: /etc/httpd/conf/httpd.conf (RHEL/CentOS/Fedora) /etc/apache/apache2.conf (Debian/Ubuntu)   Edit the Apache configuration file, find and change the following directives. Restart Apache and it's done. ServerSignature Off ServerTokens Prod   ServerSignature is used to set what to show when there is an error, for example, 404 eror (Page Not Found). There are three values for ServerSignature directive, Off, On and Email. The difference between On and Email is if you choose Email you will see a "mailto:" link to ServerAdmin.   The above image is not showing any Apache information, with ServerSignature set to value Off. The above image is showing Apache and OS information, with Ser...

How to Use Find Command to Find Files

find is a linux command for recursively filtering objects in the file system based on simple conditions. It's pretty easy to use this command to search files and directories. Find files by name or extensions If you want to find all .html files on /var/www/ directory, just type the following command into the computer find /var/www/ -name "*.html" If you want to delete all the files founded by the previous command, please add -delete option to the end of the previous command. Please carefully use this option when you are certain that the results only match the files that you wish to delete. find /var/www/ -name "*.html" -delete Find files by modification time If you want to find files by modification time, just add -mtime option. Here is the command for you to find all the .php files in /var/www/ directory modified in 3 day. find /var/www -name "*.php" -mtime 3 Find files based on content If you need to search files based on the conte...

ONE-CLICK L2TP/IPSec VPN Installer

Today, I am sharing you a one-click l2tp vpn installer. It's pretty easy to install and use. Before you run the script, make sure that your VPS is not a OpenVZ VPS. This script has been installed on Vultr successfully. Step 1 Run the following commands one by one. wget --no-check-certificate https://raw.githubusercontent.com/teddysun/across/master/l2tp.sh chmod +x l2tp.sh ./l2tp.sh Step 2 Input the information needed according to the instruction the script given. For example, IP range, PSK, username and password. Several minutes later, your L2TP/IPsec VPN server is running. Step 3 If you want to add and delete users, here is a list of commands. l2tp -a : Add a user l2tp -d : Delete a user l2tp -m : Modifies all the passwords of existing users l2tp -l : List all the username and passwords l2tp - h : Help This script of one-click l2tp vpn is pretty straight forward, give it a try, and you will find it is a time saver.