OpenSSL how to decode SSL certificate file

OpenSSL

To decode SSL certificate the following command can be used: Example command output: Certificate: Data: Version: 3 (0x2) Serial Number: 2b:2e:6e:ea:d9:75:36:6c:14:8a:6e:db:a3:7c:8c:07 Signature Algorithm: sha384WithRSAEncryption Issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Certification Authority Validity Not Before: Feb 12 00:00:00 2014 GMT Not After : Feb 11 23:59:59 2029 GMT Subject: C=GB, ST=Greater … Continue reading OpenSSL how to decode SSL certificate file

Connect to remote MySQL server via SSH tunnel

To connect to remote MySQL server via SSH tunnel run commands: Where 3307 local port, 1.2.3.4 remote MySQL server IP, 3306 remote MySQL port, taras – valid SSH user name. To check if tunnel connection has been set up: Connect to remove MySQL server using local SSH tunnel:

Debian 7 IPTables set up

To set up persistent IPTables rules on Debian GNU/Linux 7 (wheezy) install package using command: Save current IPTables rules using command: Edit /etc/iptables/rules.v4 file for IPv4 and /etc/iptables/rules.v6 for IPv6 rules. To apply new rules run command: Loading iptables rules… IPv4… IPv6…done. To view current IPTables rules:

Git edit remote origin URL

To edit remote origin URL in Git configuration file can be edited: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote “origin”] url = ssh://git@bitbucket.org/podlom/example.git fetch = +refs/heads/*:refs/remotes/origin/* Where url = ssh://git@bitbucket.org/podlom/example.git new example path. To check new settings use command: origin ssh://git@bitbucket.org/podlom/example.git (fetch) origin ssh://git@bitbucket.org/podlom/example.git (push)

Create second MySQL database and give privileges to one user

To create second MySQL database and give privileges to the same user the following commands can be used: SHOW CREATE DATABASE `database_name`; will show first MySQL create database DDL SQL query. CREATE DATABASE `database_name2` /*!40100 DEFAULT CHARACTER SET utf8 */; will create second MySQL database. SHOW GRANTS FOR database_user; is used to view current user … Continue reading Create second MySQL database and give privileges to one user