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

    [risolto] OpenVpn site to site

    Scheduled Pinned Locked Moved Italiano
    25 Posts 3 Posters 2.2k 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.
    • M
      muttley
      last edited by muttley

      Ciao a tutti è il mio primo post:

      Problema: vpn tra due sedi remote SU ma gli host non si vedono tra loro e non va neanche il ping.

      SEDE A:

      • router telecom con IP statico 95.254.xxx.211/32; LAN: 192.168.3.1 (NAT abilitato).
      • Pfsense: WAN 192.168.3.10; LAN 192.168.0.254.
        Configurata una VPN come descritto dalla guida ufficiale, subnet utilizzata per la vpn: 172.17.0.0/30

      SEDE B

      • router telecom "trasparente", l'indirizzo IP pubblico è direttamente sulla wan di pfsense.
      • Pfsense: WAN 88.xxx.xxx.153/29; LAN 192.168.1.254
        Anche su questo server configurata una vpn seguendo la guida ufficiale per il client.

      Come detto la linea VPN è SU, dalla dashboard è tutto ok ma se tento di raguingere un host da SEDE A verso SEDE B non funziona e anche viceversa, tra l'altro non funziona neanche il ping.

      Eseguendo un traceroute, i pacchetti da SEDE A si fermano a 88.xxx.xxx.153, e viceversa si fermano a 95.254.228.211.

      Sarei grato di un vostro aiuto, ho letto e riletto i post del forum ma non ho risolto.
      Grazie

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

        se fai un traceroute (da un client nella lan e non da pfsense a un client dall'altra parte del tunnel) sulla vpn 88.xx e 95.xx non li dovresti neanche vedere visto che il traffico dovrebbe passare attraverso il tunnel che di default dovrebbe essere 10.0.8.0/24
        il tunnel sarà anche UP ma ti potrebbero mancare/o potrebbero essere sbagliate le rotte
        se riesci posta uno screenshot delle vpn configurate e finche tutto non funziona crea una regola sulla interfaccia vpn che consenta tutto il traffico

        ps: sarebbe bello se riuscissi a mettere in trasparente anche il router sulla SEDE A

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        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
          muttley
          last edited by

          tracert da client da il medesimo risultato, raggiungo solo gli IP pubblici.

          Firewall>rules>openvpn:
          Protocol Ipv4>Source *>Port *>Destination *>Port *>Gateway *

          Comunque ho seguito alla lettera:
          https://docs.netgate.com/pfsense/en/latest/book/openvpn/site-to-site-example-configuration-shared-key.html
          cambiando gli IP interessati ovviamente.

          Il router telecom della SEDE A per metterlo "trasparente" dovrei disabilitare il suo NAT, mettere l'IP pubblico come WAN del pfsense e poi sul NAT di pfsense come dovrei agire?

          N.B. ho provato anche a mettere un route statica che inoltri le richieste della rete della sede remota in entrambi i firewall.

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

            devi chiedere a telecom di configurarti il modem in bridge se stai usando il modem fornito da loro.

            lato server hai configurato così?
            Immagine.jpg

            lato client uguale ma con gli ip invertiti.

            puoi usare 172.17 per il tunnel ma imposta la subnet a /24

            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
            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
              muttley
              last edited by

              Esatto solo che essesndo: Server Mode: peer to peer (shared Key) la finestra non è proprio la stessa manca ad esempio la voce IPv4 local Networks.

              Per il modem ci proverò chiamando Telecom.

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

                cerco nel forum. personalmente ho usato solo ipsec o openvpn peer to peer (SSL/TLS)

                ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                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
                • kiokomanK
                  kiokoman LAYER 8
                  last edited by kiokoman

                  ho configurato un tunnel con la tua configurazione in questo modo:
                  server:
                  Immagine.jpg

                  client:
                  Immagine2.jpg

                  tunnel up e pingo senza problemi

                  Immagine2.jpg

                  sinceramente non so se possa dipendere dal fatto che hai una doppia nat su SEDE A
                  comunque io controllerei anche il log del firewall quando provi a fare il ping

                  ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                  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
                    muttley
                    last edited by

                    Allora ho cambiato la connessione telecom no bridge con una fastweb con ip statico pubblico.

                    Quindi adesso sulla WAN dei due pfsense ho due indirizzi pubblici statici con il proprio gateway.

                    Ho anche cambiato nella configurazione della VPN, ho inserito nelle opzioni:
                    push "route 192.168.0.0 255.255.255.0" lato server
                    push "route 192.168.1.0 255.255.255.0" lato client

                    Adesso riesco a pingare il pfsense della sede remota usando lo strumento ping del pfsense, da un client qualsiasi non funziona in entrambi i sensi.

                    Quindi sto migliorando la situazione ma ho ancora qualche blocco.

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

                      Ok ma non dovrebbe essere necessario inserire push. Poi tieni presente che e' normale non riuscire a pingare da pfsense. I ping vanno fatti da client a client.
                      Togli i push e assicurati di aver definito gli indirizzi remoti e se i ping non passano controlla il firewall
                      Oltre alla regola sul tab openvpn any to any dovrai crearne una che permetta di andare da lan a openvpn

                      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                      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
                        muttley
                        last edited by muttley

                        ho tolto il push.

                        Questo è la routing table lato server:

                        default 88.xxx.xxx.153 UGS 7189 1500 re1
                        88.xxx.xxx.152/29 link#2 U 156956 1500 re1
                        88.xxx.xxx.155 link#2 UHS 0 16384 lo0
                        89.xxx.xxx.59 88.xxx.xxx.153 UGHS 15344 1500 re1
                        127.0.0.1 link#4 UH 144 16384 lo0
                        172.17.0.1 link#7 UHS 0 16384 lo0
                        172.17.0.2 link#7 UH 1012 1500 ovpns1
                        192.168.0.0/24 172.17.0.2 UGS 0 1500 ovpns1
                        192.168.1.0/24 link#1 U 3950953 1500 re0
                        192.168.1.254 link#1 UHS 3 16384 lo0

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

                          questo lato client:

                          default 89.xxx.xxx.33 UGS 202776 1500 re0
                          88.xxx.xxx.155 89.xxx.xxx.33 UGHS 22604 1500 re0
                          89.xxx.xxx.32/27 link#1 U 163312 1500 re0
                          89.xxx.xxx.59 link#1 UHS 7 16384 lo0
                          127.0.0.1 link#4 UH 602 16384 lo0
                          172.17.0.1 link#7 UH 8401 1500 ovpnc1
                          172.17.0.2 link#7 UHS 0 16384 lo0
                          192.168.0.0/24 link#2 U 2467419 1500 re1
                          192.168.0.133 link#2 UHS 0 16384 lo0
                          192.168.1.0/24 172.17.0.1 UGS 19 1500 ovpnc1

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

                            sembra corretto
                            server
                            sede b server per andare alla rete 192.168.0.0/24 passa per il tunnel 172
                            192.168.0.0/24 172.17.0.2 UGS 0 1500 ovpns1
                            sede a client per andare alla rete 192.168.1.0/21 passa per il tunnel 172
                            192.168.1.0/24 172.17.0.1 UGS 19 1500 ovpnc1

                            a questo punto se il tunnel è up e non funziona il ping tra 2 client della sede a e sede b controlla il firewall se sono macchine windows controlla anche il firewall di windows

                            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                            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
                              muttley
                              last edited by muttley

                              Grazie.

                              Il ping riesco a farlo da pfsense SEDE A ad un client SEDE B e viceversa, ma se provo da client sede A a client sede B e viceversa non va.

                              Riesco da client a pingare gli ip del tunnel e l'ip pubblico della sede remota.

                              I firewall dei client (win10) sono disabilitati.

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

                                ok hai messo un regola che permetta il traffico da LAN a OpenVPN? hai niente nel log del firewall quando provi a pingare?

                                ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                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
                                  muttley
                                  last edited by

                                  ho questa configurazione:
                                  Immagine.png

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

                                    Openvpn ha la stessa regola? ripeto sul log del firewall hai niente di utile? l'interfaccia OPT1 che indirizzi ip usa sicuro che i client non siano collegati li? se riesci a pingare da pfsense il tunnel e i client dall'altra parte ormai ci sei la configurazione di openvpn è apposto ci deve essere qualcos'altro che blocca i client che sia firewall o un altro router in mezzo. tra l'altro gli stati di quelle regole sono 0/0 quindi non sono mai state applicate/non è mai passato traffico se non sulla porta 80 che è l'anti-lockout per configurare pfsense

                                    ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                    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
                                      muttley
                                      last edited by

                                      Openvpn rule, tutto permesso. IPv 4 * * * * *

                                      log del firewall non vedo nulla facendo il ping.

                                      OPT1 172.17.0.1

                                      Si ci sono degli switch layer 3, ma sono con la configurazione di default.

                                      C'è un pò di traffico, quando era 0/0 l'avevo riavviato.

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

                                        e hai messo come tunnel 172.17 la stessa net che usi per OPT1 ? o hai attivato l'interfaccia ovpns1 ? quella non va ne attivata ne assegnata
                                        deve rimanere li
                                        Immagine.jpg

                                        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                        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
                                          muttley
                                          last edited by

                                          ho tolto OPT1, ma con o senza il risultato non cambia. Avevo abilitato la porta perchè era stata creata con OpenVpn è pensavo che potesse essere lì il problema ma effettivamente non ho trovato documentazione in merito.

                                          sulla sede A ho un server su 192.168.0.254, facendo il ping da pfsense sede B riesco a raggiungerlo, se provo da un client sede B non riesco.

                                          Considera che il firewall della sede B è il gateway della 192.168.1.0/24, quindi quando il destinario è 192.168.0.0/24 da 192.168.1.0/24 che non sia il firewall, no va.

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

                                            @johnpoz
                                            site A 192.168.0.0
                                            site B 192.168.1.0

                                            pfsense inside Site B can ping 192.168.0.254 where there is a server, can ping tunnel 172.17
                                            client connected to Site B can't ping anything inside 192.168.0.0/24

                                            default 88.xxx.xxx.153 UGS 7189 1500 re1
                                            88.xxx.xxx.152/29 link#2 U 156956 1500 re1
                                            88.xxx.xxx.155 link#2 UHS 0 16384 lo0
                                            89.xxx.xxx.59 88.xxx.xxx.153 UGHS 15344 1500 re1
                                            127.0.0.1 link#4 UH 144 16384 lo0
                                            172.17.0.1 link#7 UHS 0 16384 lo0
                                            172.17.0.2 link#7 UH 1012 1500 ovpns1
                                            192.168.0.0/24 172.17.0.2 UGS 0 1500 ovpns1
                                            192.168.1.0/24 link#1 U 3950953 1500 re0
                                            192.168.1.254 link#1 UHS 3 16384 lo0

                                            can you give him some advice?

                                            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                                            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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.