2020 m. gruodžio 17 d., ketvirtadienis

OpenVPN

VPN

VPN stands for “virtual private network.” 

VPN protocols:

  • IKEv2 - the fast favorite on mobile OS.
  • OpenVPN - a reliable open-source classic.
  • Shadowsocks - top choice in restrictive countries.
  • WireGuard® - modern and secure solution.


Pros

  •     Hide from prying eyes on the internet
    • Avoid ISP throttling.
    • Get the best deals for online shopping.
    • Access blocked content (websites and apps).
  •     Browse the internet securely 
    • Stay safe on public wifi.
    • Safely share and download files.  


An IPsec

IPsec is a collection of protocols. Internet Protocol Security.

IPsec protocols are usually grouped by the tasks they do: 
  • Authentication Headers 
  • Encapsulating Security Payloads (ESP)
  • Security Associations (SA)
    • And IKEv2 (Internet Key Exchange version 2)

An IPsec VPN is one that uses the IPsec protocol to establish a VPN connection.

IPsec: transport mode vs. tunnel mode


TLS

 HTTPS is an implementation of TLS encryption on top of the HTTP protocol, which is used by all websites as well as some other web services. Any website that uses HTTPS is therefore employing TLS encryption.


What does TLS do?

  •     Encryption: hides the data being transferred from third parties.
  •     Authentication: ensures that the parties exchanging information are who they claim to be.
  •     Integrity: verifies that the data has not been forged or tampered with.



Certificate Authority (CA) 


 PKI (public key infrastructure). The PKI consists of:

  • a separate certificate (also known as a public key) and private key for the server and each client, and
  • a master Certificate Authority (CA) certificate and key which is used to sign each of the server and client certificates.



Compression

By default, OpenVPN doesn't enable compression. This script provides support for LZ0 and LZ4 (v1/v2) algorithms, the latter being more efficient.

However, it is discouraged to use compression since the VORACLE attack makes use of it.

TLS version

OpenVPN accepts TLS 1.0 by default, which is nearly 20 years old.

With tls-version-min 1.2 we enforce TLS 1.2, which the best protocol available currently for OpenVPN.

TLS 1.2 is supported since OpenVPN 2.3.3.




Openvpn


openvpn install script:


$ root@debian:~#  cat /etc/debian_version
9.8

# List of connected users
$ tail  /var/log/openvpn/status.log
$ tail -f -n 15 /var/log/openvpn/status.log
$ watch -d tail  /var/log/openvpn/status.log

# Telnet 25 port test
$ telnet  mx-a.delfi.lt 25
Exiting  Ctrl+] 
Telnet > close



 # Statusas apie Userius:
tail  /var/log/openvpn/status.log
watch -d tail  /var/log/openvpn/status.log


ngix


sudo apt install nginx -y
sudo apt-get install php-fpm

# Change ngix config
nano /etc/nginx/sites-available/default

# Test configurations
nginx -t

php



# Restarting service
$ systemctl restart php7.0-fpm.service

# Configure php
$ nano /etc/php/7.0/fpm/php.ini



<html>
<title>VPN</title>
<body>
<?php include_once '/var/www/html/vpn-parser.php';
$file="vpn_status.log";
$users = parseLog($file);


foreach($users['users'] as $user) {
  echo $user['name'];
  echo " ";
  echo $user['ip'];
  echo '<br>';
}
?>
</body>
</html>



2020 m. gruodžio 16 d., trečiadienis

2020 m. gruodžio 6 d., sekmadienis

Šviesa

  • Apšvietimo lygis. lx
    Renkantis lemputės ryškumą, Jums bus aktualūs liumenai, kuriais matuojamas šviesos srautas: kuo liumenų daugiau, tuo lemputė švies ryškiau.

  • Spalvinė temperatūra, matuojama kelvinais.
     Pagal vietą, kurioje bus naudojamas apšvietimas, rinkitės lemputės spalvinę temperatūrą (ji nurodoma kelvinais). Kuo daugiau kelvinų, tuo balta spalva „šaltesnė“, tiksianti darbingai aplinkai, ir kuo jų mažiau, tuo balta „šiltesnė“, tiksianti miegamajam ar kitoms patalpoms, kuriose intensyvus apšvietimas nebūtinas. 

    • Kuo daugiau kelvinų, tuo šaltėja spalva.
    • Juvelyrika ir sidabras 5000K-6000K kad išryškėtų metališkumas.




  • Šviesos sklidimo kampas
    Jei lemputę naudosite kryptingam apšvietimui, pravartu atkreipti dėmesį į šviesos sklidimo kampą, pavyzdžiui, šviestuvui prie lovos reikalingas siauras kampas, o plataus kampo LED lempa tinkama naudoti bendram patalpos apšvietimui. 
  • Šviesos apsaugos klasė (dulkės vanduo).

Apšvietimas


Lemputės: Spectrum LED
6W veikia kaip 46W.
4K kelvinų, Balta.
Viena pusė, dvi  lempos: 540 lm  * 2 = 1080 lm
Visos lempos:  540 lm * 3 =  1602 lm






Droselis

Droselis naudojamas srovės ribojimui.

Droselis vaidina lemiamą vaidmenį veikiant fluorescencinei lempai, nes sukuria priimtinas sąlygas tokio tipo apšvietimo įtaisui veikti: jis sulaiko didėjančią srovę tam tikru lygiu, o tai leidžia išlaikyti pakankamą įtampą lemputės elektroduose.
  • užtikrinant fluorescencinės lempos, kuriai taip pat reikalingas starteris, veikimą;
  • sugebėjimas apriboti srovę tam tikru lygiu;


  • 2020 m. lapkričio 26 d., ketvirtadienis

    Heroku frontend from subdirectory

    Runing react frontend(node) in heroku from subdirectory:

    Logging to heroku:

    $ heroku apps

    $ heroku git:remote -a takai-front

    $ heroku logs --tail


    Using buildpack: 

    https://github.com/timanovsky/subdir-heroku-buildpack

    2020 m. lapkričio 16 d., pirmadienis

    Razen palyginimas








     

    2020 m. lapkričio 15 d., sekmadienis

    ThinkPad E14 Gen 2 Issues

    Issues:

     

    Linux configs:

    More in-depth reviews:


    2020 m. lapkričio 4 d., trečiadienis