Skip to content

Instantly share code, notes, and snippets.

@kylemanna
Last active July 6, 2020 15:15

Revisions

  1. kylemanna revised this gist Nov 4, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gogo-firewall-bypass.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    #!/bin/bash
    #
    # Blog post @ https://blog.kylemanna.com/sharing/gogo-inflight-wireless-with-openvpn/
    #

    # Bail on errors
    set -e
  2. kylemanna revised this gist Nov 4, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gogo-firewall-bypass.sh
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ cat <<EOF
    ---------------------------------------
    \ ^__^
    \ (oo)\_______
    (__)\ )\/\
    (__)\ )\/\
    ||----w |
    || ||
    EOF
  3. kylemanna revised this gist Nov 4, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gogo-firewall-bypass.sh
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u u
    echo "[+] Generated server config for $SERVER_IP"

    echo "[*] Initialzing PKI (insecurely) for the truely lazy"
    docker run -v $OVPN_DATA:/etc/openvpn --rm -it -e "EASYRSA_BATCH=1" kylemanna/openvpn ovpn_initpki nopass
    docker run -v $OVPN_DATA:/etc/openvpn --rm -e "EASYRSA_BATCH=1" kylemanna/openvpn ovpn_initpki nopass
    echo "[+] Initialized PKI magic"

    echo "[*] OpenVPN server starting up"
    @@ -21,7 +21,7 @@ echo "[+] OpenVPN server up and running"

    CLIENT=client1
    echo "[*] Generating client certificate for $CLIENT"
    docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full $CLIENT nopass
    docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn easyrsa build-client-full $CLIENT nopass
    docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient $CLIENT > $CLIENT.ovpn
    echo "[*] Client certificate ready at $CLIENT.ovpn"

  4. kylemanna revised this gist Nov 4, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gogo-firewall-bypass.sh
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ docker run -v $OVPN_DATA:/etc/openvpn --rm -it -e "EASYRSA_BATCH=1" kylemanna/op
    echo "[+] Initialized PKI magic"

    echo "[*] OpenVPN server starting up"
    docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:3128/udp --cap-add=NET_ADMIN kylemanna/openvpn
    docker run -v $OVPN_DATA:/etc/openvpn -d -p 3128:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn
    echo "[+] OpenVPN server up and running"

    CLIENT=client1
  5. kylemanna revised this gist Nov 4, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gogo-firewall-bypass.sh
    Original file line number Diff line number Diff line change
    @@ -3,13 +3,13 @@
    # Bail on errors
    set -e

    SERVER_IP=""
    SERVER_IP=$(host myip.opendns.com. resolver1.opendns.com | awk '/has address/ { print $4 }')

    OVPN_DATA="ovpn-data"

    echo "[*] Generating server config"
    echo "[*] Generating server config for $SERVER_IP"
    docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://$SERVER_IP:3128
    echo "[+] Generated server config"
    echo "[+] Generated server config for $SERVER_IP"

    echo "[*] Initialzing PKI (insecurely) for the truely lazy"
    docker run -v $OVPN_DATA:/etc/openvpn --rm -it -e "EASYRSA_BATCH=1" kylemanna/openvpn ovpn_initpki nopass
  6. kylemanna revised this gist Nov 4, 2016. No changes.
  7. kylemanna created this gist Nov 4, 2016.
    39 changes: 39 additions & 0 deletions gogo-firewall-bypass.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    #!/bin/bash

    # Bail on errors
    set -e

    SERVER_IP=""

    OVPN_DATA="ovpn-data"

    echo "[*] Generating server config"
    docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://$SERVER_IP:3128
    echo "[+] Generated server config"

    echo "[*] Initialzing PKI (insecurely) for the truely lazy"
    docker run -v $OVPN_DATA:/etc/openvpn --rm -it -e "EASYRSA_BATCH=1" kylemanna/openvpn ovpn_initpki nopass
    echo "[+] Initialized PKI magic"

    echo "[*] OpenVPN server starting up"
    docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:3128/udp --cap-add=NET_ADMIN kylemanna/openvpn
    echo "[+] OpenVPN server up and running"

    CLIENT=client1
    echo "[*] Generating client certificate for $CLIENT"
    docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full $CLIENT nopass
    docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient $CLIENT > $CLIENT.ovpn
    echo "[*] Client certificate ready at $CLIENT.ovpn"

    cat <<EOF
    _______________________________________
    < Server up and running, happy surfing >
    ---------------------------------------
    \ ^__^
    \ (oo)\_______
    (__)\ )\/\
    ||----w |
    || ||
    EOF
    echo "[?] Copy $CLIENT.ovpn to your client"
    echo "[x] Exiting"