Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    OpenVPN Peer to Peer

    Scheduled Pinned Locked Moved Italiano
    36 Posts 4 Posters 2.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kiokomanK
      kiokoman LAYER 8
      last edited by kiokoman

      e sul tab openvpn?
      tra l'altro è facile rilevare dove vanno a finire quei pacchetti usando packet capture e mettendolo in ascolto nelle varie interfacce vedi se arriva fino all'altro capo della vpn o si fermano prima

      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
      Please do not use chat/PM to ask for help
      we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
      Don't forget to Upvote with the 👍 button for any post you find to be helpful.

      1 Reply Last reply Reply Quote 0
      • M
        miran
        last edited by

        Schermata 2020-06-08 alle 22.21.58.png

        E' tutto aperto....
        Controllo con il Capture

        1 Reply Last reply Reply Quote 0
        • kiokomanK
          kiokoman LAYER 8
          last edited by

          controlla anche nell'altro firewall

          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
          Please do not use chat/PM to ask for help
          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

          M 1 Reply Last reply Reply Quote 0
          • M
            miran
            last edited by

            Trovato l'inghippo. Mancava la regola sul FW remoto in OpenVPN .
            Grazie per l'aiut-

            1 Reply Last reply Reply Quote 0
            • kiokomanK
              kiokoman LAYER 8
              last edited by

              ottimo 👍

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              Please do not use chat/PM to ask for help
              we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
              Don't forget to Upvote with the 👍 button for any post you find to be helpful.

              1 Reply Last reply Reply Quote 0
              • M
                miran @kiokoman
                last edited by

                @kiokoman Vista la tua altissima competenza sul pFsense, non è che mi daresti una mano ancora su una piccola problematica.

                La mia configurazione è la seguente:

                Sede A pFsense 192.168.10.0/24
                2 Server OpenVPN: uno fa da Peer to Peer verso sede B e l'altro fa da Server per client ( per collegarmi via iPhone o Mac quando sono fuori ufficio sede A )

                Sede B pFsense 192.168.200.0/24
                1 Server OpenVPN: per collegarmi via iPhone o Mac quando sono fuori ufficio sede B; e un Client che collega in Peer to peer da Sede B ad A.

                La domanda è semplice.
                Dove devo indicare la regola, che se sono collegato alla sede A via client con il Mac, posso vedere via collegamento Peer to Peer la sede B? Ora devo ogni volta spegnere la VPN verso la sede A e avviare verso la sede B.

                Non so se mi sono spiegato bene?
                Grazie per l'aiuto.

                1 Reply Last reply Reply Quote 0
                • kiokomanK
                  kiokoman LAYER 8
                  last edited by

                  credo che basti aggiungere la rete nelle opzioni di openvpn
                  IPv4 Remote network(s)

                  ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                  Please do not use chat/PM to ask for help
                  we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                  Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                  1 Reply Last reply Reply Quote 0
                  • M
                    miran
                    last edited by

                    Però nella configurazione del server non ho la voce Remote network
                    Schermata 2020-06-10 alle 15.39.15.png

                    1 Reply Last reply Reply Quote 0
                    • G
                      Gabri.91
                      last edited by

                      Su OpenVPN Server di A (non quello P2P ma quello client) in custom options metti:

                      push "route 192.168.200.0 255.255.255.0";
                      
                      1 Reply Last reply Reply Quote 0
                      • M
                        miran
                        last edited by

                        Ho messo cosi' sul server sulla Sede A, dove mi collego con l'iphone, per capirci.Schermata 2020-06-10 alle 22.56.41.png

                        Ma non funziona....
                        Con capture packet si vede che i pachetti partono ma dall'altra parte non arriva niente.
                        10.0.211.2 il mio iPhone e 192.168.200.240 e' l'NVR nella sede B

                        Schermata 2020-06-10 alle 22.58.46.png

                        1 Reply Last reply Reply Quote 0
                        • G
                          Gabri.91
                          last edited by

                          Nelle impostazioni di entrambe le Peer to Peer (da un lato come local e dall'altro come remote) oltre a 192.168.10.0/24 aggiungi anche 10.0.211.0/24 (mi sembra di ricordare ci vada la virgola)

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            miran @Gabri.91
                            last edited by

                            @Gabri-91

                            Grazie per la risposta. Ho provato a inserire.
                            Se la logica è questa:

                            1° quando arrivo sulla sede A in client mi viene assegnato un 10.0.211.x e su questo server gli devo aggiungere la regola che deve vedere anche il tunnel 10.0.212.x ( la peer to peer ) e anche la rete remota 192.168.200.x
                            Schermata 2020-06-11 alle 11.05.26.png

                            2° sul server sede A peer to peer gli devo dire che deve vedere il tunnel del client 10.0.211.x
                            Schermata 2020-06-11 alle 11.06.03.png

                            3° sul client della sede B peer to peer gli devo dire che deve vedere il tunnel del client della sede A 10.0.211.x perché la locale 192.168.200.0 le vede già
                            Schermata 2020-06-11 alle 11.07.42.png

                            Cosi, il pacchetto che parte dal client 10.0.211.x va sul tunnel 10.0.212.x, arriva nella sede B, raggiunge il Device, e torna indietro per la stessa strada.

                            Ancora non funziona.
                            Mi viene il dubbio come deve essere scritta la regola: devo scrivere PUSH, senza PUSH, con la parola ROUTE, o senza, devo scrivere 10.0.211.0/24 oppure 10.0.211.0 255.255.255.0 ?

                            Grazie per l'aiuto

                            1 Reply Last reply Reply Quote 0
                            • G
                              Gabri.91
                              last edited by Gabri.91

                              Due precisazioni:

                              • Il "push route" e' un comando server, quindi sul client non ha effetto
                              • Il push della tunnel network non dovrebbe servire in quanto i due pfSense "conoscono" gia' quella rete

                              Detto questo, io farei cosi:

                              1. VPN Remote Access
                                IPV4 Local network => 192.168.10.0/24
                                Custom options => push "route 192.168.200.0 255.255.255.0";

                              2. VPN Server A
                                IPV4 Local network => 192.168.10.0/24, 10.0.211.0/24
                                IPV4 Remote network => 192.168.10.0/24

                              3. VPN Client B
                                IPV4 Local network => 192.168.10.0/24
                                IPV4 Remote network => 192.168.10.0/24, 10.0.211.0/24

                              Premesso che non e' una configurazione abituale (di solito per una Site2Site si usa IPSEC, non OpenVPN), se non funziona nemmeno cosi l'ultima carta rimane provare ad assegnare su firewall B ad OpenVPN Client un'interfaccia e relativa regola di NAT Outbound.

                              1 Reply Last reply Reply Quote 0
                              • M
                                miran
                                last edited by

                                Funzionaaaaaaa!

                                Grazie per l'aiuto.

                                Comunque funziona cosi' impostando.

                                Nel server Remote acces solo questo Schermata 2020-06-11 alle 17.54.54.png

                                Nel Server A Peer to Peer cosi' perche' la voce Local nework non c'e' ed ho messo nella voce Remote network
                                Schermata 2020-06-11 alle 17.54.47.png

                                Nel Client B Peer to Peer cosi' perche' la voce Local nework non c'e' ed ho messo nella voce Remote network

                                Schermata 2020-06-11 alle 17.55.39.png

                                Ora funziona alla grande!!

                                Grazie nuovamente

                                1 Reply Last reply Reply Quote 0
                                • G
                                  Gabri.91
                                  last edited by

                                  Ottimo!

                                  Non ricordavo come fosse esattamente la Peer2Peer OpenVPN per il motivo di cui sopra, se e' cosi secondo me puoi rimuovere 10.0.211.0/24 da remote networks di Server A.

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    miran
                                    last edited by

                                    No, se tolgo non funziona più.

                                    Ho rimesso.

                                    1 Reply Last reply Reply Quote 0
                                    • kiokomanK
                                      kiokoman LAYER 8
                                      last edited by

                                      non vorrei sbagliare ma quella versione di pfsense nell'ultimo screenshot mi pare molto vecchia
                                      che versione è?

                                      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                      Please do not use chat/PM to ask for help
                                      we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                                      Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        miran
                                        last edited by

                                        si, hai visto bene....
                                        Sede A 2.4.4-RELEASE-p3 (amd64)
                                        Sede B 2.1-RELEASE (i386) ma da quanto ho capito non aggiornabile per probema HW.

                                        1 Reply Last reply Reply Quote 0
                                        • kiokomanK
                                          kiokoman LAYER 8
                                          last edited by

                                          si la sede b non puoi più aggiornarla senza cambiare hw, ma la sede A adesso potresti aggiornarla alla 2.4.5-p1

                                          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                          Please do not use chat/PM to ask for help
                                          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                                          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            miran
                                            last edited by

                                            Visto che sei giunto a questo argomento, cosa c’è di nuovo nella nuova versione?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.