Link

GlusterFS fix faulty bricks

Great tutorial to manage glusterFS

https://gluster.readthedocs.io/en/latest/Administrator%20Guide/Managing%20Volumes/#replace-brick

 

if you are getting error like

volume add-brick: failed: Incorrect number of bricks supplied 1 with count 2

Then you are trying to add  distribute leg, which requires multiple bricks based on replication setting, try following command

gluster vol add-brick <vol-name> <brick1><brick2>

 

Advertisements
NMAP TLS/SSL cipher suites a particular website offers

List the SSL/TLS cipher suites a particular website offers

 Command Line

Nmap with ssl-enum-ciphers 

This will be a very simple and and  faster way to get a list of available ciphers from a network service.  and nmap will provide a strength rating of strong, weak, or unknown for each available cipher. Which will help to determine overall strength of server security.

nmap --script ssl-enum-ciphers -p 443 www.example.com

To install nmap on osx run : brew install nmap

sslscan

sslscan is a also nice little utility to get details regarding website ssl.
To install on osx run : brew install sslscan

Online Tool

SSL Labs‘ website also have good tool to test tls/ssl ciphers and other utility.

Source : http://superuser.com/questions/109213/how-do-i-list-the-ssl-tls-cipher-suites-a-particular-website-offers

 

OpenSSH 7.3 on CentOs 6.7

A simple script to upgrade OpneSSH on CentOs 6.7.

To use you can run following command with root user

bash <( curl -s https://gist.githubusercontent.com/faishal/add912b9b4c3899ec26c488a91446a84/raw/e9297f357b35c7da9d1bbd1a401a5c38434b068b/upgrade-openssh-7.3p1-centos-6.7.sh ) 

AWS S3 Sync using Crontab

  1. Install AWS cli
    #Download cli script
    curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
    #unzip
    unzip awscli-bundle.zip
    #install
    ./awscli-bundle/install -b ~/bin/aws
    
  2. Create crontab script file : sync-s3.sh
    #/bin/bash
    export AWS_CONFIG_FILE="/root/.aws/config" #change it as per user
    export AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXHRQ
    export AWS_SECRET_ACCESS_KEY=XXXXXXXfHyR
    /usr/local/bin/aws s3 sync /var/www/testsite.com/htdocs/wp-content/uploads s3://my-imagestore/ --acl=public-read --debug
  3. Add crontab to sync s3 folder every 5 min : crontab -e
    */5 * * * * /bin/bash /root/sync-s3.sh >> /tmp/sync-s3.log
Link

How to add Swap on ubuntu

https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04