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

    Entrare in dispositivo appartenente a LAN di pfsense da altra LAN

    Scheduled Pinned Locked Moved Italiano
    24 Posts 2 Posters 2.5k 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

      devi usare nat / port forward verso l'indirizzo ip del tuo ap

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

      senseilukeS 1 Reply Last reply Reply Quote 0
      • senseilukeS
        senseiluke @kiokoman
        last edited by

        @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

        devi usare nat / port forward verso l'indirizzo ip del tuo ap

        Perché devo agire di NAT e non di Rules?
        Grazie

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

          perche' ti colleghi dalla wan quindi devi dire a pfsense dove vuoi che la richiesta venga inoltrata, dato che non puoi comunicare direttamente con l'ap che sta sostanzialmente in un altra rete

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

          senseilukeS 1 Reply Last reply Reply Quote 0
          • senseilukeS
            senseiluke @kiokoman
            last edited by senseiluke

            @kiokoman

            @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

            perche' ti colleghi dalla wan quindi devi dire a pfsense dove vuoi che la richiesta venga inoltrata, dato che non puoi comunicare direttamente con l'ap che sta sostanzialmente in un altra rete

            E niente. Sto provando varie impostazioni in NAT->port forwarding ma continua a negarmi l'accesso. Potresti darmi indicazioni più dettagliate per piacere?

            Comunque mi devo studiare meglio il firewall.
            Non capisco perché per l'accesso alla dashboard di pfsense è bastato impostare l'IP (192.168.3.100) appartenente alla rete gestista dal router (il mikrotik che ha assegnato l'IP della porta WAN al pfsense) e in cui si trova il mio PC, in Firewall?
            Grazie

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

              perchè la dashboard è nel firewall, se apri solo la porta tu dai accesso al firewall stesso ma non a quello che sta dietro
              con port forwarding oltre ad aprire la porta tu dici al firewall di intercettare la richiesta e inviare i pacchetti alla destinazione che in questo caso è il tuo AP dietro al firewall. quindi per poter accedere all'AP dalla WAN di pfsense innanzitutto l'AP deve avere un indirizzo ip statico in modo che non cambi e che la regola del forwarding sia sempre valida
              ad esempio

              Immagine.jpg

              con questa regola se io mi collego alla wan del mio pfsense con la porta 9999 lui mi fa comunicare con l'apparecchio che sta dietro con ip 192.168.10.200 sulla porta 80

              quindi sul browser se scrivo http://192.168.5.124:9999 mi apre la pagina web presente su 192.168.10.200

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

              senseilukeS 1 Reply Last reply Reply Quote 0
              • senseilukeS
                senseiluke @kiokoman
                last edited by senseiluke

                @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                perchè la dashboard è nel firewall, se apri solo la porta tu dai accesso al firewall stesso ma non a quello che sta dietro
                con port forwarding oltre ad aprire la porta tu dici al firewall di intercettare la richiesta e inviare i pacchetti alla destinazione che in questo caso è il tuo AP dietro al firewall. quindi per poter accedere all'AP dalla WAN di pfsense innanzitutto l'AP deve avere un indirizzo ip statico in modo che non cambi e che la regola del forwarding sia sempre valida
                ad esempio

                Immagine.jpg

                con questa regola se io mi collego alla wan del mio pfsense con la porta 9999 lui mi fa comunicare con l'apparecchio che sta dietro con ip 192.168.10.200 sulla porta 80

                quindi sul browser se scrivo http://192.168.5.124:9999 mi apre la pagina web presente su 192.168.10.200

                Non so, c'è qualcosa ancora che non va.
                Ho settato così in port-forwarding:
                alt text

                che ha creato pure questa regola in firewall:

                alt text

                Dal mio pc (192.168.3.100) su rete 192.168.3.0/24
                dal mio browser digito
                http://192.168.10.124:9999 (ho posto pfsense su una subnet differente - 192.168.10.0/24, rimuovendo un'interfaccia dal bridge in Mikrotik, proprio quella a cui è collegato pfsense al mio mikrotik). Scusa mi sono accorto che ho fatto un po' di casino con gli indirizzi nel mio primo post.
                Ricapitolando:
                Mio PC: 192.168.3.100 (su subnet 192.168.3.0/24)
                WAN pfsense: 192.168.10.124 (su subnet 192.168.10.0/24-quindi il suo gateway è 192.168.10.1 che è il nuovo indirizzo dell'interfaccia in Mikrotik a cui è collegato pfsense)
                AP-tplink: 192.168.5.99 (su rete LAN pfsense 192.168.5.0/24)

                ma non succede niente.
                Cosa può essere? Grazie

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

                  che hai fatto casino 😂
                  fai un disegno della tua rete perchè non capisco cosa hai fatto
                  pfsense ha 2 interfacce una WAN e una LAN
                  se pfsense e' collegato dopo il mikrotik l'interfaccia wan avrà come gateway l'ip del mikrotik mentre i dispositivi collegati alla LAN avranno come gateway l'ip che hai impostato per l'interfaccia LAN su pfsense quindi fammi un disegno perchè non si capisce cosa hai fatto

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

                  senseilukeS 1 Reply Last reply Reply Quote 0
                  • senseilukeS
                    senseiluke @kiokoman
                    last edited by senseiluke

                    @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                    che hai fatto casino 😂
                    fai un disegno della tua rete perchè non capisco cosa hai fatto
                    pfsense ha 2 interfacce una WAN e una LAN
                    se pfsense e' collegato dopo il mikrotik l'interfaccia wan avrà come gateway l'ip del mikrotik mentre i dispositivi collegati alla LAN avranno come gateway l'ip che hai impostato per l'interfaccia LAN su pfsense quindi fammi un disegno perchè non si capisce cosa hai fatto

                    Ma no dai, fo fatto SOLO 😀 casino a riportare i corretti indirizzi.
                    La mia rete e praticamente impostata in questo modo:
                    la maggior parte delle interfacce ethernet del mio router Mikrotik sono in bridge a cui ho assegnato un ip 192.168.3.1.
                    Questa sarebbe in pratica la mia rete che uso regolarmente.
                    Al solo scopo di fare esperimenti (non mi serve in pratica) ho rimosso un'interfaccia (ether3) dal bridge e gli ho assegnato IP 192.168.10.1.
                    A tale interfaccia è collegata via cavo la porta WAN di pfsense che ha un IP statico di 192.168.10.124.
                    Fin qui credo sia chiaro. Volevo "isolare" le due reti a livello 2 e poi aggiungere anche regole di firewall (ancora ci sto lavorando. Il Mikrotik è davvero ostico soprattutto per un niubbo delle reti come me)
                    La LAN interna del pfsense ha subnet 192.168.5.0/24, alla porta LAN ho collegato un vecchio AP/switch della tp-link a cui è assegnato l'indirizzo
                    192.168.5.99.
                    Tutto qui.
                    Dove sbaglio? Quale potrebbe essere il problema?
                    Grazie

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

                      quindi la regola nat che avevi fatto era giusta e per collegarti all'ap dovresti digitare 192.168.10.124:9999
                      se non funziona non ho idea..
                      il firewall del mikrotik ti permette di uscire usando la porta 9999 ?

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

                      senseilukeS 1 Reply Last reply Reply Quote 0
                      • senseilukeS
                        senseiluke @kiokoman
                        last edited by

                        @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                        quindi la regola nat che avevi fatto era giusta e per collegarti all'ap dovresti digitare 192.168.10.124:9999
                        se non funziona non ho idea..
                        il firewall del mikrotik ti permette di uscire usando la porta 9999 ?

                        Ho disabilitato per prova tutte le regole filter del firewall di Mikrotik, ma niente. Non so se bisogna agire anche sulle regole del NAT del Mikrotik

                        Come faccio ad essere sicuro che mi permetta di uscire sulla 9999?
                        Grazie

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

                          non ho idea sul mikrotik, su pfsense puoi usare packet capture e vedere se arriva traffico

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

                          senseilukeS 1 Reply Last reply Reply Quote 1
                          • senseilukeS
                            senseiluke @kiokoman
                            last edited by senseiluke

                            @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                            non ho idea sul mikrotik, su pfsense puoi usare packet capture e vedere se arriva traffico

                            Però se Mikrotik mi lascia raggiungere dal browser del mio PC la dashboard di pfsense, perché dovrebbe impedirmi di raggiungere un dispositivo interno usando lo stesso IP ma con solo porta differente?
                            Dovrebbe essere solo un problema di pfsense. Boh?
                            Intanto faccio delle prove e ti faccio sapere.
                            Grazie

                            1 Reply Last reply Reply Quote 0
                            • senseilukeS
                              senseiluke
                              last edited by

                              Ho chiesto in un forum mikrotik. Dicono che se riesco a pingare pfsense allora il problema di accesso probabilmente può essere causato dal firewall di pfsense stesso.
                              Adesso non so come muovermi.
                              Grazie

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

                                devi usare packet capture per vedere se ti arriva traffico sulla porta 9999

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

                                senseilukeS 1 Reply Last reply Reply Quote 0
                                • senseilukeS
                                  senseiluke @kiokoman
                                  last edited by

                                  @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                                  devi usare packet capture per vedere se ti arriva traffico sulla porta 9999

                                  ok, vedo di capire come si usa da qualche tutorial e ti faccio sapere appena possibile.
                                  Grazie ancora

                                  1 Reply Last reply Reply Quote 0
                                  • senseilukeS
                                    senseiluke
                                    last edited by senseiluke

                                    ok vedo qualcosa:

                                    13:23:34.891717 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9729, length 8
                                    13:23:35.417345 IP 192.168.10.124 > 192.168.10.1: ICMP echo request, id 64791, seq 9730, length 8
                                    13:23:35.417475 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9730, length 8
                                    13:23:35.918579 IP 192.168.10.124 > 192.168.10.1: ICMP echo request, id 64791, seq 9731, length 8
                                    13:23:35.918726 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9731, length 8
                                    13:23:36.420580 IP 192.168.10.124 > 192.168.10.1: ICMP echo request, id 64791, seq 9732, length 8
                                    13:23:36.420717 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9732, length 8
                                    13:23:36.932561 IP 192.168.10.124 > 192.168.10.1: ICMP echo request, id 64791, seq 9733, length 8
                                    13:23:36.932716 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9733, length 8
                                    13:23:37.434572 IP 192.168.10.124 > 192.168.10.1: ICMP echo request, id 64791, seq 9734, length 8
                                    13:23:37.434716 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9734, length 8
                                    13:23:37.835634 IP 192.168.3.100.15124 > 192.168.10.124.9999: tcp 0
                                    13:23:37.936560 IP 192.168.10.124 > 192.168.10.1: ICMP echo request, id 64791, seq 9735, length 8
                                    13:23:37.936689 IP 192.168.10.1 > 192.168.10.124: ICMP echo reply, id 64791, seq 9735, length 8
                                    

                                    Questo potrebbe significare qualcosa:

                                    13:23:37.835634 IP 192.168.3.100.15124 > 192.168.10.124.9999: tcp 0

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

                                      come hai impostato il packet capture ? su che interfaccia era in ascolto?

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

                                      senseilukeS 1 Reply Last reply Reply Quote 0
                                      • senseilukeS
                                        senseiluke @kiokoman
                                        last edited by

                                        @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                                        come hai impostato il packet capture ? su che interfaccia era in ascolto?

                                        WAN

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

                                          ok ora prova con LAN e vedi se c'e' qualcosa :)

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

                                          senseilukeS 1 Reply Last reply Reply Quote 0
                                          • senseilukeS
                                            senseiluke @kiokoman
                                            last edited by senseiluke

                                            @kiokoman said in Entrare in dispositivo appartenente a LAN di pfsense da altra LAN:

                                            ok ora prova con LAN e vedi se c'e' qualcosa :)

                                            un attimo...

                                            ecco:

                                            19:39:54.461845 ARP, Request who-has 192.168.5.99 tell 192.168.5.1, length 28
                                            19:39:54.462228 ARP, Reply 192.168.5.99 is-at e8:de:27:ac:8b:3b, length 46
                                            19:39:54.462237 IP 192.168.3.100.17255 > 192.168.5.99.80: tcp 0
                                            19:39:54.717551 IP 192.168.3.100.17256 > 192.168.5.99.80: tcp 0
                                            19:39:56.465937 IP 192.168.3.100.17255 > 192.168.5.99.80: tcp 0
                                            19:39:56.720726 IP 192.168.3.100.17256 > 192.168.5.99.80: tcp 0
                                            19:40:00.475682 IP 192.168.3.100.17255 > 192.168.5.99.80: tcp 0
                                            19:40:00.730000 IP 192.168.3.100.17256 > 192.168.5.99.80: tcp 0
                                            

                                            Ma che significa tcp 0?
                                            Grazie

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