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

    Pfsense and l3 switch and dmz

    Scheduled Pinned Locked Moved General pfSense Questions
    23 Posts 3 Posters 2.3k 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.
    • C
      chinchun
      last edited by

      Hello everyone, I need some help with my home network design.
      I have a netgate sg5100 as my main router and firewall, a cisco sg500 as my switch, and a Netgear R7800 as ap.
      Here is my home network topology:

      1. GUEST, CAM, IOT, DMZ vlans defined in pfsense;
      2. VM, VPN, CLRNET vlans defined in sg500;
        Everything seems ok, except i can not access dmz from sg500 defined vlans, but i can access dmz from outside via wireguard vpn.
        Thanks you in advance!

      Here is my home network topology
      80c206a8-6938-42a2-8fbf-4dcf723ec5f4-Homelab_Network_Diagram.png

      SG500 settings
      9392a17b-3fba-4266-8ac9-8497f01fbd6f-image.png
      972e0267-be80-44f1-b9ff-86c1f7c3f14b-image.png
      c715dba3-2685-4ac9-ba6d-f1169aca1c25-image.png

      R7800 settings
      293d4da8-3ab6-4e87-8a6e-be8728f6f9ed-image.png

      C 1 Reply Last reply Reply Quote 0
      • C
        chinchun @chinchun
        last edited by

        @chinchun Here is my pfsense settings
        ac25e11b-8a08-4afe-bb4a-aad4529d0534-image.png
        6d6fdacb-7f7e-474a-be1e-978fed54585d-image.png

        C 1 Reply Last reply Reply Quote 0
        • C
          chinchun @chinchun
          last edited by

          @chinchun I can ping the gateway of dmz(10.254.254.1, defined in pfsene) from my SG500 defined vlans, howerver i can not ping the host(10.254.254.254)

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

            Is the host at 10.254.254.254 configured to allow access from outside it's own subnet?

            Does it have a route back to the VLAN hosts to be able to reply?

            If those hosts can ping 10.254.254.1 then pfSense is almost certainly sending the traffic towards 10.254.254.254 but it is refusing or is unable to reply.

            Steve

            C 3 Replies Last reply Reply Quote 0
            • C
              chinchun @stephenw10
              last edited by

              @stephenw10 Thx for the apply.

              1. It does
              2. I am not sure how can I do that, pfsense does not have a stastic route to switch defined vlans, I can not add it, because pfsense keep remaind me with the "This network conflicts with address configured on interface VL254_DMZ" error. And I does not define the vlan254_dmz in switch, but I think that traffic from switch defined vlans hosts(eg. 10.1.10.10) to 10.254.254.0/24 will go to pfsense via 10.10.10.2/30 anyway right?
              3. No, those hosts can not ping 10.254.254.1.

              Let's keep it simple, basically now my problem is I can not access 10.254.254.254 or 10.254.254.1 from 10.1.10.10.

              Here is my firewall rules for dmz
              9df84109-96a2-4676-b04f-3838796d7316-image.png

              stephenw10S 1 Reply Last reply Reply Quote 0
              • C
                chinchun @stephenw10
                last edited by

                @stephenw10 And here is the aliases
                a0e274f4-eb96-4a2a-9ed5-28648d81f0e5-image.png

                1 Reply Last reply Reply Quote 0
                • C
                  chinchun @stephenw10
                  last edited by

                  @stephenw10 And here is the updated topology
                  b6d13b66-4a9f-4f4f-9b11-93c6c1fa2fbd-Homelab_Network_Diagram.png

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

                    @chinchun said in Pfsense and l3 switch and dmz:

                    now my problem is I can not access 10.254.254.254 or 10.254.254.1 from 10.1.10.10.

                    Ok, that's different to earlier then when you said you could ping 10.254.254.1 but not 10.254.254.254. Is that correct?

                    The DMZ firewall rules make no difference to this traffic. Those connections are filtered by the VLAN 110 (VM?) rules. Can we see a screenshot of those?

                    Start a ping from 10.1.10.10 to 10.254.254.254 then check the state table in pfSense (Diag > States). Filter by 10.254.254.254. You should see two ICMP states. One incoming on VLAN110 and one outgoing on DMZ.

                    Steve

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

                      @chinchun late to the game here, but your drawing is a bit noisy.. A logical drawing would be much easier and faster to take in.

                      For example really don't care what devices are in vlans - that some ubuntu lts 20 is in vlan whatever, or what vlan your plex server is in, etc.

                      while this might be great for you.. In troubleshooting routing - all that is needed is logical diagram.

                      What specific network is your transit network? And is your R7800 routing? You have 2 gateways setup on it? one to the sg500 and another to pfsense?

                      Why are you complicating it with all the L3 stuff, why not just do layer 2 on your AP and SG500 and let pfsense handle all the routing?

                      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.8, 24.11

                      C 1 Reply Last reply Reply Quote 0
                      • C
                        chinchun @stephenw10
                        last edited by

                        @stephenw10
                        Let me make something clear first,

                        1. vlan 110 is defined in my switch sg500, vlan interface is 10.1.10.2, it does not have an interface in pfsense;
                        2. dmz is directly connected to one of the sg5100 firewall (ix2); interface address is 10.254.254.1, 10.254.254.254 is an vm,

                        And for your questions:

                        1. When I say I can ping 10.254.254.1, that is form outside of my home network using wireguard vpn connected to pfsense;
                        2. 10.1.10.10 indeed is an vm; gateway is 10.1.10.2 (switch vlan110's interface address)
                        3. I did what you said, but I can not see any states in pfsense, so I guess traffic form 10.1.10.10 does not reach pfsense?

                        Here is a simple topology, and my switch, ESXI, pfsense related settings, hope is helps.
                        bfddeddc-cb0a-4c85-ae3a-d798c45bbb0e-1.png
                        7ddf1b2b-7f15-4852-8b43-8c8ad3b79671-image.png
                        e7c3c862-f08f-4411-b00d-c79b6bf22e17-image.png
                        e4ddb0f7-c700-4bb7-931e-cf77b2904750-image.png
                        b80fd686-9ced-4dd2-a61d-cb08b5e74464-image.png
                        4bd43c88-4656-49ee-b236-25f4ef79995d-image.png

                        Because my mother language is not english, I am not sure if I understand you perfectly, and made myself clear, if there is any misunderstandings, please point it out to me. Many thanks!

                        johnpozJ 1 Reply Last reply Reply Quote 0
                        • C
                          chinchun @johnpoz
                          last edited by

                          @johnpoz
                          Sorry for the mess, and for your questions:

                          1. transit network is 10.10.10.0/30;
                          2. R7800 does not do routing, just act as ap, and it only have one gateway which is pfsense's lan address
                          3. I did try to let pfsense handle all the routing (which is working perfactly), but sg5100 only have gigabit ethernet ports, so I want the sg500 handle all the inter vlan routing instead;

                          Basicly I have two set of vlans, one is vlan 1xx, the other is vlan 2xx, vlan 1xx need linespeed inter vlan routing, so I defined them with my l3 switch, vlan 2xx don't need inter vlan routing, so I defined them in pfsense for better control.

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

                            @chinchun said in Pfsense and l3 switch and dmz:

                            10.1.10.10 indeed is an vm; gateway is 10.1.10.2 (switch vlan110's interface address)

                            I did what you said, but I can not see any states in pfsense, so I guess traffic form 10.1.10.10 does not reach pfsense?

                            What are the rules on 10.10.10.1 (ix3) interface in pfsense. If your going to want your downstream networks to go to other networks on attached to pfsense, or the internet - rules would have to be setup on this interface to allow that.

                            If you do not have a rule to allow the traffic from say 10.1.10.10 then no a state would never be created.

                            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.8, 24.11

                            C 2 Replies Last reply Reply Quote 0
                            • C
                              chinchun @johnpoz
                              last edited by

                              @johnpoz
                              Here it is
                              bd01bac8-62a6-4472-8391-b413e8561391-image.png

                              1 Reply Last reply Reply Quote 0
                              • C
                                chinchun @johnpoz
                                last edited by

                                @johnpoz
                                Don't know if I did it the right way.

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

                                  @chinchun Your throwing the traffic from your downstream networks into a gateway, your LoadBalance.

                                  Yeah that is policy routing, if you want these downstream networks to go to another network(s) off of pfsense you would have to allow for that in the rules.. I doubt your gateway your forcing the traffic to can get there ;)

                                  https://docs.netgate.com/pfsense/en/latest/multiwan/policy-route.html#bypassing-policy-routing

                                  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.8, 24.11

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

                                    OK, you need a rule on SG500 to allow traffic from 10.1.10.1/24 to DMZ without a gateway set.
                                    Otherwise that traffic is forced via the load-balance gateway group and cannot reach the DMZ.

                                    See: https://docs.netgate.com/pfsense/en/latest/multiwan/policy-route.html#bypassing-policy-routing

                                    Steve

                                    Edit: Snap! 😉

                                    johnpozJ C 2 Replies Last reply Reply Quote 0
                                    • johnpozJ
                                      johnpoz LAYER 8 Global Moderator @stephenw10
                                      last edited by

                                      @stephenw10 beat you too it Steve ;) hehehe -- jinx, you owe me a beer!

                                      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.8, 24.11

                                      1 Reply Last reply Reply Quote 1
                                      • C
                                        chinchun @johnpoz
                                        last edited by

                                        @johnpoz
                                        Thanks for the apply!
                                        I will read it first then try it out. Not an expert of pfsense, just an architect who love these things, still learning😊

                                        johnpozJ 1 Reply Last reply Reply Quote 0
                                        • C
                                          chinchun @stephenw10
                                          last edited by

                                          @stephenw10
                                          And many thanks to you too, bro!
                                          Almost 3 am here, night!

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

                                            @chinchun here to help, you seem to have a pretty nice network setup..

                                            And I wouldn't mind having a sg500, I have some sg300s

                                            I don't do any routing on mine (other than lab for helping here if needed) mine are in L3 mode but only use L2 on them.

                                            My sg300 is getting a bit long in the tooth, and is eol here next year I think.. I have my eye out for replacement.. Love to have something that has multiple gig interfaces 1/2.5/5/10 in the 24 port range.. And at a great price hehehe..

                                            The cisco smb line with 24ports some with poe, and with multigig would be sweet! But this unicorn switch is not on the market that I can find - at least not at the price willing to pay..

                                            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.8, 24.11

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