<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="it">
	<id>https://wiki.golem.linux.it/index.php?action=history&amp;feed=atom&amp;title=Appunti_Wireguard</id>
	<title>Appunti Wireguard - Cronologia</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.golem.linux.it/index.php?action=history&amp;feed=atom&amp;title=Appunti_Wireguard"/>
	<link rel="alternate" type="text/html" href="https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;action=history"/>
	<updated>2026-04-24T14:40:33Z</updated>
	<subtitle>Cronologia della pagina su questo sito</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;diff=9932&amp;oldid=prev</id>
		<title>Martinligabue: /* Configurazione del client */ sottocategoria</title>
		<link rel="alternate" type="text/html" href="https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;diff=9932&amp;oldid=prev"/>
		<updated>2026-04-05T22:43:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configurazione del client: &lt;/span&gt; sottocategoria&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;it&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versione meno recente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versione delle 22:43, 5 apr 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l87&quot; &gt;Riga 87:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 87:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ... altri client ...&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ... altri client ...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Category&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Howto&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Categoria&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Networking&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Martinligabue</name></author>
	</entry>
	<entry>
		<id>https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;diff=9792&amp;oldid=prev</id>
		<title>Giomba il 22:53, 7 mar 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;diff=9792&amp;oldid=prev"/>
		<updated>2026-03-07T22:53:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;it&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versione meno recente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versione delle 22:53, 7 mar 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Riga 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Wireguard &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{Note&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|type&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;warning&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|text&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Questa pagina contiene alcune informazioni sparse su &lt;/ins&gt;Wireguard &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;provenienti dalla vecchia pagina sulla VPN del GOLEM.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sul server, installiamo ''wireguard'' e ''wireguard-tools''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sul server, installiamo ''wireguard'' e ''wireguard-tools''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il primo pacchetto contiene il core della gestione VPN, il secondo ci è utile per amministrare facilmente le connessioni (vedi wg-quick).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Il primo pacchetto contiene il core della gestione VPN, il secondo ci è utile per amministrare facilmente le connessioni (vedi wg-quick).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Giomba</name></author>
	</entry>
	<entry>
		<id>https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;diff=9791&amp;oldid=prev</id>
		<title>Giomba: Raccolti appunti dalla pagina VPN del GOLEM, non più manutenuta</title>
		<link rel="alternate" type="text/html" href="https://wiki.golem.linux.it/index.php?title=Appunti_Wireguard&amp;diff=9791&amp;oldid=prev"/>
		<updated>2026-03-07T22:50:18Z</updated>

		<summary type="html">&lt;p&gt;Raccolti appunti dalla pagina VPN del GOLEM, non più manutenuta&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nuova pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Wireguard ==&lt;br /&gt;
Sul server, installiamo ''wireguard'' e ''wireguard-tools''.&lt;br /&gt;
Il primo pacchetto contiene il core della gestione VPN, il secondo ci è utile per amministrare facilmente le connessioni (vedi wg-quick).&lt;br /&gt;
&lt;br /&gt;
 apt install wireguard wireguard-tools&lt;br /&gt;
&lt;br /&gt;
Su sistemi debian &amp;lt;= 10 (buster), il pacchetto non è presente nei repository mainline ma deve essere aggiunto tramite i debian backports.&lt;br /&gt;
Nota: potrebbe anche essere necessario aggiornare il kernel!&lt;br /&gt;
&lt;br /&gt;
=== Configurazione del server ===&lt;br /&gt;
A differenza di altri protocolli VPN come OpenVPN, wireguard ha un approccio &amp;quot;peer to peer&amp;quot;, per cui la procedura di configurazione del server rispecchia per buona parte quella di ciascun client.&lt;br /&gt;
&lt;br /&gt;
Innanzitutto è necessario generare la coppia di chiavi pubblica/privata del server&lt;br /&gt;
&lt;br /&gt;
 # wg genkey | tee /etc/wireguard/server.privkey | wg pubkey &amp;gt; /etc/wireguard/vpn.golem.linux.it.pubkey&lt;br /&gt;
&lt;br /&gt;
Per la configurazione è sufficiente creare un singolo file, ad esempio &amp;lt;code&amp;gt;/etc/wireguard/wg0.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 [Interface]&lt;br /&gt;
 # Carica la chiave privata dal percorso dove la abbiamo generata precedentemente&lt;br /&gt;
 PostUp = wg set %i private-key /etc/wireguard/vpn.golem.linux.it.privkey&lt;br /&gt;
 # Porta UDP di ascolto del server, a piacere&lt;br /&gt;
 ListenPort = 51820&lt;br /&gt;
 # Indirizzo del server all'interno della VPN&lt;br /&gt;
 Address = 10.40.0.1&lt;br /&gt;
&lt;br /&gt;
Il server può essere avviato tramite systemd, e con lo stesso sistema si può impostare l'avvio automatico.&lt;br /&gt;
Si noti che &amp;lt;code&amp;gt;@wg0&amp;lt;/code&amp;gt; corrisponde al file di configurazione precedentemente creato.&lt;br /&gt;
&lt;br /&gt;
 # systemctl start wg-quick@wg0&lt;br /&gt;
 # systemctl enable wg-quick@wg0&lt;br /&gt;
&lt;br /&gt;
=== Configurazione del client ===&lt;br /&gt;
Lato client, generare una coppia di chiavi pubblica/privata:&lt;br /&gt;
&lt;br /&gt;
 $ wg genkey | tee client.example.com.privkey | wg pubkey &amp;gt; client.example.com.pubkey&lt;br /&gt;
&lt;br /&gt;
Comunicare dunque la propria chiave pubblica al sysop, che si occuperà di aggiungerla tra quelle consentite al server, e vi comunicherà il vostro indirizzo IP, da aggiungere al file di configurazione, come segue. Prestare particolare attenzione a modificare i campi della sezione &amp;lt;code&amp;gt;Interface&amp;lt;/code&amp;gt;, come indicato nelle note.&lt;br /&gt;
&lt;br /&gt;
 [Interface]&lt;br /&gt;
 # PrivateKey = YoUrGoRgEoUsAnDsEcUrEpRiVaTeKeY=               # vedi note, scegliere questo...&lt;br /&gt;
 # PostUp = wg set %i private-key ./client.example.com.privkey # vedi note,                 ...oppure questo&lt;br /&gt;
 Address = 2001:470:c844:100::'''200'''/64                           # vedi note&lt;br /&gt;
 &lt;br /&gt;
 # vpn.golem.linux.it&lt;br /&gt;
 [Peer]&lt;br /&gt;
 PublicKey = w63aGvoyPaUTgA8nW/NJS6Qqp2hUFvHRBbIH8Qb5ISY=   &lt;br /&gt;
 AllowedIPs = 2000::/3                                      &lt;br /&gt;
 Endpoint = vpn.golem.linux.it:51280&lt;br /&gt;
 PersistentKeepalive = 37&lt;br /&gt;
&lt;br /&gt;
'''Note'''&lt;br /&gt;
* &amp;lt;code&amp;gt;Interface&amp;lt;/code&amp;gt; (sezione di configurazione dell'endpoint ''locale'')&lt;br /&gt;
** scegliere una delle seguenti opzioni per indicare la chiave privata del client, scommentando la riga apposita.&lt;br /&gt;
*** ''PrivateKey'': chiave privata del client, da custodire con cura, inline&lt;br /&gt;
*** ''PostUp = command'': chiave privata del client, da custodire con cura, e caricata automaticamente da un file esterno (es. creato col comando mostrato in precedenza)&lt;br /&gt;
** ''Address'': indirizzo IP comunicato dal sysop: riportarlo accuratamente, altrimenti non sarà possibile utilizzare la VPN&lt;br /&gt;
* &amp;lt;code&amp;gt;[Peer]&amp;lt;/code&amp;gt; (sezione di configurazione dell'endpoint ''remoto'' / server)&lt;br /&gt;
** ''PublicKey'': chiave pubblica del server (sì, è proprio quella)&lt;br /&gt;
** ''AllowedIPs'': indirizzi raggiungibili tramite la VPN, a scelta:&lt;br /&gt;
*** &amp;lt;code&amp;gt;2001:470:c844::/48&amp;lt;/code&amp;gt;: solo la [[IPv6 @ GOLEM | rete IPv6 virtuale del GOLEM]]&lt;br /&gt;
*** &amp;lt;code&amp;gt;2000::/3&amp;lt;/code&amp;gt;: tutti gli indirizzi IPv6 (è possibile utilizzare la VPN del GOLEM per [[IPv6 @ GOLEM | navigare ''davvero'' in IPv6]])&lt;br /&gt;
** ''Endpoint'': indirizzo del server&lt;br /&gt;
** ''PersistentKeepalive'': timer per mantenimento del tunnel attivo (in secondi); particolarmente utile se l'indirizzo IP del client cambia o è soggetto a NAT&lt;br /&gt;
&lt;br /&gt;
La connessione può essere attivata tramite systemd come sul server (spostandola in ''/etc/wireguard/'', vedi sopra), oppure manualmente utilizzando &amp;lt;code&amp;gt;wg-quick&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Attivazione del tunnel&lt;br /&gt;
 wg-quick up client.example.conf&lt;br /&gt;
 # Disattivazione del tunnel&lt;br /&gt;
 wg-quick down client.example.conf&lt;br /&gt;
&lt;br /&gt;
Naturalmente, affinché il collegamento funzioni, il client deve essere abilitato alla connessione dal sysop.&lt;br /&gt;
Per farlo, il sysop aggiunge un blocco peer per ciascun client alla configurazione &amp;lt;code&amp;gt;/etc/wireguard/wg0.conf&amp;lt;/code&amp;gt;, così:&lt;br /&gt;
&lt;br /&gt;
 ... altri client ...&lt;br /&gt;
&lt;br /&gt;
 # porceddu.net.golem.linux.it&lt;br /&gt;
 [Peer]&lt;br /&gt;
 PublicKey = tHeClIeNtFaNtAsTiCpUbLiCkEy=&lt;br /&gt;
 AllowedIPs = 2001:470:c844:100::200/128, 2001:470:c844:200::/62&lt;br /&gt;
&lt;br /&gt;
 ... altri client ...&lt;br /&gt;
&lt;br /&gt;
[[Category:Howto]]&lt;/div&gt;</summary>
		<author><name>Giomba</name></author>
	</entry>
</feed>