diff --git a/ec2/gateway/product/public1-1/socat-dbconnection-1a.service b/ec2/gateway/product/public1-1/socat-dbconnection-1a.service new file mode 100644 index 00000000..551ac04d --- /dev/null +++ b/ec2/gateway/product/public1-1/socat-dbconnection-1a.service @@ -0,0 +1,10 @@ +[Unit] +Description = socat-dbconnection-1a + +[Service] +ExecStart = /opt/socat-portforwarding-1a.sh +Type = oneshot +RemainAfterExit = yes + +[Install] +WantedBy = default.target \ No newline at end of file diff --git a/ec2/gateway/product/public1-1/socat-portforwarding-1a.sh b/ec2/gateway/product/public1-1/socat-portforwarding-1a.sh new file mode 100644 index 00000000..c257a075 --- /dev/null +++ b/ec2/gateway/product/public1-1/socat-portforwarding-1a.sh @@ -0,0 +1,3 @@ +#!/bin/bash +socat tcp4-listen:40001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster-instance-1.chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & +socat tcp4-listen:50001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster.cluster-chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & \ No newline at end of file diff --git a/ec2/gateway/product/public2-1/socat-dbconnection-1d.service b/ec2/gateway/product/public2-1/socat-dbconnection-1d.service new file mode 100644 index 00000000..a7f9be7c --- /dev/null +++ b/ec2/gateway/product/public2-1/socat-dbconnection-1d.service @@ -0,0 +1,10 @@ +[Unit] +Description = socat-dbconnection-1d + +[Service] +ExecStart = /opt/socat-portforwarding-1d.sh +Type = oneshot +RemainAfterExit = yes + +[Install] +WantedBy = default.target \ No newline at end of file diff --git a/ec2/gateway/product/public2-1/socat-portforwarding-1d.sh b/ec2/gateway/product/public2-1/socat-portforwarding-1d.sh new file mode 100644 index 00000000..0f1d2747 --- /dev/null +++ b/ec2/gateway/product/public2-1/socat-portforwarding-1d.sh @@ -0,0 +1,3 @@ +#!/bin/bash +socat tcp4-listen:40001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster-instance-1-ap-northeast-1d.chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & +socat tcp4-listen:50001,reuseaddr,fork TCP:mbj-newdwh2021-product-dbcluster.cluster-chs11qsgoyix.ap-northeast-1.rds.amazonaws.com:3306 & \ No newline at end of file