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

    utilizzo ip pubblico VPN

    Scheduled Pinned Locked Moved Italiano
    54 Posts 2 Posters 7.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.
    • kiokomanK
      kiokoman LAYER 8
      last edited by kiokoman

      si puo' fare anche quello, ma la procedura è un po diversa.
      Sul pfsense LAN A devi assegnare e abilitare una interfaccia alla connessione vpn
      Immagine.jpg

      occhio che appena assegni l'interfaccia la connessione openvpn smette di funzionare e va riavviato il servizio openvpn, quindi non puoi farlo da remoto sfruttando la vpn

      una volta fatto questo ti ritroverai con un nuovo gateway

      Immagine.jpg

      a questo punto crei una regola firewall sulla nuova interfaccia appena creata che ti ritroverai con allow any any (nel mio caso OPT4)

      Immagine.jpg

      crei un alias, puoi dargli il nome che vuoi, con gli ip del pc 2 e pc 3

      Immagine.jpg

      poi crei una regola sulla interfaccia LAN con
      protocollo any
      source single host or alias -> nome-alias-che-hai-creato-per-pc2-e-pc3 seguendo il mio precedente esempio sarà "test"
      destination any

      la parte importante avviene qui,
      premi su advanced option
      scendi giù fino a "Gateway"
      nel menu a tendina selezioni il nuovo gateway della vpn, nel mio caso OPT4
      Immagine.jpg
      salva.
      la regola va posizionata in alto

      sul pfsense nella LAN B va comunque impostato hybrid e creato il NAT per la rete LAN 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
      • federicopF
        federicop
        last edited by

        ok grazie mi sembra tutto abbastanza chiaro.
        tra l'altro i primi passaggi erano gia impostati per me, per altri motivi.... solo che non avendo mai usato il concetto del Gatewys non ero mai entrato nella relativa pagina per vdere.

        ora che ci sono entrato mi trovo questa schermata dove il Gatewys della VPN è quello giallo..... ora che significa quella scritta? non la traduzione ma per sapere se c'è qualche problema.

        Immagine1.png

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

          che per qualche motivo la tua vpn non è stabile e ha perdita di pacchetti

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

            a ok..... si tutto chiaro e nomale allora....

            1 Reply Last reply Reply Quote 0
            • federicopF
              federicop
              last edited by

              scusa ma "sul pfsense nella LAN B va comunque impostato hybrid e creato il NAT per la rete LAN A"

              la NAT la configuro cosi?:
              Interfaccia: WAN
              protocoll: any
              destinazione: Network iplanA/24
              portrange: any - any

              1 Reply Last reply Reply Quote 0
              • federicopF
                federicop
                last edited by

                confermo che funziona tutto.. GRAZIE come sempre... ultima domanda... avendo il proxy sulla LAN A, mi sembre di vedere che uscendo pubblicamente con LAN B, il proxy viene baypassato - quindi o configuro il server B con il proxy oppure c'è un modo per dire al proxy di funzionare?

                ovviamente mi riferisco a Squid

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

                  non lo so, non uso squid 🤷

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

                  federicopF 2 Replies Last reply Reply Quote 0
                  • federicopF
                    federicop @kiokoman
                    last edited by

                    @kiokoman ok grazie lo stesso ma ho verificato che il problema era solo che squid non era aggiornato!

                    1 Reply Last reply Reply Quote 0
                    • federicopF
                      federicop @kiokoman
                      last edited by

                      @kiokoman scusa ma se utilizzassi questa regola sulla VLAN devo impostare una route o no? perchè l'ho impostata ma no va..... ovvero non naviga

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

                        dopo 14 giorni.. non mi ricordo neanche cosa o mangiato ieri
                        quale regola?

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

                          quella di far usare il gateway "secondario" della VPN

                          1602241968876-immagine.jpg

                          fino ad ora era tutto in LAN ora ho i pc i VLAN

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

                            no non devi impostare niente, dovrebbe uscire per di là e basta
                            assicurati di aver aggiunto la sottorete della vlan sulla configurazione 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
                            • federicopF
                              federicop
                              last edited by federicop

                              la sottore della vlan sulla configurazione openvpn lato serer a o server b (server a è quello che ha la vlan)

                              e suppongo vada inserita nel tunnel setting IPv4

                              cmq ti confermo che con rule * (tutto) naviga ed esco ma con ip pubblico locale, appena metto rule

                              Pass
                              protocol: ipv4
                              surce: vlan net
                              port: *
                              destination:*
                              gatway: "vpn openvpn"

                              non va

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

                                va inserito in IPv4 Remote network(s) sull 'altro openvpn, non sul tunnel
                                e sempre sull'altro openvpn devi configurare il NAT outbound
                                Hybrid Outbound NAT
                                e aggiungere una regola per la sottorete che hai in vlan

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

                                  si mi ero espresso male....intendevo sotto la sezione tunnel setting di openvpn, inserisco in ipv4 remote networks.....

                                  comunque configurato il NAT funziona
                                  grazie come sepre

                                  1 Reply Last reply Reply Quote 0
                                  • federicopF
                                    federicop
                                    last edited by

                                    come sempre parlo presto... ovvero:
                                    naviga con il nat ma esco con ip server 1 e non 2

                                    SERVER2 (OPENVPN "altro") non tunnel

                                    regola nat:
                                    interface: WAN
                                    protocolo: *
                                    Source: INDIRIZZOIPVLAN/24
                                    destination: *

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

                                      Immagine.jpg
                                      nel server 2 -> sostituisci 172.16.0.0/24 con la rete che hai impostato nella vlan

                                      ma se vedi l'ip del server 1 significa che non sta passando attraverso la vpn
                                      controlla di nuovo le regole del firewall del server 1
                                      fai screenshot non tagliati eventualmente

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

                                        la regola nat è come la tua e la regola firewall è identica a quella che avevo creato in lan quando funzionava. ho cambiato solo il fatto dell source anziché degli ip specifici ho messo VLAN net

                                        Schermata 2020-10-26 alle 21.15.09.png

                                        rules serve 1 dove sta la VLAN
                                        Schermata 2020-10-26 alle 21.16.33.png

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

                                          nella regola NAT hai dimenticato la spunta su "static port"
                                          avevo detto screenshot non tagliati..
                                          hai altre regole firewall 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
                                          • federicopF
                                            federicop
                                            last edited by

                                            scusa lo accorciato ma esiste solo quella regola (ovvero è la prima)

                                            Schermata 2020-10-26 alle 21.39.59.png

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