Sunday, May 31, 2020

LinkedIn Jobs export extension for Firefox



https://addons.mozilla.org/en-US/firefox/addon/linked-jobs-export/



Friday, May 15, 2020

Angular 8 app hosted in Nginx server gets 404 page when refreshed

Angular 8 app hosted in Nginx server gets 404 page when refreshed

This is because of NGINX not able to find the index.html of Angular app

modify the site-available/default config file of nginx like below 


try_files $uri $uri/ /index.html;
server {
        listen 80;
        listen [::]:80;

        root /var/www/example.com/html;

    index index.html index.htm index.nginx-debian.html;

        server_name example.com www.example.com;

        location / {
            try_files $uri $uri/ /index.html;
         }
}

Friday, May 8, 2020

Get Youtube thumbnail easily using Firefox Android extension

Get Youtube thumbnail easily using Firefox Android extension.

This extension is supported both on desktop and Android Firefox versions

https://addons.mozilla.org/en-US/firefox/addon/yutube-thumb/

Desktop version demo


Mobile version demo






REDIS server security in Ubuntu or any other Linux OS

If Redis server is not configured correctly for security, it can be affected by malware and bots.
These malware make use of server CPU and memory. They can install cron jobs also which will run in background.

If you abnormal usage of CPU , check the the process which is taking more CPU

running this command "top".

If redis-server is the process taking more CPU. Enable logs for redis.

By default logs are not enabled in redis.conf config file.

# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile "/your-path/redis.log"


Also apply file permission and ownership to redis user for the file redis.log




There are many ways you can make REDIS server  secure.

1. First thing is use REDIS as localhost , never attach any public IP to it.
           
               use configuration edit your redis.conf file search and fine bind


               bind 127.0.0.1   

        2. Second important thing is enable password for Redis

            edit redis.conf  file

            requirepassword <strong password>

        3. Disble dangerous Redis CLI commands
        
             in redis.conf search for rename-command
            
           rename-command CONFIG ""
  rename-command BGREWRITEAOF ""
  rename-command BGSAVE ""
  rename-command SAVE ""
  rename-command SPOP ""
  rename-command SREM ""
  rename-command RENAME ""
  rename-command DEBUG ""
  rename-command FLUSHDB ""
  rename-command FLUSHALL ""
  rename-command KEYS ""
  rename-command PEXPIRE ""
  rename-command DEL ""
  rename-command SHUTDOWN ""