docker openvpn ubuntu 16.04











first create a variable for assign the name volume docker

Terminal:
OVPN_DATA="ovpn-data-example"

we create to volume
Terminal:
docker volume create --name $OVPN_DATA

run the docker specif the domain of you server
Terminal:
docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
generate certificates
Terminal:
docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki

start the vpn process
Terminal:
docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn

create client without password
Terminal:
docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass

create client with password
Terminal:
docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME

insert the configuration client the file

Terminal:
docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn


full command
Terminal:
OVPN_DATA="ovpn-data-server" && CLIENTNAME=phone && sudo docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa build-client-full $CLIENTNAME nopass && sudo docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_getclient $CLIENTNAME > $CLIENTNAME.ovpn && cp $CLIENTNAME.ovpn /tmp/



client android or windows with openvpn application

client linux

Terminal:
sudo apt-get install openvpn


actually the client linux have a bug is necessary specif comp-lzo no
Terminal:
sudo openvpn --config CLIENTNAME.ovpn --comp-lzo no

connect without redirect
Terminal:
sudo openvpn --config CLIENTNAME.ovpn --comp-lzo no --pull-filter ignore redirect-gateway


or with gui client










client configuration no route all traffic through vpn server

remove this in file:
Terminal:
redirect-gateway def1

add this in file:

Terminal:
pull-filter ignore "dhcp-option DNS"
pull-filter ignore "route"
route-nopull
route 10.0.0.0 255.255.0.0



cliente connect check






0 comentarios :

drush install ubuntu 16.04










Terminal:
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

Terminal:
sudo chmod +x /usr/local/bin/docker-compose

Terminal:
composer require drush/drush:8.x-dev

Terminal:
sudo apt install php-mysql mysql-client

Terminal:
sudo apt install php-mysql mysql-client


change to setting in drupal 127.0.0.1 if you use xampp

run commands

Terminal:
vendor/bin/drush pm-list --status=enabled

install

Terminal:
vendor/bin/drush dl <package>
enable
Terminal:
vendor/bin/drush en <package>






















0 comentarios :

youtube-dl




download and install

Terminal:
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl

Terminal:
sudo apt-get install ffmpeg

set ejecution
Terminal:
sudo chmod a+x /usr/local/bin/youtube-dl


update

Terminal:
sudo youtube-dl -U



help
Terminal:
youtube-dl -h



download type video
Terminal:
youtube-dl -F https://www.youtube.com/watch?v=j_JgXJ-apXs -ciw


download video best quality
Terminal:
youtube-dl -f bestvideo+bestaudio http://www.youtube.com/watch?v=P9pzm5b6FFY -ciw

Terminal:
171         webm      audio only  DASH webm audio , audio@ 48k (worst)
140         m4a       audio only  DASH audio , audio@128k (worst)
160         mp4       144p        DASH video , video only
133         mp4       240p        DASH video , video only
134         mp4       360p        DASH video , video only
135         mp4       480p        DASH video , video only
136         mp4       720p        DASH video , video only
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     
22          mp4       1280x720    (best)

Terminal:
youtube-dl -f 22 http://www.youtube.com/watch?v=P9pzm5b6FFY -ciw



If you want to download Youtube video in mp3 audio format, then it is also possible with the following command

Terminal:
youtube-dl https://www.youtube.com/watch?v=j_JgXJ-apXs -x --audio-format mp3 -ciw




























1 comentarios :

drupal console in project drupal 8


Install console drupal

Download console drupal

Terminal:
curl https://drupalconsole.com/installer -L -o drupal.phar

Move console to directory bin 
Terminal:
sudo mv drupal.phar /usr/local/bin/drupal

Assign execution permissions
Terminal:
chmod +x /usr/local/bin/drupal

Change to directory your drupal 8
Terminal:
cd ~/yourDirectory/drupal8/

it is necesary, install for compose the console drupal 8
Terminal:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader

Generate a new module
Terminal:
drupal generate:module


Generate Block element of module create before (here you can specif the field to use in the block)

Terminal:
drupal generate:plugin:block



in drupal install module and after go to structure -> block -> add block | search you block create before





after you add content for each field, save and ready you can a block of your module


0 comentarios :