Last active
November 24, 2016 18:28
-
-
Save OutOfBrain/83728a41b3af868c16b23ae695b21c7b to your computer and use it in GitHub Desktop.
Start an openssh server on the fly somewhere- still missing installing docker in the first place
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # curl https://gist.githubusercontent.com/.../startopenssh.sh | bash | |
| wget https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz | |
| tar -xvzf docker-latest.tgz | |
| mv docker/* /usr/bin/ | |
| nohup dockerd & | |
| OVPN_DATA="ovpn-data" | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://$(ifconfig | grep -A 5 eth0 | awk -F':' '/inet addr/&&!/127.0.0.1/{split($2,_," ");print _[1]}') | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn sh -c 'echo -e "yes\nblep\n" | ovpn_initpki nopass' | |
| docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full thecert nopass | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient thecert > thecert.ovpn | |
| cat thecert.ovpn | |
| echo $(ifconfig | grep -A 5 eth0 | awk -F':' '/inet addr/&&!/127.0.0.1/{split($2,_," ");print _[1]}')/thecert.ovpn | |
| docker run --rm -p 80:80 -v $PWD:/data php:7.0-cli php -t /data -S 0.0.0.0:80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment