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

    pfSense and meraki z3

    Scheduled Pinned Locked Moved General pfSense Questions
    64 Posts 10 Posters 12.6k 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.
    • chris147C
      chris147 @wyzard
      last edited by

      @wyzard said in pfSense and meraki z3:

      Hi Chris.

      I'm new at setting up rules. I have a few questions, if you don't mind:

      1. What option do I choose for source & destination (Any, this firewall or network)?
      2. Do I need to know the IP of the Z3?
      3. Will the source and destination ports be the same? In the further reading you provided it shows the source port as 60032 and the destination as 9350.
      4. Would the source port of 60032 be the same for the 7001 destination port?
      5. How would I determine/know what the destination network is?

      Hi,

      As I understand it, pfsense rewrites the source port for udp/9350 and udp/7001 as a security measure to mitigate fingerprinting the hosts behind it, in a way that ISP home routers don't. It doesn't do this for udp/500 by default to allow VPN to work. The two NAT mappings are to have pfsense not rewrite the source ports when NATing traffic on those destination ports.

      1. Source and destination I have set to Type: Any. I guess I shouldn't though, see 2.
      2. You should give your Z3 a reservation in DHCP. Then in the mappings for the source use Type Network and the IP address /32.
      3. I have the source port left blank in the mapping, and destination port as 9350 in one mapping, and 7001 in the other.
      4. I have blank for the source port. Looking at my current state table, the source port is not using 60032 so I guess it changes.
      5. I have the destination set to any. You could ask the IT department for the IPs of the devices the Z3 is connecting to at their end, to lock it down further.

      One other thing, you might have to reset the pfsense states to re-establish everything. In pfsense, diagnostics - states - reset states.

      I'm fairly new to pfsense too, so if anyone has advice on doing this better, please let me know.

      Your wife could ask the IT department what they can see in her Meraki dashboard VPN Status screen. If it's partially working, any error there might help you get the Z3 on line.

      W 1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Generally it's a bad idea to set outbound NAT rules with source 'any'. You can easily end up catching traffic you didn't want to like traffic from the firewall itself.
        It's better to set the rule as tightly as possible, so only the VPN traffic from the Z3 in this case, but you should at least set the LAN subnet as source there. If you copy the existing IPSec port 500 rule changing only the destination port you should be good.

        Steve

        1 Reply Last reply Reply Quote 0
        • W
          wyzard @chris147
          last edited by

          @chris147

          My wife's IT department is refusing to help with the issue. So far I'm not able to get out past the pfSense. I know the Meraki is handing out an IP as I connected directly to my laptop (without it being connected to the internet) and got an IP.

          Wondering if i should assign a static IP address to the computer they provided from my wife's work if that would get me around this issue, as that computer doesn't seem to be getting an IP from the Meraki (for whatever reason).

          Any other thoughts and help would be appreciated.

          Thanks.

          JKnottJ chris147C stephenw10S 3 Replies Last reply Reply Quote 0
          • JKnottJ
            JKnott @wyzard
            last edited by

            @wyzard said in pfSense and meraki z3:

            Any other thoughts and help would be appreciated.

            If your ISP is like mine, you may have a 2nd IP address you can use. My cable modem is in bridge mode and I can get 2 IPv4 addresses. I normally use 1, but occasionally use the other for testing. Give it a try and see if that happens.

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

            NollipfSenseN 1 Reply Last reply Reply Quote 0
            • chris147C
              chris147 @wyzard
              last edited by

              @stephenw10 Thanks for the advice, I've cleaned up my rules and combined them into to a single one using a fixed source IP for the Z3 and a port alias. I left the destination address as any because traffic to destination port 9350 goes to a couple of Meraki IPs, which I guess could change. Traffic to port 7001 goes to my workplace.
              Anyway, it's working OK with the single tighter rule.

              @wyzard
              Shame on that IT department.
              As @JKnott said, perhaps it's time to try taking pfsense out of the mix. If you dig out your old ISP router and try that, will her IT department then support getting the PC and Z3 online? Once you have the PC working, then you can re-introduce pfsense.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator @wyzard
                last edited by

                @wyzard Show us the outbound NAT rules you have right now, get a screenshot.

                Adding the correct rule(s) should be you need there.

                Steve

                1 Reply Last reply Reply Quote 0
                • W
                  wyzard
                  last edited by

                  I know bypassing the pfSense box would more than likely get a connection. I appreciate all the help everyone has provided. Would really like to get this working without having to go through the bypassing. Especially since my equipment is in the basement, the house is wired and my wife's office is on the 2nd floor.

                  Chris, I entered your suggestions, but so far, no joy. One qestion, how did you clear up your rules and combine them into a single one? What were the settings and how did you do a port alias?

                  Thanks.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    Using a ports alias allows you to use one rule for a number of ports. 9350, 7001 and 500 for example:
                    https://docs.netgate.com/pfsense/en/latest/book/firewall/aliases.html#port-aliases

                    If you can give us a screenshot I'm sure we can get this working for you.

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • W
                      wyzard
                      last edited by wyzard

                      aa38b341-a36c-48c9-938d-3f3a5f846bda-image.png

                      3e3a8249-7a7d-4a3c-93cc-82ed03a77214-image.png

                      Both rules for 9350 and 7001 ports are the same.

                      Also, I'm 95% sure that is the ip address of the device.

                      Appreciate all the help.

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        That looks correct assuming that is the Z3 address.
                        Check Status > DHCP leases to be sure.

                        You could just set the source as 10.124.31.0/24 to sure it's included. Assuming your internal subnet is a /24 that is.

                        We are also assuming they are using ports 7001 and 9350. Check the state table for states from 10.123.31.200 to be sure it is.

                        Steve

                        chris147C 1 Reply Last reply Reply Quote 0
                        • chris147C
                          chris147 @stephenw10
                          last edited by chris147

                          @stephenw10 said in pfSense and meraki z3:
                          ...

                          We are also assuming they are using ports 7001 and 9350. Check the state table for states from 10.123.31.200 to be sure it is.

                          @wyzard For reference, here's a sanitized version of what I'm seeing in my state table when filtered for WAN and ports 9350 and 7001. I see a couple of lines for both ports with different destination IP addresses. You can see that the source port is the same for the Z3 and WAN IPs. Before the NAT mapping was in place, those source ports were different.

                          2x
                          WAN udp WAN_IP:43830 (Z3_IP:43830) -> MERAKI_DEST_IP:9350
                          2x
                          WAN udp WAN_IP:43830 (Z3_IP:43830) -> BUSINESS_DEST_IP:7001

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            Ok, that looks correct. In terms of the ports at least. I would expect that to work as long as the Z3 is actually configured correctly. I assume it is not though?

                            Can you get any sort of connection status or logs from anywhere?

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • W
                              wyzard
                              last edited by

                              Still no luck. Verified the static IP of the Meraki. Also verified the ports. When I watch the activity it indicates that it's attempting to authenticate, the authentication failed. Still at a loss.

                              Again, I appreciate all the help.

                              1 Reply Last reply Reply Quote 0
                              • johnpozJ
                                johnpoz LAYER 8 Global Moderator
                                last edited by

                                So you actually validated this thing works when not behind your pfsense..

                                Authentication failed could just mean it can't auth with the creds its using.. Are these something you or your wifi put into some gui.. Is it suppose to be you plug it in sort of solution from work and anything behind it is on the vpn?

                                but before you actually blame whatever the problem is on something pfsense is or isn't doing - state port mapping for example.. Have you actually validated it works when you take pfsense out of the picture?

                                An intelligent man is sometimes forced to be drunk to spend time with his fools
                                If you get confused: Listen to the Music Play
                                Please don't Chat/PM me for help, unless mod related
                                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                W 1 Reply Last reply Reply Quote 0
                                • W
                                  wyzard @johnpoz
                                  last edited by

                                  @johnpoz said in pfSense and meraki z3:

                                  So you actually validated this thing works when not behind your pfsense..

                                  Authentication failed could just mean it can't auth with the creds its using.. Are these something you or your wifi put into some gui.. Is it suppose to be you plug it in sort of solution from work and anything behind it is on the vpn?

                                  but before you actually blame whatever the problem is on something pfsense is or isn't doing - state port mapping for example.. Have you actually validated it works when you take pfsense out of the picture?

                                  Hi John. Thanks for the response.

                                  Yes, I have taken pfSense out of the picture and it does authenticate and work.

                                  It was provided to us from my wife's work and is suppose to be a plug it in sort of solution.

                                  I'm almost positive it's something that I just don't have right in pfSense.

                                  Thanks.

                                  1 Reply Last reply Reply Quote 0
                                  • johnpozJ
                                    johnpoz LAYER 8 Global Moderator
                                    last edited by

                                    Well why don't you sniff on pfsense when you connect the thing to see what its trying to do.. Are you using IPS, or pfblocker that could be blocking stuff your not aware of?

                                    Pfsense out of the box doesn't block anything.. So unless its something odd like its looking for a static port on your outbound nat or something... Which is odd for what say a soho wifi router would be doing..

                                    Your not behind a double nat are you - pfsense gets a public IP on its wan?

                                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                                    If you get confused: Listen to the Music Play
                                    Please don't Chat/PM me for help, unless mod related
                                    SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      wyzard
                                      last edited by wyzard

                                      Yes, it does get a public IP on its WAN.

                                      Could the block private networks (RFC 1918 Networks) WAN firewall rule be preventing this from working?

                                      The funny thing is that her work can "see" the box. But when it tries to get out to authenticate it can't. Not using IPS or pfblocker.

                                      I pretty much left pfSense "stock", just added a rule to let plex outside my network.

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        'block private networks' on WAN will make no difference here.

                                        Try looking at all the open states from the Z3 IP address. It might be trying some other port(s) as well.

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • W
                                          wyzard
                                          last edited by

                                          This is extremely frustrating. Nothing that I've tried is letting me connect out using the Meraki.

                                          I see nothing in open states about the Z3 IP address (although I will admit I am an extreme novice when it comes to pfSense).

                                          Let's wipe the slate clean and if everyone that has helped so far (and again, thank you all so much for the assistance) can start from step one and what I would need to do (where to put rules, what they need to be, etc. etc.) I'll give this one more college try before throwing in the towel.

                                          Again, thanks to everyone for their help

                                          1 Reply Last reply Reply Quote 0
                                          • johnpozJ
                                            johnpoz LAYER 8 Global Moderator
                                            last edited by

                                            You shouldn't have to put any rules anywhere.. This should work out of the box!

                                            So this box gets its "wan" IP from pfsense dhcp, connected to your pfsense lan... Then you put a box behind that..

                                            Sniff on your pfsense lan for this IP of the Z3 IP, its gets... What do you see it doing.. Or just look in the state table of pfsense.. If your not seeing traffic and states - then its not doing anything!!! So no shit it wouldn't work...

                                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                                            If you get confused: Listen to the Music Play
                                            Please don't Chat/PM me for help, unless mod related
                                            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

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