Blogs » WildCoast.Com's blog

Create OpenVPN server

apt-get install openvpn easy-rsa

323 make-cadir /etc/openvpn/certs
324 cd openvpn/certs/
326 ln -s openssl-1.0.0.cnf openssl.cnf
328 nano vars
329 source ./vars
330 ./clean-all
331 ./build-ca
332 ./clean-all
336 ./build-ca
337 ./build-key-server server
338 openssl dhparam 4096 > /etc/openvpn/dh4096.pem
339 openvpn --genkey --secret /etc/openvpn/certs/keys/ta.key
340 gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf
Or use sample edited already

343 nano server.conf
344 adduser --system --shell /usr/sbin/nologin --no-create-home openvpn
345 nano server.conf
346 systemctl start openvpn
347 ls-ltr
348 ls -ltr
349 systemctl start openvpn@server
350 ls -l
351 nano server.conf
352 systemctl start openvpn
353 systemctl start openvpn@server
354 journalctl -xe
355 systemctl start openvpnatserver [dot] cnf
356 systemctl status openvpnatserver [dot] cnf [dot] service
357 systemctl start openvpn
358 ifconfig
359 nano server.conf
360 systemctl start openvpn@server
361 systemctl status openvpnatserver [dot] cnf [dot] service
362 mv server.cnf server.conf
363 systemctl start openvpn@server
364 systemctl status openvpnatserver [dot] cnf [dot] service
365 journalctl -xe
366 nano server.conf
367 ls -al /etc/openvpn/certs/keys/
368 fg
369 systemctl start openvpn@server
370 systemctl start openvpn@server -l
371 systemctl status openvpnatserver [dot] service
372 journalctl -xe
373 tail -f /var/log/syslog
374 ls -ltr /var/log
375 ls -ltr
376 cat openvpn.log
377 nano server.conf
378 ps -A|grep openv
379 systemctl start openvpn
380 systemctl start openvpn@server
381 cat openvpn.log
382 ifconfig
383 # systemctl status openvpn*.service
384 systemctl enable openvpn
385 systemctl enable openvpn@server
386 cd certs/
387 ls -l
388 source ./vars
389 ./build-key prionyx
390 ls-al
391 ls -al
392 ls -altr
393 ls -altr
394 ls -altr keys/
395 cd ../client/
396 cp /usr/share/doc/openvpn/examples/sample-config-files/client.conf /etc/openvpn/client/client.ovpn
397 nano client.ovpn
398 ls -ltr ../certs/keys/
399 fg
400 ls -l
401 mv client.ovpn prionyx.conf
402 tar cJf /etc/openvpn/client/prionyx.tar.xz -C /etc/openvpn/certs/keys ca.crt prionyx.crt prionyx.key ta.key -C /etc/openvpn/client/prionyx.conf
403 ls -l
404 rm prionyx.tar.xz
405 mkdir prionyx
406 mv prionyx.conf prionyx/
407 cp ../certs/{ca.crt,prionyx.crt,prionyx.key,ta.key} prionyx/
408 cp ../certs/keys/{ca.crt,prionyx.crt,prionyx.key,ta.key} prionyx/
409 ls -l prionyx/
410 tar czvf prionyx.ovpn prionyx/
411 scp prionyx.ovpn prionyx.waspa.org.za:
412 scp prionyx.ovpn jeffatprionyx [dot] waspa [dot] org [dot] za:
413 ifconfig
 

Add new comment