1
0
mirror of /repos/dotTiddlywiki.git synced 2025-12-30 07:31:33 +01:00
2016-01-14 20:45:35 +01:00

21 lines
893 B
Plaintext

created: 20160112092216044
creator: user
modified: 20160112092714009
modifier: user
tags:
title: socat
type: text/vnd.tiddlywiki
; socat - Multipurpose relay (SOcket CAT)
: http://www.dest-unreach.org/socat/doc/socat.html
da magic oneliner into production databases:
explanation of what it does:
* log into dispatcher.informaat-cxp.com
* forward local port 27027 to preview.local:27027
* log into preview.local
* start docker container connected to mongo container and expose mongo:27017 port on preview.local:27027
```
ssh-agent bash -c "ssh-add ./roles/common/files/keys/id_rsa.silo ; ssh-add ./docker/silo/id_rsa ; ssh -A -l ubuntu dispatcher.informaat-cxp.com -L 27027:preview.local:27027 -t ssh -A preview.local -t docker run --rm -it --link ubuntu_mongo_1:ubuntu_mongo_1 -p 27027:27027 defensative/socat-ubuntu -dddd -ls TCP-LISTEN:27027,reuseaddr,fork TCP:ubuntu_mongo_1:27017"
```