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