20T30 OpenVPN – Utwardzanie konfiguracji
👉 Ograniczenie do silnych metod szyfrowania
👉 Użycie silnych metod wymiany klucza
Odszyfrowanie starszych algorytmów to kwestia minut. Jeżeli chcesz się zabezpieczyć przed takim scenariuszem, wysłuchaj tego odcinka.
W tym odcinku pokazuję „utwardzić” (ang. Hardening) konfigurację OpenVPN w 2020r.
Poniżej znajdziesz dwa pliki konfiguracyjne z opisami przedstawionych w odcinku lini konfiguracji:
# Sample client-side OpenVPN 2.0 config file for connecting to multi-client server.
# This configuration can be used by multiple clients, however each client should have its own cert and key files.
# On Windows, you might want to rename this file so it has a .ovpn extension
# Specify that we are a client and that we # will be pulling certain config file directives # from the server. client
# Use the same setting as you are using on # the server. # On most systems, the VPN will not function # unless you partially or fully disable # the firewall for the TUN/TAP interface. ;dev tap dev tun
# Windows needs the TAP-Win32 adapter name # from the Network Connections panel # if you have more than one. On XP SP2, # you may need to disable the firewall # for the TAP adapter. ;dev-node MyTap
# Are we connecting to a TCP or # UDP server? Use the same setting as # on the server. ;proto tcp proto udp
# The hostname/IP and port of the server. # You can have multiple remote entries # to load balance between the servers. remote openv.netadminpro.pl 1194 ;remote my-server-2 1194
# Choose a random host from the remote # list for load-balancing. Otherwise # try hosts in the order specified. ;remote-random
# Keep trying indefinitely to resolve the # host name of the OpenVPN server. Very useful # on machines which are not permanently connected # to the internet such as laptops. resolv-retry infinite
# Most clients don't need to bind to # a specific local port number. nobind
# Downgrade privileges after initialization (non-Windows only) ;user nobody ;group nogroup
# Try to preserve some state across restarts. persist-key persist-tun
# If you are connecting through an # HTTP proxy to reach the actual OpenVPN # server, put the proxy server/IP and # port number here. See the man page # if your proxy server requires # authentication. ;http-proxy-retry # retry on connection failures ;http-proxy [proxy server] [proxy port #]
# Wireless networks often produce a lot # of duplicate packets. Set this flag # to silence duplicate packet warnings. ;mute-replay-warnings
# SSL/TLS parms. # See the server config file for more # description. It's best to use # a separate .crt/.key file pair # for each client. A single ca # file can be used for all clients. ;ca ca.crt ;cert client.crt ;key client.key
# Verify server certificate by checking that the # certicate has the correct key usage set. # This is an important precaution to protect against # a potential attack discussed here: # http://openvpn.net/howto.html#mitm # # To use this feature, you will need to generate # your server certificates with the keyUsage set to # digitalSignature, keyEncipherment # and the extendedKeyUsage to # serverAuth # EasyRSA can do this for you. remote-cert-tls server
# If a tls-auth key is used on the server # then every client must also have the key. ;tls-auth ta.key 1
# Select a cryptographic cipher. # If the cipher option is used on the server # then you must also specify it here. # Note that v2.4 client/server will automatically # negotiate AES-256-GCM in TLS mode. # See also the ncp-cipher option in the manpage cipher AES-128-GCM
ncp-disable #don't negotiate ciphers, we know what we want # TLS 1.3 encryption settings tls-ciphersuites TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 # TLS 1.2 encryption settings tls-cipher TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256:TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256:TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
tls-client #be the client side of the TLS handshake tls-cert-profile preferred #require certificates to use modern key sizes and signatures remote-cert-tls server #require server certificates to have the correct extended key usage tls-client #be the client side of the TLS handshake tls-cert-profile preferred #require certificates to use modern key sizes and signatures
# Enable compression on the VPN link. # Don't enable this unless it is also # enabled in the server config file. # comp-lzo
# Set log file verbosity. verb 3
# Silence repeating messages ;mute 20
<ca> FB0vfqc38vXKI4NWbBWGU1tP+e9jUJw39tepTMPofcPkGpMcQky7ykeaWDmgi77j EuUmMT93+NoESola7NsMomb9ZI6LGMo56gqYzY3c0/XChXGUoOczQaDFN8BR+guL rQW66HoMyd3bh32af3U0XzzdZRVqVZal2xmsAWSBitDBuK+emi1GW5dd+CNBjsRD cH3H+DT3re29Q4aHEgaTnXMRES6OlhyKF3j4qu0btBA+2lN8fkhnYQkiVc2wEqdy DpMk4hjqaskcMNabPxHD78dAlZvID6QGKwIDAQABo4GLMIGIMB0GA1UdDgQWBBTp gihS04Wj4G8CcaPCvPCuMFk+GzBMBgNVHSMERTBDgBTpgihS04Wj4G8CcaPCvPCu MFk+G6EVpBMwETEPMA0GA1UEAwwGTkFQLUNBghRr7S9nOdFO79XMnK+VczGdIGrq LzAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAQEA sY4dQk9L73b1vgfegxTJwU2mYoKh7AJjYDlE4w5MVOJ0LgXZm2gMfR0ik8YYU5Xg eE5nRXD0P8uaZnDnLlXa8WWOLqdu9RZUoRKqN2eeA83luJiri+bdjmlJl/hB/L32 ikJrPx7Dh2i7eEHAuuZvckAG1lPxcglQRPidgM3vvLVHOZ1yHugL4YrovdNGG6hn df4kiko4bqSb1DmHKo7GLhu5r/uri03NlLv0i0lVu56yd1LwhfLnJXEiP3nmTR9g aMLZCPTqrhP1wWSjT+1N12HEDoaC9Z8sptJz9d4bOF7zlbhgBry2N1+fQ/EjG7tI Q/hH+7inufhg+y1flS0+lQ== -----END CERTIFICATE----- </ca>
<cert> vWWf0V87mB6JATgdYzdRNG+m8oyzRUC/mcgSgbJZU/p7cDLPpXXn7Nvote3nV8SF ZZ8wc+7KEXHA7vesfefsfkjNspJB7bs4VAtqZOgMlIHdTZ53hXb6iQ9WLy+q/mIw h5M7J/fAkIyQOuT4dTapHirHaLMPd+btCY5p56eP6oZm7IOzoD6Mi4v8Y0ClHbhx qo3gotmBBJYiTr7CkqormbHM4SUPmAPahXY0dPR5pcluVv3i/Sehi/uZFB4h1yYL TUxClS5CcY+6dM22aiPqGWjYwm8ZAgMBAAGjgZ0wgZowCQYDVR0TBAIwADAdBgNV HQ4EFgQUKAzscBHlX9pYx1cr2g8tWQkuccwwTAYDVR0jBEUwQ4AU6YIoUtOFo+Bv AnGjwrzwrjBZPhuhFaQTMBExDzANBgNVBAMMBk5BUC1DQYIUa+0vZznRTu/VzJyv lXMxnSBq6i8wEwYDVR0lBAwwCgYIKwYBBQUHAwIwCwYDVR0PBAQDAgeAMA0GCSqG SIb3DQEBCwUAA4IBAQCjWTSFGMwsGGfDBSIMPMEkMr3UWeX4xJH2yac4k88E1E/S 6/IREBq2kZanWCavfGJoLR1MIoHI+0nhAoduVver4VPcB6/b/PP4uW4g01Tqh/R8 sybxvIhvN6tgr6w393rE6I3LiANm3HGuxKIL9MwEF0ZdWwYttz3K88RE8/iXswQX fIOzItuIa+c1I/5SfrXvHZuYRy0F5LdEx02MVI6VbuRgJ+wAKQ3FO/pxpsZrNTZJ 9P8ucuqvgsAf+EC8GRtaOllUtLJKxHY/sTnH5Ut+45CsOrO/wuXNyR2syKgCYlws Hofk2gvFdxjFEfB7YANEsLotNw4sY5nT8EDW8qaz -----END CERTIFICATE----- </cert>
<key> gvl5FFujlxBttuRM/oMXR6wrHxvA4qn0dTtmw/4lCtTUdOsVDJUpHx7GF/gQTDGZ 2octSkgGRJm6p/BC45NacW4n -----END PRIVATE KEY----- </key>
key-direction 1 <tls-auth> # # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- 4bf740bb588e47ac777e1a82d8def71e -----END OpenVPN Static key V1----- </tls-auth>
Drugi:
# # Sample OpenVPN 2.0 config file for # multi-client server. # # This file is for the server side # of a many-clients <-> one-server # OpenVPN configuration. # # OpenVPN also supports # single-machine <-> single-machine # configurations (See the Examples page # on the web site for more info). # # This config should work on Windows # or Linux/BSD systems. Remember on # Windows to quote pathnames and use # double backslashes, e.g.: # "C:\Program Files\OpenVPN\config\foo.key" # # Comments are preceded with '#' or ';' #
# Which local IP address should OpenVPN # listen on? (optional) ;local a.b.c.d
# Which TCP/UDP port should OpenVPN listen on? # If you want to run multiple OpenVPN instances # on the same machine, use a different port # number for each one. You will need to # open up this port on your firewall. port 1194
# TCP or UDP server? ;proto tcp proto udp
# "dev tun" will create a routed IP tunnel, # "dev tap" will create an ethernet tunnel. # Use "dev tap0" if you are ethernet bridging # and have precreated a tap0 virtual interface # and bridged it with your ethernet interface. # If you want to control access policies # over the VPN, you must create firewall # rules for the the TUN/TAP interface. # On non-Windows systems, you can give # an explicit unit number, such as tun0. # On Windows, use "dev-node" for this. # On most systems, the VPN will not function # unless you partially or fully disable # the firewall for the TUN/TAP interface. ;dev tap dev tun
# Windows needs the TAP-Win32 adapter name # from the Network Connections panel if you # have more than one. On XP SP2 or higher, # you may need to selectively disable the # Windows firewall for the TAP adapter. # Non-Windows systems usually don't need this. ;dev-node MyTap
# SSL/TLS root certificate (ca), certificate # (cert), and private key (key). Each client # and the server must have their own cert and # key file. The server and all clients will # use the same ca file. # # See the "easy-rsa" directory for a series # of scripts for generating RSA certificates # and private keys. Remember to use # a unique Common Name for the server # and each of the client certificates. # # Any X509 key management system can be used. # OpenVPN can also use a PKCS #12 formatted key file # (see "pkcs12" directive in man page). ca ca.crt cert nap-openvpn-serv.crt key nap-openvpn-serv.key # This file should be kept secret
# Diffie hellman parameters. # Generate your own with: # openssl dhparam -out dh2048.pem 2048 dh none ecdh-curve secp384r1
# CRL key klucz zawierajace odwolane certyfikaty crl-verify crl.pem
# Network topology # Should be subnet (addressing via IP) # unless Windows clients v2.0.9 and lower have to # be supported (then net30, i.e. a /30 per client) # Defaults to net30 (not recommended) ;topology subnet
# Configure server mode and supply a VPN subnet # for OpenVPN to draw client addresses from. # The server will take 10.8.0.1 for itself, # the rest will be made available to clients. # Each client will be able to reach the server # on 10.8.0.1. Comment this line out if you are # ethernet bridging. See the man page for more info. server 10.8.0.0 255.255.255.0
# Maintain a record of client <-> virtual IP address # associations in this file. If OpenVPN goes down or # is restarted, reconnecting clients can be assigned # the same virtual IP address from the pool that was # previously assigned. ifconfig-pool-persist /var/log/openvpn/ipp.txt
# Configure server mode for ethernet bridging. # You must first use your OS's bridging capability # to bridge the TAP interface with the ethernet # NIC interface. Then you must manually set the # IP/netmask on the bridge interface, here we # assume 10.8.0.4/255.255.255.0. Finally we # must set aside an IP range in this subnet # (start=10.8.0.50 end=10.8.0.100) to allocate # to connecting clients. Leave this line commented # out unless you are ethernet bridging. ;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
# Configure server mode for ethernet bridging # using a DHCP-proxy, where clients talk # to the OpenVPN server-side DHCP server # to receive their IP address allocation # and DNS server addresses. You must first use # your OS's bridging capability to bridge the TAP # interface with the ethernet NIC interface. # Note: this mode only works on clients (such as # Windows), where the client-side TAP adapter is # bound to a DHCP client. ;server-bridge
# Push routes to the client to allow it # to reach other private subnets behind # the server. Remember that these # private subnets will also need # to know to route the OpenVPN client # address pool (10.8.0.0/255.255.255.0) # back to the OpenVPN server. push "route 10.2.3.0 255.255.255.0"
# To assign specific IP addresses to specific # clients or if a connecting client has a private # subnet behind it that should also have VPN access, # use the subdirectory "ccd" for client-specific # configuration files (see man page for more info).
# EXAMPLE: Suppose the client # having the certificate common name "Thelonious" # also has a small subnet behind his connecting # machine, such as 192.168.40.128/255.255.255.248. # First, uncomment out these lines: ;client-config-dir ccd ;route 192.168.40.128 255.255.255.248 # Then create a file ccd/Thelonious with this line: # iroute 192.168.40.128 255.255.255.248 # This will allow Thelonious' private subnet to # access the VPN. This example will only work # if you are routing, not bridging, i.e. you are # using "dev tun" and "server" directives.
# EXAMPLE: Suppose you want to give # Thelonious a fixed VPN IP address of 10.9.0.1. # First uncomment out these lines: ;client-config-dir ccd ;route 10.9.0.0 255.255.255.252 # Then add this line to ccd/Thelonious: # ifconfig-push 10.9.0.1 10.9.0.2
# Suppose that you want to enable different # firewall access policies for different groups # of clients. There are two methods: # (1) Run multiple OpenVPN daemons, one for each # group, and firewall the TUN/TAP interface # for each group/daemon appropriately. # (2) (Advanced) Create a script to dynamically # modify the firewall in response to access # from different clients. See man # page for more info on learn-address script. ;learn-address ./script
# If enabled, this directive will configure # all clients to redirect their default # network gateway through the VPN, causing # all IP traffic such as web browsing and # and DNS lookups to go through the VPN # (The OpenVPN server machine may need to NAT # or bridge the TUN/TAP interface to the internet # in order for this to work properly). ;push "redirect-gateway def1 bypass-dhcp"
# Certain Windows-specific network settings # can be pushed to clients, such as DNS # or WINS server addresses. CAVEAT: # http://openvpn.net/faq.html#dhcpcaveats # The addresses below refer to the public # DNS servers provided by opendns.com. push "dhcp-option DNS 208.67.222.222" push "dhcp-option DNS 208.67.220.220"
# Uncomment this directive to allow different # clients to be able to "see" each other. # By default, clients will only see the server. # To force clients to only see the server, you # will also need to appropriately firewall the # server's TUN/TAP interface. ;client-to-client
# Uncomment this directive if multiple clients # might connect with the same certificate/key # files or common names. This is recommended # only for testing purposes. For production use, # each client should have its own certificate/key # pair. # # IF YOU HAVE NOT GENERATED INDIVIDUAL # CERTIFICATE/KEY PAIRS FOR EACH CLIENT, # EACH HAVING ITS OWN UNIQUE "COMMON NAME", # UNCOMMENT THIS LINE OUT. ;duplicate-cn
# The keepalive directive causes ping-like # messages to be sent back and forth over # the link so that each side knows when # the other side has gone down. # Ping every 10 seconds, assume that remote # peer is down if no ping received during # a 120 second time period. keepalive 10 120
# For extra security beyond that provided # by SSL/TLS, create an "HMAC firewall" # to help block DoS attacks and UDP port flooding. # # Generate with: # openvpn --genkey --secret ta.key # # The server and each client must have # a copy of this key. # The second parameter should be '0' # on the server and '1' on the clients. tls-auth ta.key 0 # This file is secret
# Select a cryptographic cipher. # This config item must be copied to # the client config file as well. # Note that v2.4 client/server will automatically # negotiate AES-256-GCM in TLS mode. # See also the ncp-cipher option in the manpage tls-version-min 1.2 tls-version-max 1.3 or-highest # use the highest available version if 1.3 isn't available # data channel cipher cipher AES-128-GCM ncp-disable #don't negotiate ciphers, we know what we want
# TLS 1.3 encryption settings tls-ciphersuites TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
# TLS 1.2 encryption settings tls-cipher TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256:TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256:TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
tls-server remote-cert-tls client #require client certificates to have the correct extended key usage verify-client-cert require #reject connections without certificates tls-cert-profile preferred #require certificates to use modern key sizes and signatures
# Enable compression on the VPN link and push the # option to the client (v2.4+ only, for earlier # versions see below) ;compress lz4-v2 ;push "compress lz4-v2"
# For compression compatible with older clients use comp-lzo # If you enable it here, you must also # enable it in the client config file. ;comp-lzo
# The maximum number of concurrently connected # clients we want to allow. ;max-clients 100
# It's a good idea to reduce the OpenVPN # daemon's privileges after initialization. # # You can uncomment this out on # non-Windows systems. user nobody group nogroup
# The persist options will try to avoid # accessing certain resources on restart # that may no longer be accessible because # of the privilege downgrade. persist-key persist-tun
# Output a short status file showing # current connections, truncated # and rewritten every minute. status /var/log/openvpn/openvpn-status.log
# By default, log messages will go to the syslog (or # on Windows, if running as a service, they will go to # the "\Program Files\OpenVPN\log" directory). # Use log or log-append to override this default. # "log" will truncate the log file on OpenVPN startup, # while "log-append" will append to it. Use one # or the other (but not both). ;log /var/log/openvpn/openvpn.log log-append /var/log/openvpn/openvpn.log
# Set the appropriate level of log # file verbosity. # # 0 is silent, except for fatal errors # 4 is reasonable for general usage # 5 and 6 can help to debug connection problems # 9 is extremely verbose verb 3
# Silence repeating messages. At most 20 # sequential messages of the same message # category will be output to the log. ;mute 20
# Notify the client that when the server restarts so it # can automatically reconnect. explicit-exit-notify 1
Chcesz więcej informacji?
Dołącz do naszej strony fanów na Facebook:
Więcej miejsc do posłuchania:
Transkrypcja filmu:
0:00:01.940,0:00:04.540
Cześć. Interesuje Cię w jaki sposób
0:00:04.540,0:00:07.400
utwardzić konfigurację OpenVPN-a .
0:00:07.400,0:00:09.440
Jak zabezpieczyć się, żeby
0:00:09.675,0:00:12.945
ten dostęp zdalny był maksymalnie bezpieczny.
0:00:13.255,0:00:16.705
Jeżeli tak, to to jest odcinek właśnie dla Ciebie.
Open VPN – Utwardzanie konfiguracji
0:00:16.815,0:00:19.845
Omawianie utwardzania konfiguracji
0:00:19.845,0:00:22.860
zacznę od dwóch plików.
0:00:22.860,0:00:25.200
Żeby łatwiej było je porównać, to
0:00:25.200,0:00:29.140
otworzyłem plik konfiguracyjny serwera po lewej stronie
0:00:29.860,0:00:34.000
i plik konfiguracyjny klienta OpenVPN-a po prawej stronie.
0:00:34.440,0:00:37.580
Więc jeżeli chodzi o utwardzanie konfiguracji,
0:00:37.580,0:00:42.180
to tutaj jest kilka rzeczy, na które warto zwrócić uwagę.
0:00:42.180,0:00:45.820
Najpierw popatrzmy na ten plik konfiguracyjny serwera.
0:00:46.300,0:00:49.220
Mamy tutaj standardowo informacje o plikach,
0:00:49.220,0:00:51.900
kluczach CA i poniżej
0:00:51.900,0:00:54.860
pierwsza rzecz, którą warto rozważyć do zmiany.
0:00:55.260,0:00:58.620
Czyli, żeby wyłączyć używanie Diffie-Hellmana.
0:00:58.820,0:01:03.020
Natomiast zastosować mocniejszą metodę
0:01:03.360,0:01:09.320
czyli ecdh curve i tutaj odpowiedni algorytm.
0:01:09.320,0:01:11.815
Jest to silniejszy sposób
0:01:11.815,0:01:15.035
zabezpieczenia wymiany kluczy niż Diffie-Hellman,
0:01:15.060,0:01:17.580
ale oczywiście trzeba mieć na uwadze,
0:01:17.580,0:01:21.440
że wymaga to również zmiany tego klucza,
0:01:21.440,0:01:24.620
czyli pliku, który generowaliśmy wcześniej.
0:01:24.620,0:01:26.925
Kolejnym elementem, który
0:01:26.925,0:01:29.925
ja przy swojej instalacji już zastosowałem,
0:01:29.925,0:01:31.680
ale warto na to zwrócić uwagę,
0:01:31.680,0:01:35.620
to jest możliwość weryfikacji czy dany certyfikat,
0:01:35.800,0:01:38.880
który łączy się z naszym serwerem OpenVPN
0:01:38.880,0:01:42.220
nie jest odwołany, czyli mamy tutaj plik,
0:01:42.280,0:01:44.060
w którym możemy odwoływać
0:01:44.060,0:01:48.680
certyfikaty, które mają się już nie łączyć do naszego serwera.
0:01:48.840,0:01:52.240
Kolejny element, który też ja w swojej konfiguracji
0:01:52.245,0:01:54.985
pierwotnie dodałem, ale warto zwrócić na to uwagę
0:01:55.280,0:01:57.680
to jest dodatkowy poziom zabezpieczenia
0:01:57.980,0:02:02.280
sesji TLS-owej, konkretnie fazy nawiązywania,
0:02:02.480,0:02:06.740
czyli klucz symetryczny, który szyfruje pliki
0:02:07.080,0:02:11.440
czy pakiety, związane z nawiązywaniem połączenia TLS-owego.
0:02:11.620,0:02:17.160
Więc ja stworzyłem taki plik ta key i używam go symetrycznie.
0:02:17.400,0:02:20.500
Czyli jak popatrzymy sobie na stronę klienta, tu po prawej stronie
0:02:20.800,0:02:25.120
to tutaj też będzie taki plik.
0:02:27.560,0:02:31.000
Czyli tutaj też powinien być włączony ten plik
0:02:31.015,0:02:33.035
i odkomentowany.
0:02:33.985,0:02:36.905
Tak, czyli to jest strona klienta.
0:02:37.375,0:02:39.315
No i idziemy dalej.
0:02:39.800,0:02:42.540
Co tu mamy dalej, jeżeli chodzi o zabezpieczenia.
0:02:42.540,0:02:45.340
Mamy wyższy poziom
0:02:45.340,0:02:48.600
zabezpieczeń, jeżeli chodzi o wymaganie dla TLS-a.
0:02:49.100,0:02:52.300
Domyślnie w konfiguracji OpenVPN-a mamy
0:02:52.300,0:02:54.220
duży nacisk również na zgodność,
0:02:54.220,0:02:56.600
w związku z tym są dopuszczone metody
0:02:56.600,0:03:00.800
słabsze, które wiadomo dzisiaj, że są podatne,
0:03:01.040,0:03:05.720
ale w niektórych środowiskach są wymagane, żeby kompatybilność wsteczną zachować.
0:03:05.720,0:03:11.080
Jeżeli nie masz takiej sytuacji, że musisz się z czymś już istniejącym łączyć
0:03:11.080,0:03:13.400
to zdecydowanie po stronie serwera
0:03:13.540,0:03:17.600
należy skonfigurować metodę najsilniejszą,
0:03:17.720,0:03:20.855
czyli ja mam tu minimum 1.2 tls-a
0:03:20.860,0:03:23.220
a jeżeli jest wspierane coś wyższego
0:03:23.220,0:03:25.800
to oczywiście jak najbardziej
0:03:26.020,0:03:28.180
chętnie chciałbym z tego skorzystać.
0:03:28.180,0:03:32.120
Czyli te dwie linijki mówią, że minimum 1.2
0:03:32.120,0:03:36.380
a 1.3 albo wyżej jeżeli jest taka możliwość.
0:03:36.380,0:03:39.720
Tu ciekawostka, jeżeli chodzi o stronę klienta
0:03:39.720,0:03:45.440
to oczywiście też trzeba taki poziom konfiguracji dodać.
0:03:45.440,0:03:49.080
Natomiast tutaj jeżeli chodzi o stronę klienta,
0:03:49.080,0:03:53.280
to dla ustawień Windowsa
0:03:53.280,0:03:56.480
nie jest wspierany tls 1.3,
0:03:56.480,0:03:59.640
przynajmniej na poziomie, który sprawdzałem.
0:03:59.860,0:04:01.940
W związku z tym, klientów którzy
0:04:01.940,0:04:04.395
podłączają Linuxy można już obsługiwać
0:04:04.400,0:04:06.700
w tym schemacie tls 1.3.
0:04:06.700,0:04:10.980
W tym schemacie tls 1.2 będą obsługiwani klienci Windowsowi.
0:04:11.320,0:04:14.435
Ja w swoim środowisku mam głównie klientów Windowsowych,
0:04:14.440,0:04:19.640
w związku z tym tutaj trzymam się w zasadzie 1.2 tls-a.
0:04:19.640,0:04:22.280
Kolejna rzecz to jest mocniejszy algorytm
0:04:22.280,0:04:26.120
po stronie zarówno serwera jak i po stronie klienta.
0:04:26.120,0:04:30.880
Czyli mamy tutaj aes 128 gcm.
0:04:32.420,0:04:38.020
I tu po stronie klienta też widać, że jest aes 128 gcm.
0:04:39.120,0:04:43.100
Co więcej możemy ustawić po stronie klienta i serwera,
0:04:43.100,0:04:45.180
żeby ten parametr nie był negocjowalny,
0:04:45.180,0:04:47.160
zarówno z jednej jak i z drugiej strony.
0:04:47.160,0:04:51.700
Ustawienia algorytmów, które są wspierane w ramach tls-a 1.3
0:04:52.260,0:04:55.240
To samo musi być po obu stronach, czyli klient i serwer.
0:04:55.620,0:05:02.040
I podobnie jeżeli chodzi o ustawienia algorytmów po stronie klienta i serwera dla tls 1.2
0:05:02.580,0:05:05.220
Czyli tu mamy również powtórzone.
0:05:05.740,0:05:07.580
Co więcej możemy ustawić.
0:05:07.580,0:05:10.600
Ustawiamy jeszcze, że ten konkretnie
0:05:10.940,0:05:13.140
plik konfiguracyjny jest związany z serwerem,
0:05:13.520,0:05:16.580
czyli że ta maszyna jest w funkcji serwera.
0:05:16.960,0:05:21.180
Tutaj mamy po drugiej stronie, że jest to funkcja klienta.
0:05:21.180,0:05:24.800
Dodatkowo możemy wymagać wyższych
0:05:24.800,0:05:28.740
standardów, jeżeli chodzi o profil certyfikatu tls
0:05:28.740,0:05:30.480
po stronie klienta.
0:05:30.600,0:05:34.300
Możemy weryfikować certyfikat
0:05:34.300,0:05:36.560
zarówno od strony klienta do serwera
0:05:36.800,0:05:40.200
jak i od strony serwera do klienta.
0:05:40.380,0:05:43.415
Tu jest dodatkowo wymaganie, że wszystkie połączenia niezwiązane
0:05:43.420,0:05:47.200
z certyfikatem, czyli bez certyfikatu muszą być odrzucone po stronie serwera.
0:05:47.200,0:05:51.440
To jest dodatek. I to jest taka główna część, jeżeli chodzi o zabezpieczanie
0:05:51.440,0:05:55.200
– wzmacnianie tej konfiguracji po stronie OpenVPN-a.
0:05:55.500,0:05:58.220
Co jeszcze mamy po stronie serwera,
0:05:58.860,0:06:01.220
czego nie mamy po stronie klienta.
0:06:01.220,0:06:03.900
Jest obniżenie jeszcze uprawnień dla
0:06:03.900,0:06:06.380
tego użytkownika, dla tego procesu
0:06:06.380,0:06:08.980
na którym jest uruchomiony OpenVPN.
0:06:08.980,0:06:13.480
Czyli w przypadku, z jakiegoś powodu, skompromitowania tej instancji,
0:06:13.480,0:06:17.800
ten daemon, który działa jako OpenVPN nie będzie
0:06:17.800,0:06:20.520
mógł dużo więcej zrobić na tej maszynie,
0:06:20.680,0:06:23.660
bo ma bardzo ograniczone uprawnienia.
0:06:24.080,0:06:27.080
Jeżeli chodzi o stronę klienta, to jest również możliwość
0:06:27.080,0:06:28.900
ustawienia tego parametru.
0:06:28.900,0:06:30.400
Jest on tutaj ustawiony.
0:06:30.400,0:06:32.340
I widać, że on jest zakomentowany.
0:06:32.340,0:06:35.000
To wynika z tego, że
0:06:35.000,0:06:38.340
ten tryb ustawienia działa tylko na systemach linuxowych
0:06:38.740,0:06:41.120
a ja akurat w moim przykładzie
0:06:41.280,0:06:44.235
czy w moim środowisku mam głównie
0:06:44.240,0:06:46.800
systemy windowsowe, w związku z tym nie zaznaczałem
0:06:46.800,0:06:48.100
tej opcji po stronie klienta.
0:06:48.380,0:06:50.220
Natomiast po stronie serwera jak najbardziej
0:06:50.220,0:06:52.680
warto tą opcję zaznaczyć.
0:06:52.680,0:06:56.280
I to jest wszystko jeżeli chodzi o hardening taki konfiguracyjny,
0:06:56.400,0:06:58.620
który ja zalecam.
0:06:58.620,0:07:02.240
Oczywiście są różne warianty, które można realizować, ale żeby nie komplikować
0:07:02.460,0:07:06.520
tej konfiguracji, bardziej się skupiałem i odnosiłem do tego, co ja używam.
0:07:06.520,0:07:08.600
I jaki mam typ środowiska.
0:07:08.800,0:07:12.920
Natomiast jeżeli używasz na przykład wariantu z hasłami,
0:07:12.920,0:07:16.580
to można tutaj jeszcze rozbudować tą konfigurację
0:07:16.860,0:07:21.200
o poziom na przykład dwuczynnikowego uwierzytelnienia
0:07:21.440,0:07:25.960
czy podwyższyć ten poziom, związany z loginem i hasłem.
0:07:25.960,0:07:30.200
Więc to jest wszystko jeżeli chodzi o część konfiguracyjną,
0:07:30.200,0:07:34.020
taką typową – utwardzanie dla OpenVPN-a.
0:07:34.260,0:07:36.680
Po stronie klienta i po stronie serwera.
0:07:37.140,0:07:39.140
I w tym odcinku to wszystko.
0:07:39.140,0:07:42.840
Jeżeli masz jakieś pytania, to pisz w komentarzu, chętnie przeczytam.
0:07:43.120,0:07:46.340
Zastanawiałem się też nad tematem firewalla,
0:07:46.340,0:07:49.295
czyli żeby omówić bardziej zakres DMZ-tu.
0:07:49.300,0:07:53.260
Oprócz konfiguracji i utwardzania konfiguracji samego serwera,
0:07:53.260,0:07:56.800
w jaki sposób architekturę zaplanować, tak żeby ona była bezpieczniejsza.
0:07:56.800,0:07:59.480
Jeżeli tego typu temat też Cię interesuje,
0:07:59.480,0:08:01.615
to daj znać w komentarzu
0:08:01.615,0:08:04.805
i ja się do takiego odcinka przygotuję.
0:08:05.380,0:08:10.500
Na dzisiaj to tyle, dziękuję Ci za uwagę i do zobaczenia w kolejnym odcinku.






