technische_naslag:sid:roer
Verschillen
Dit geeft de verschillen weer tussen de geselecteerde revisie en de huidige revisie van de pagina.
Beide kanten vorige revisieVorige revisieVolgende revisie | Vorige revisie | ||
technische_naslag:sid:roer [2025/05/26 13:44] – michelle | technische_naslag:sid:roer [2025/06/01 22:11] (huidige) – [Lynis] michelle | ||
---|---|---|---|
Regel 16: | Regel 16: | ||
==== OpenVPN ==== | ==== OpenVPN ==== | ||
+ | |||
+ | Hiervoor gebruik ik een handig scrippie: [[https:// | ||
+ | Download het geval en maak het executable: | ||
+ | |||
+ | <code bash> | ||
+ | curl -O https:// | ||
+ | chmod +x openvpn-install.sh | ||
+ | </ | ||
+ | |||
+ | Voer het uit en gebruik het meest de defaults: | ||
<code bash> | <code bash> | ||
- | root@roer:~/bin# ./ubuntu-22.04-lts-vpn-server.sh | + | michelle@roer:~/bin$ sudo ./openvpn-install.sh |
Welcome to the OpenVPN installer! | Welcome to the OpenVPN installer! | ||
The git repository is available at: https:// | The git repository is available at: https:// | ||
I need to ask you a few questions before starting the setup. | I need to ask you a few questions before starting the setup. | ||
- | You can leave the default options and just press enter if you are ok with them. | + | You can leave the default options and just press enter if you are okay with them. |
I need to know the IPv4 address of the network interface you want OpenVPN listening to. | I need to know the IPv4 address of the network interface you want OpenVPN listening to. | ||
Regel 37: | Regel 47: | ||
Your host appears to have IPv6 connectivity. | Your host appears to have IPv6 connectivity. | ||
- | Do you want to enable IPv6 support (NAT)? [y/ | + | Do you want to enable IPv6 support (NAT)? [y/ |
What port do you want OpenVPN to listen to? | What port do you want OpenVPN to listen to? | ||
Regel 72: | Regel 82: | ||
Do you want to customize encryption settings? | Do you want to customize encryption settings? | ||
Unless you know what you're doing, you should stick with the default parameters provided by the script. | Unless you know what you're doing, you should stick with the default parameters provided by the script. | ||
- | Note that whatever you choose, all the choices presented in the script are safe. (Unlike | + | Note that whatever you choose, all the choices presented in the script are safe (unlike |
See https:// | See https:// | ||
Regel 80: | Regel 90: | ||
You will be able to generate a client at the end of the installation. | You will be able to generate a client at the end of the installation. | ||
Press any key to continue... | Press any key to continue... | ||
- | Ophalen:1 http:// | + | Geraakt:1 http:// |
- | Geraakt:2 http:// | + | Geraakt:2 http:// |
Ophalen:3 http:// | Ophalen:3 http:// | ||
- | 103 kB opgehaald in 0s (287 kB/s) | + | 55,4 kB opgehaald in 0s (139 kB/s) |
Pakketlijsten worden ingelezen... Klaar | Pakketlijsten worden ingelezen... Klaar | ||
Pakketlijsten worden ingelezen... Klaar | Pakketlijsten worden ingelezen... Klaar | ||
Regel 90: | Regel 100: | ||
ca-certificates is reeds de nieuwste versie (20230311). | ca-certificates is reeds de nieuwste versie (20230311). | ||
gnupg is reeds de nieuwste versie (2.2.40-1.1). | gnupg is reeds de nieuwste versie (2.2.40-1.1). | ||
- | gnupg staat ingesteld op handmatig geïnstalleerd. | ||
0 opgewaardeerd, | 0 opgewaardeerd, | ||
Pakketlijsten worden ingelezen... Klaar | Pakketlijsten worden ingelezen... Klaar | ||
Boom van vereisten wordt opgebouwd... Klaar | Boom van vereisten wordt opgebouwd... Klaar | ||
De statusinformatie wordt gelezen... Klaar | De statusinformatie wordt gelezen... Klaar | ||
+ | openvpn is reeds de nieuwste versie (2.6.3-1+deb12u3). | ||
iptables is reeds de nieuwste versie (1.8.9-2). | iptables is reeds de nieuwste versie (1.8.9-2). | ||
- | iptables staat ingesteld op handmatig geïnstalleerd. | ||
openssl is reeds de nieuwste versie (3.0.16-1~deb12u1). | openssl is reeds de nieuwste versie (3.0.16-1~deb12u1). | ||
- | openssl staat ingesteld op handmatig geïnstalleerd. | ||
wget is reeds de nieuwste versie (1.21.3-1+deb12u1). | wget is reeds de nieuwste versie (1.21.3-1+deb12u1). | ||
ca-certificates is reeds de nieuwste versie (20230311). | ca-certificates is reeds de nieuwste versie (20230311). | ||
curl is reeds de nieuwste versie (7.88.1-10+deb12u12). | curl is reeds de nieuwste versie (7.88.1-10+deb12u12). | ||
- | De volgende extra pakketten zullen geïnstalleerd worden: | + | 0 opgewaardeerd, |
- | easy-rsa libccid libnl-genl-3-200 libpcsclite1 libpkcs11-helper1 opensc opensc-pkcs11 pcscd | + | --2025-05-26 |
- | Voorgestelde pakketten: | + | |
- | pcmciautils resolvconf openvpn-dco-dkms openvpn-systemd-resolved | + | |
- | De volgende NIEUWE pakketten zullen geïnstalleerd worden: | + | |
- | easy-rsa libccid libnl-genl-3-200 libpcsclite1 libpkcs11-helper1 opensc opensc-pkcs11 openvpn pcscd | + | |
- | 0 opgewaardeerd, | + | |
- | Er moeten 2.575 kB aan archieven opgehaald worden. | + | |
- | Na deze bewerking zal er 7.776 kB extra schijfruimte gebruikt worden. | + | |
- | Ophalen:1 http:// | + | |
- | Ophalen:2 http:// | + | |
- | Ophalen:3 http:// | + | |
- | Ophalen:4 http:// | + | |
- | Ophalen:5 http:// | + | |
- | Ophalen:6 http:// | + | |
- | Ophalen:7 http:// | + | |
- | Ophalen:8 http:// | + | |
- | Ophalen:9 http:// | + | |
- | 2.575 kB opgehaald in 0s (9.244 kB/s) | + | |
- | Voorconfigureren van pakketten ... | + | |
- | Voorheen niet geselecteerd pakket libccid wordt geselecteerd. | + | |
- | (Database wordt ingelezen ... 74274 bestanden en mappen momenteel geïnstalleerd.) | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van libccid (1.5.2-1) ... | + | |
- | Voorheen niet geselecteerd pakket libpcsclite1: | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van libpcsclite1: | + | |
- | Voorheen niet geselecteerd pakket pcscd wordt geselecteerd. | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van pcscd (1.9.9-2) ... | + | |
- | Voorheen niet geselecteerd pakket easy-rsa wordt geselecteerd. | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van easy-rsa (3.1.0-1) ... | + | |
- | Voorheen niet geselecteerd pakket libnl-genl-3-200: | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van libnl-genl-3-200: | + | |
- | Voorheen niet geselecteerd pakket libpkcs11-helper1: | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van libpkcs11-helper1: | + | |
- | Voorheen niet geselecteerd pakket opensc-pkcs11: | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van opensc-pkcs11: | + | |
- | Voorheen niet geselecteerd pakket opensc wordt geselecteerd. | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van opensc (0.23.0-0.3+deb12u2) ... | + | |
- | Voorheen niet geselecteerd pakket openvpn wordt geselecteerd. | + | |
- | Uitpakken van .../ | + | |
- | Bezig met uitpakken van openvpn (2.6.3-1+deb12u3) ... | + | |
- | Instellen van libccid (1.5.2-1) ... | + | |
- | Instellen van libpkcs11-helper1: | + | |
- | Instellen van opensc-pkcs11: | + | |
- | Instellen van libpcsclite1: | + | |
- | Instellen van libnl-genl-3-200: | + | |
- | Instellen van easy-rsa (3.1.0-1) ... | + | |
- | Instellen van openvpn (2.6.3-1+deb12u3) ... | + | |
- | Created symlink / | + | |
- | Instellen van opensc (0.23.0-0.3+deb12u2) ... | + | |
- | Instellen van pcscd (1.9.9-2) ... | + | |
- | Created symlink / | + | |
- | pcscd.service is a disabled or a static unit, not starting it. | + | |
- | Bezig met afhandelen van triggers voor mailcap (3.70+nmu1) ... | + | |
- | Bezig met afhandelen van triggers voor libc-bin (2.36-9+deb12u10) ... | + | |
- | Bezig met afhandelen van triggers voor man-db (2.11.2-2) ... | + | |
- | Scanning processes... | + | |
- | Scanning processor microcode... | + | |
- | Scanning linux images... | + | |
- | + | ||
- | The processor microcode seems to be up-to-date. | + | |
- | + | ||
- | No services need to be restarted. | + | |
- | + | ||
- | No containers need to be restarted. | + | |
- | + | ||
- | No user sessions are running outdated binaries. | + | |
- | + | ||
- | No VM guests are running outdated hypervisor (qemu) binaries on this host. | + | |
- | --2025-05-26 | + | |
Herleiden van github.com (github.com)... 140.82.121.4 | Herleiden van github.com (github.com)... 140.82.121.4 | ||
Verbinding maken met github.com (github.com)|140.82.121.4|: | Verbinding maken met github.com (github.com)|140.82.121.4|: | ||
HTTP-verzoek is verzonden; wachten op antwoord... 302 Found | HTTP-verzoek is verzonden; wachten op antwoord... 302 Found | ||
- | Locatie: https:// | + | Locatie: https:// |
- | --2025-05-26 | + | --2025-05-26 |
- | Herleiden van objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, | + | Herleiden van objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, |
- | Verbinding maken met objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|: | + | Verbinding maken met objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|: |
HTTP-verzoek is verzonden; wachten op antwoord... 200 OK | HTTP-verzoek is verzonden; wachten op antwoord... 200 OK | ||
Lengte: 68984 (67K) [application/ | Lengte: 68984 (67K) [application/ | ||
Regel 192: | Regel 125: | ||
/ | / | ||
- | 2025-05-26 | + | 2025-05-26 |
Regel 218: | Regel 151: | ||
To silence this message move your ' | To silence this message move your ' | ||
or declare your ' | or declare your ' | ||
- | Using configuration from / | + | Using configuration from / |
----- | ----- | ||
Regel 239: | Regel 172: | ||
------ | ------ | ||
Keypair and certificate request completed. Your files are: | Keypair and certificate request completed. Your files are: | ||
- | req: / | + | req: / |
- | key: / | + | key: / |
- | Using configuration from / | + | Using configuration from / |
Check that the request matches the signature | Check that the request matches the signature | ||
Signature ok | Signature ok | ||
The Subject' | The Subject' | ||
- | commonName | + | commonName |
- | Certificate is to be certified until Aug 29 11:38:09 2027 GMT (825 days) | + | Certificate is to be certified until May 24 20:09:42 2035 GMT (3650 days) |
Write out database with 1 new entries | Write out database with 1 new entries | ||
Regel 254: | Regel 187: | ||
------ | ------ | ||
Certificate created at: | Certificate created at: | ||
- | * / | + | * / |
Notice | Notice | ||
------ | ------ | ||
Inline file created: | Inline file created: | ||
- | * / | + | * / |
* Using SSL: openssl OpenSSL 3.0.16 11 Feb 2025 (Library: OpenSSL 3.0.16 11 Feb 2025) | * Using SSL: openssl OpenSSL 3.0.16 11 Feb 2025 (Library: OpenSSL 3.0.16 11 Feb 2025) | ||
Regel 268: | Regel 201: | ||
To silence this message move your ' | To silence this message move your ' | ||
or declare your ' | or declare your ' | ||
- | Using configuration from / | + | Using configuration from / |
Notice | Notice | ||
Regel 275: | Regel 208: | ||
CRL file: / | CRL file: / | ||
- | 2025-05-26 | + | 2025-05-26 |
- | 2025-05-26 | + | 2025-05-26 |
* Applying / | * Applying / | ||
* Applying / | * Applying / | ||
Regel 284: | Regel 217: | ||
kernel.pid_max = 4194304 | kernel.pid_max = 4194304 | ||
net.ipv4.ip_forward = 1 | net.ipv4.ip_forward = 1 | ||
- | net.ipv6.conf.all.forwarding = 1 | ||
fs.protected_fifos = 1 | fs.protected_fifos = 1 | ||
fs.protected_hardlinks = 1 | fs.protected_hardlinks = 1 | ||
fs.protected_regular = 2 | fs.protected_regular = 2 | ||
fs.protected_symlinks = 1 | fs.protected_symlinks = 1 | ||
- | Created symlink / | ||
- | Created symlink / | ||
Tell me a name for the client. | Tell me a name for the client. | ||
Regel 316: | Regel 246: | ||
req: / | req: / | ||
key: / | key: / | ||
- | Using configuration from / | + | Using configuration from / |
Check that the request matches the signature | Check that the request matches the signature | ||
Signature ok | Signature ok | ||
The Subject' | The Subject' | ||
commonName | commonName | ||
- | Certificate is to be certified until Aug 29 11:38:16 2027 GMT (825 days) | + | Certificate is to be certified until May 24 20:09:49 2035 GMT (3650 days) |
Write out database with 1 new entries | Write out database with 1 new entries | ||
Regel 337: | Regel 267: | ||
Client MichelleJanse added. | Client MichelleJanse added. | ||
- | The configuration file has been written to /root/ | + | The configuration file has been written to /home/ |
Download the .ovpn file and import it in your OpenVPN client. | Download the .ovpn file and import it in your OpenVPN client. | ||
</ | </ | ||
- | Nog wat eigen aanpassingen: | + | Vervolgens moet ik op mijn **Fritz!Box** wel deze **poort openen** natuurlijk! |
+ | Daarna nog wat eigen aanpassingen | ||
<code bash> | <code bash> | ||
- | root@roer:~# egrep ' | + | michelle@roer:~$ sudo egrep ' |
##server 10.8.0.0 255.255.255.0 | ##server 10.8.0.0 255.255.255.0 | ||
server 192.168.3.0 255.255.255.0 | server 192.168.3.0 255.255.255.0 | ||
push " | push " | ||
push "route 192.168.1.0 255.255.255.0" | push "route 192.168.1.0 255.255.255.0" | ||
- | push " | ||
- | push " | ||
##push " | ##push " | ||
- | server-ipv6 fd42: | ||
- | push tun-ipv6 | ||
- | push " | ||
- | ##push " | ||
</ | </ | ||
+ | |||
+ | En klaar is Kees. Oh nee: **klaar is de oudste dochter van Kees!!** | ||
+ | |||
+ | ===== Hardening ===== | ||
+ | |||
+ | Nadat de functionaliteit erin zit mag er ook nog wel aan de veiligheid gedaan worden. Want Debian GNU/Linux is out-of-the-box wel aardig in elkaar gestoken maar het kan nog altijd beter! | ||
+ | |||
+ | ==== Lynis ==== | ||
+ | |||
+ | Een tooltje om de hardening van het systeem te scannen en met adviezen te komen. Geen daemon maar een check van mijn systeem: kan er qua veiligheid nog wat verbeterd worden? De versie in Debian GNU/Linux loopt achter dus een aparte repo toegevoegd, zoals beschreven op [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | root@roer: | ||
+ | root@roer: | ||
+ | deb [arch=amd64, | ||
+ | </ | ||
+ | |||
+ | Daarna een scan draaien: | ||
+ | |||
+ | <code bash> | ||
+ | root@roer: | ||
+ | </ | ||
+ | |||
+ | Een malware scanner had ik nog niet, dus..... | ||
+ | |||
+ | === Extra packages === | ||
+ | |||
+ | <code bash> | ||
+ | root@roer: | ||
+ | </ | ||
+ | |||
+ | === Permissies === | ||
+ | |||
+ | <code bash> | ||
+ | sudo chmod o-rwx /home/* | ||
+ | </ | ||
+ | |||
+ | en in <code bash>/ | ||
+ | |||
+ | === Blacklist rare modules === | ||
+ | |||
+ | <code bash> | ||
+ | michelle@lummel: | ||
+ | install dccp /bin/true | ||
+ | install sctp /bin/true | ||
+ | install rds /bin/true | ||
+ | install tipc /bin/true | ||
+ | </ | ||
+ | |||
+ | === Purge restanten van packages === | ||
+ | |||
+ | Er slingeren soms nog configuratie-bestanden en andere cruft rond van packages die allang niet meer op het systeem staan. Die herken je in de output van `dpkg -l` doordat ze beginnen met rc. Mik deze weg: | ||
+ | |||
+ | <code bash> | ||
+ | michelle@roer: | ||
+ | libpython3.10-minimal: | ||
+ | </ | ||
+ | ==== AppArmor ==== | ||
+ | |||
+ | ** ToDo ** |
technische_naslag/sid/roer.1748259855.txt.gz · Laatst gewijzigd: 2025/05/26 13:44 door michelle