doc:appunti:linux:sa:ipsec_strongswan
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:ipsec_strongswan [2023/11/14 11:22] – [File di configurazione] niccolo | doc:appunti:linux:sa:ipsec_strongswan [2024/05/06 16:02] (current) – [Host remoto (right) dietro NAT] niccolo | ||
---|---|---|---|
Line 68: | Line 68: | ||
</ | </ | ||
- | L' | + | L' |
+ | |||
+ | < | ||
+ | charon: 07[IKE] received DELETE for IKE_SA office1-office2[5] | ||
+ | charon: 07[IKE] deleting IKE_SA office1-office2[5] | ||
+ | between 132.82.168.98[213.182.68.98]...134.191.21.5[134.191.21.5] | ||
+ | ipsec[30830]: | ||
+ | ipsec[30830]: | ||
+ | between 132.82.168.98[213.182.68.98]...134.191.21.5[134.191.21.5] | ||
+ | </ | ||
**/ | **/ | ||
Line 79: | Line 88: | ||
134.191.21.5 132.82.168.98 : PSK " | 134.191.21.5 132.82.168.98 : PSK " | ||
</ | </ | ||
+ | |||
+ | ===== Host remoto (right) dietro NAT ===== | ||
+ | |||
+ | Se l'host remoto è dietro NAT è necessario cambiare la configurazione, | ||
+ | |||
+ | < | ||
+ | ipsec[21090]: | ||
+ | ipsec[21090]: | ||
+ | ipsec[21090]: | ||
+ | ipsec[21090]: | ||
+ | ipsec[21090]: | ||
+ | ipsec[21090]: | ||
+ | </ | ||
+ | |||
+ | Si vede che l'host remoto ha indirizzo IP 10.151.252.18, | ||
+ | |||
+ | Anche questo messaggio è esplicativo: | ||
+ | |||
+ | < | ||
+ | ipsec[21090]: | ||
+ | ipsec[21090]: | ||
+ | </ | ||
+ | |||
+ | Nel file di configurazione **office1-office2.conf** va aggiunta l' | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | right=134.191.21.5 | ||
+ | rightid=10.151.252.18 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | e quindi nel file delle PSK si deve identificare l'host remoto con il suo IP privato: | ||
+ | |||
+ | < | ||
+ | # ------- Site 1 Gateway (office1-office2) ------- | ||
+ | 132.82.168.98 10.151.252.18 : PSK " | ||
+ | |||
+ | # ------- Site 2 Gateway (office2-office1) ------- | ||
+ | 10.151.252.18 132.82.168.98 : PSK " | ||
+ | </ | ||
+ | |||
+ | In alternativa si dovrebbe poter specificare **%%rightid=%any%%** in modo che un qualunque IP privato venga accettato. La PSK dovrebbe potersi selezionare in quel caso tramite l'IP pubblico. | ||
===== Configurazione Shorewall ===== | ===== Configurazione Shorewall ===== |
doc/appunti/linux/sa/ipsec_strongswan.1699957379.txt.gz · Last modified: 2023/11/14 11:22 by niccolo