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.1k 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

      per vpn punto punto cosa stai usando di preciso openvpn o ipsec?

      se è con openvpn site to site è piuttosto semplice basta inserire su custom option del pfsense sulla LAN A
      route ip-del-server-erp 255.255.255.255;
      e sul pfsense della LAN B impostare su NAT / outbound su hybrid e aggiungere una regola con sorgente network / ip-della-rete-LAN-A/24 mettere la spunta su static port e salvare
      se fosse ipsec in sostanza dovrebbe essere la stessa cosa, una rotta statica nella LAN A per l'ip del server erp con destinazione l'interfaccia ipsec e dall'altra parte sempre NAT / outbound come sopra

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

        Ti confermo che uso openvpn, ma mi sfugge qualche cosa.

        sul client LAN A che dovrà "uscire" con ip LAN B devo impostare il gatwai B o A? perchè non capisco come faccia il client LAN A sapere con quele ip uscire.

        mi spiego meglio, nella LAN A ipotizza che ho due Client, uno deve uscire con IP pubblico nomale della sua LAN A e l'altro invece con IP LAN B -

        impostando i vari pfsense come hai scritto te deduco che tutti i client LAN A uscirebbero con IP pubblico LAN B.... o ho capito male?

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

          tutti i client A che volessero connettersi all'erp userebbero l'ip pubblico della lan B
          tutto il resto del traffico uscirebbe normalmente per l'ip pubblico della lan A
          route ip-del-server-erp 255.255.255.255; <- crea una rotta statica verso il server cloud facendo passare il traffico attraverso la vpn.

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

            perdonami... ora ho capito... non avevo focalizzato il contetto ip-del-server-erp.
            tutto chiaro.

            ma se volessi proprio che il traffico del client non uscisse tramite ip pubblico lan A ma volessi che uscisse sempre con quello della lan B è fattibile?

            grazie

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

              sul pfsense della LAN A in advanced:

              redirect-gateway def1;
              

              se è proprio necessario.. la navigazione risulterà più lenta oltre al fatto che se i client sono tanti dovrai tenere sotto controllo l'utilizzo di cpu e ram per vedere se i pfsense reggono il carico

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              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 velocità di navigazione non è importante in quanto non devono "navigare" molto ma si devono solo collegare a vari server (erp-posta-e altre cose) e sono 3-4 pc non di piu... per vari motivi preferisco uscire totalmente con ip pubblico B - per la ram e cpu dei pfsense non problem ho vecchi pc sostiuti che non usavo piu configurati appositamente con processori intel i3 e 16 gb di ram

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

                  se sono solo 3 o 4 non è un problema

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

                    @kiokoman said in utilizzo ip pubblico VPN:

                    zione risulterà più lenta oltre al fatto che se i client sono tanti dovrai tenere sotto controllo l'utilizzo di cpu e ram per vedere se i pfsense reggono il carico

                    ma per farli "uscire" li configuro con ip della lan B?

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

                      @kiokoman said in utilizzo ip pubblico VPN:

                      redirect-gateway def1;

                      non ho capito la domanda
                      ?
                      se mi stai chiedendo se devi cambiare la rete in LAN A per farla uguale a LAN B allora la risposta è assolutamente no
                      su LAN B impostare su NAT / outbound su hybrid e aggiungere una regola con sorgente network / ip-della-rete-LAN-A/24 mettere la spunta su static port e salvare

                      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                      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 1 Reply Last reply Reply Quote 0
                      • federicopF
                        federicop @kiokoman
                        last edited by

                        @kiokoman si ho capito come "impostare" il pfsense e la NAT.
                        ma in questa maniera tutti i pc della LAN A escono con ip pubblico LAN B (se non erro).
                        mentre io voglio ottenere questo riusltato (provo a rendere meglio l'idea)

                        lan A pc 1 (esce con ip pubblico lan A)
                        lan A pc 2 (esce con ip pubblico lan B)
                        lan A pc 3 (esce con ip pubblico lan B)

                        quindi per diversificare le uscite (devo configurare il singolo pc) o mettere un una regola sul pfsense A che instradi il singolo PC?

                        1 Reply Last reply Reply Quote 0
                        • 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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.