Upload PKCS#12 Server Certificates to AWS

AWS IAM Certificate Manager

1. Extract RSA Private key

2. Extract Certificate

3. Extract Certificate Chains

4. Trimming  Certificates for AWS

5. Upload Key & Certificates to AWS via CLI

Using request of JSON Payload in Slim framework

Slim Framework

How to enable JSON-Payload input in Slim Framework… SlimMiddlewareContentTypes.php



MySQL Procedure Pattern for Nested Transaction


The MySQL dose not supports ‘Nested Transaction’. Transactions cannot be nested. This is a consequence of the implicit commit performed for any current transaction when you issue a START TRANSACTION statement or one of its synonyms. (https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html) But I want to use ‘Stored Procedure’ what work well with a transaction independently and with nested calling. This pattern isn’t correct nested transactions, but enables the use of nested procedures. The basic idea is to use the @@ AUTOCOMMIT environment variable. The procedure will determine whether the transaction is started from the ‥‥‥

Install OpenVPN on openSUSE


0. Plan Public IF : eth1 ( Private IF : eth0 ( Virtual Tunneling IF : tun0 ( 1. Download and install packages

2. Install EasyRSA and create server ertificates

3. Configuration for PAM-plugin

4. Configuration for rsyslog

5. Configure SuSEfirewall

6. Configure IP setting shell script

7. Status file script and add to cron job

8. Configure OpenVPN and Start service Run yast Add network device “tun0” type TUN Assign tun0 to External Network at Firewall 9. Configure OpenVPN and Start service

  ∗ Create new client certificate ‥‥‥

Enable SFTP Logging on OpenSUSE

1. Update rsyslog(syslog) configuration

2. SSHD Configuration file


Chroot for SFTP on OpenSUSE

1. Add chroot to SSHD Configuration file

2. Mount directory to home directory


MySQL, Checking the IP address in a range

fn_ipv4_match( needle, haystack ) Returns 1 if haystack contains needle. needle : IPv4 address haystack : IPv4 address, IPv4 address with subnet mask, IPv4 address with netmask bits



Install DKIMproxy on OpenSUSE

1. Install requirements

2. Create keys

3. Configuration file

4. Setting up postfix

5. Restart services

6. Add DNS record (sender’s domain)

  ♦ References http://dkimproxy.sourceforge.net/usage.html

Install nginx + php-fpm on openSUSE

1. Download and install packages

2. Configure php-fpm

3. Configure php-fpm

4. Configure nginx for reverse proxy

5. Restart service

♦ ulimit for open files

  ♦ References http://www.howtoforge.com/perfect-server-opensuse-12.2-x86_64-nginx-dovecot-ispconfig-3-p4 https://www.linux.co.kr/home2/board/subbs/board.php?bo_table=lecture&wr_id=1685 http://stackoverflow.com/questions/7325211/tuning-nginx-worker-process-to-obtain-100k-hits-per-min http://www.codestance.com/tutorials-archive/nginx-tuning-for-best-performance-255 https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration  

MSSQL table to json procedure

Return json string from table data. — Author: Matthew D. Erwin (Snaptech, LLC) — Create date: May 9, 2013   — Modify: Aiden Kim, May 30, 2014