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

    Disconnects when routing through same interface

    Scheduled Pinned Locked Moved General pfSense Questions
    19 Posts 5 Posters 2.9k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by

      Well that wouldn't be the trace route, .50 is not in the hop.  If you hit pfsense as your gateway then that would be the first hop.  So it would go

      10.10.10.1
      10.10.10.254
      10.10.20.100

      That can clearly be worked out better, I hate to hair pin connections like you have.  Do you have another nic you can use for pfsense and use a transit network for you pfsense connection to router A?  You could do it with vlans but then your still hairpinning.

      Why do you need router A at all, just connect your 10.10.20 to another segment in pfsense.

      you run into asynchronous issue with your type of setup.. See first pic

      You have a few different options.  If you have another nic in pfsense just hang the 2 segments direct off pfsense.  You could vlan the other segment off the same interface.  If you have requirements for that other router, then use a transit network say 192.168.0.0/29 so you don't have async routing problems, can be done with vlan if have limit of 1 nic in pfsense.

      But best option is to use 2nd nic in pfsense for your 2 segments, other option is transit network to get to this other ruoter be it with 2nd nic in pfsense or vlans - see the different drawings, pic 2

      asyncroute.png
      asyncroute.png_thumb
      options.png
      options.png_thumb

      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 0
      • D
        drifter104
        last edited by

        I'll see what I can do with those options.

        That diagram was just the parts involved in this particular problem. I have 13 gateways and 20 static routes sigh (inherited) on that one pfsense.

        I'd like to have a subnet per router, with a transit network connecting all the routers/firewalls (depending on the subnet) and only internet bound connections going via the pfsense, I'm just not in a position to do that at the moment. I've got as far as lifting out the previous firewall and replacing with pfsense but then came up against this issue, didnt appear in testing because it does connect and only disconnects at random.

        Thanks for the help

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by

          You can do this while you sort out your network jungle; on pfSense LAN where you have the static route, also add Outbound NAT for traffic to 10.10.20.0/24 and NAT it to pfSense LAN IP. Then the returned traffic is delivered back to pfSense, which unNATs it and delivers it to the proper client. That makes the routing symmetric and thus keeps pfSense stateful firewall happy.

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

          1 Reply Last reply Reply Quote 0
          • D
            drifter104
            last edited by

            @phil.davis:

            You can do this while you sort out your network jungle; on pfSense LAN where you have the static route, also add Outbound NAT for traffic to 10.10.20.0/24 and NAT it to pfSense LAN IP. Then the returned traffic is delivered back to pfSense, which unNATs it and delivers it to the proper client. That makes the routing symmetric and thus keeps pfSense stateful firewall happy.

            I think I did this originally but it made it difficult to secure some of the subnets (some have firewalls and acls) and it meant the source address was the LAN interface. I need it to be the real source otherwise (as I understood it) I'd have to set the IP of the source on the ACL to be the PFsense LAN address and this would mean opening the subnets to potentially everything. Another reason why I want a transit network that all routers/firewalls sit on.

            Thanks for the suggestion though

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

              "I have 13 gateways"

              Why would you have so many gateways.. Do you have that many upstream wan type connections?  You don't put gateways on "lan" interfaces - downstream connections.  To get to downstream networks you add a route.

              Sounds like you have a bit of mess.  Ho many routers (what are they) do you have, how many segments?  What is your total node count?  If you don't mind posting up a more detailed picture happy to discuss options to clean it up, etc.

              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 0
              • P
                phil.davis
                last edited by

                I think I did this originally but it made it difficult to secure some of the subnets (some have firewalls and acls) and it meant the source address was the LAN interface. I need it to be the real source otherwise (as I understood it) I'd have to set the IP of the source on the ACL to be the PFsense LAN address and this would mean opening the subnets to potentially everything.

                For an interim measure you can put firewall rule/s on pfSense LAN to filter traffic from whatever pfSense LAN IPs you want to control that has destination in 10.10.20.0/24 - that gives you filtering at the point before the original client IP address is NATed into the pfSense's own LAN IP. Then let other firewall/router devices in the path pass everything from pfSense LAN IP, knowing that it has been pre-filtered by pfSense.

                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                1 Reply Last reply Reply Quote 0
                • C
                  cmb
                  last edited by

                  That's quite a mess indeed. While you clean it up, System>Advanced, Firewall/NAT, check "Bypass firewall rules for traffic on the same interface" will fix the problems inherent in asymmetric routing and trying to filter.

                  1 Reply Last reply Reply Quote 0
                  • D
                    drifter104
                    last edited by

                    @cmb:

                    That's quite a mess indeed. While you clean it up, System>Advanced, Firewall/NAT, check "Bypass firewall rules for traffic on the same interface" will fix the problems inherent in asymmetric routing and trying to filter.

                    I currently have that ticked but I still get the disconnects

                    @phil.davis:

                    For an interim measure you can put firewall rule/s on pfSense LAN to filter traffic from whatever pfSense LAN IPs you want to control that has destination in 10.10.20.0/24 - that gives you filtering at the point before the original client IP address is NATed into the pfSense's own LAN IP. Then let other firewall/router devices in the path pass everything from pfSense LAN IP, knowing that it has been pre-filtered by pfSense.

                    I don't think I've tried that, will look into it.

                    @johnpoz:

                    "I have 13 gateways"

                    Why would you have so many gateways.. Do you have that many upstream wan type connections?  You don't put gateways on "lan" interfaces - downstream connections.  To get to downstream networks you add a route.

                    Sounds like you have a bit of mess.  Ho many routers (what are they) do you have, how many segments?  What is your total node count?  If you don't mind posting up a more detailed picture happy to discuss options to clean it up, etc.

                    Thanks for the offer, I've attached a more complete diagram (if you change your mind once seeing I understand  :D )

                    What you said about gateways just from a purely config point of view raises a question. When I put in static routes through the pfsense webgui I have to "pick" an existing gateway. If I didn't add the gateway I couldn't add the static route could I? Or is it better/possible to add the static routes as the pfsense "OS" level?

                    All the "routers" on the diagrams are vyatta, all the "Firewalls" are ciscos PIX

                    Basic.jpg
                    Basic.jpg_thumb

                    1 Reply Last reply Reply Quote 0
                    • D
                      doktornotor Banned
                      last edited by

                      @drifter104:

                      I've attached a more complete diagram

                      If I were to manage this mess, I'd find a new job. Good luck.

                      1 Reply Last reply Reply Quote 0
                      • D
                        drifter104
                        last edited by

                        This is an improvement.  :-\

                        I've got 20 Pix 515 that I've removed the equation so far.

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

                          I don't get it??  Why would anyone set up something like that??

                          And you have multiple down stream routers for different segments as well? Is there anything below those routers?  More routers?  Oh so that is what you meant by gateways..  Why so many??  Where is the core of this network?  So all your routers are running vyatta?  On what hardware?  Why would you not just put in a nice layer3 switch and be done?

                          So what pix, you mentioned a 515 you got rid of.. What are the existing ones?  Why don't you just replace those all with 1 pfsense box?  You can easy add multiple ports there.  But I don't understand why you need so many segments?  If you want the ext and internal - great that is 2 boxes ;)  And then a L3 switch below there for your other segments.  Sure set them up in HA if you want, etc.  So say 4 boxes 2 ext, 2 internal and 2 L3 switches.

                          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 0
                          • D
                            drifter104
                            last edited by

                            @johnpoz:

                            I don't get it??  Why would anyone set up something like that??

                            And you have multiple down stream routers for different segments as well? Is there anything below those routers?  More routers?  Oh so that is what you meant by gateways..  Why so many??  Where is the core of this network?  So all your routers are running vyatta?  On what hardware?  Why would you not just put in a nice layer3 switch and be done?

                            So what pix, you mentioned a 515 you got rid of.. What are the existing ones?  Why don't you just replace those all with 1 pfsense box?  You can easy add multiple ports there.  But I don't understand why you need so many segments?  If you want the ext and internal - great that is 2 boxes ;)  And then a L3 switch below there for your other segments.  Sure set them up in HA if you want, etc.  So say 4 boxes 2 ext, 2 internal and 2 L3 switches.

                            Very poor advice from the IT consultant that put this all in many years ago. I think he just saw the £'s to be honest.
                            Each of the "C" subnets had 3 to 4 pix. So it would be WAN>Pix>Server>Pix>Server>Pix>Server<->Pix<->LAN with a different subnet on each side of each device.

                            We have some legacy contractual requirements to keep some networks seperated etc but certainly not the extent of where we are at. All the subnets are seperate VLANs already which makes moving towards reduced number of boxes less painfull (all switches are configured). We don't have any layer 3 switches though (at the moment but if I can make a good case for them it would help) all layer 2 Cisco 2960 (older type)

                            Most of the subnets are to seperate development, management, iscsi, voip, dmz/web servers, backend/sql servers

                            No routers behind the downstream routers

                            1 Reply Last reply Reply Quote 0
                            • D
                              doktornotor Banned
                              last edited by

                              @drifter104:

                              Very poor advice from the IT consultant that put this all in many years ago. I think he just saw the £'s to be honest.
                              Each of the "C" subnets had 3 to 4 pix. So it would be WAN>Pix>Server>Pix>Server>Pix>Server<->Pix<->LAN with a different subnet on each side of each device.

                              You should have talked to your lawyers a couple of years ago, perhaps? WTF!!!  :o :o :o :o :o

                              1 Reply Last reply Reply Quote 0
                              • P
                                phil.davis
                                last edited by

                                Seeing the later comments I did not even click to enlarge the diagram  :'(

                                What you said about gateways just from a purely config point of view raises a question. When I put in static routes through the pfsense webgui I have to "pick" an existing gateway. If I didn't add the gateway I couldn't add the static route could I? Or is it better/possible to add the static routes as the pfsense "OS" level?

                                From System->Routing, Gateways tab, you add a gateway for each other router that is sitting on a locally-connected interface/subnet of the pfSense and is the next hop for some destination/s. Then you DO NOT make these the actual gateway of any Interface (i.e. in the Interfaces menu, DO NOT put any gateways against your LAN-style interfaces.
                                Then you add Statis Routes from the Routes tab - that tells pfSense which destination subnet are reached through which gateway. Then pfSense sets up the routing table for you.

                                As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                                If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                                1 Reply Last reply Reply Quote 0
                                • D
                                  drifter104
                                  last edited by

                                  @phil.davis:

                                  Seeing the later comments I did not even click to enlarge the diagram  :'(

                                  What you said about gateways just from a purely config point of view raises a question. When I put in static routes through the pfsense webgui I have to "pick" an existing gateway. If I didn't add the gateway I couldn't add the static route could I? Or is it better/possible to add the static routes as the pfsense "OS" level?

                                  From System->Routing, Gateways tab, you add a gateway for each other router that is sitting on a locally-connected interface/subnet of the pfSense and is the next hop for some destination/s. Then you DO NOT make these the actual gateway of any Interface (i.e. in the Interfaces menu, DO NOT put any gateways against your LAN-style interfaces.
                                  Then you add Statis Routes from the Routes tab - that tells pfSense which destination subnet are reached through which gateway. Then pfSense sets up the routing table for you.

                                  Thats exactly what I've got, sorry I've not explained the configuration I done regarding these very well.

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    drifter104
                                    last edited by

                                    @johnpoz:

                                    I don't get it??  Why would anyone set up something like that??

                                    And you have multiple down stream routers for different segments as well? Is there anything below those routers?  More routers?  Oh so that is what you meant by gateways..  Why so many??  Where is the core of this network?  So all your routers are running vyatta?  On what hardware?  Why would you not just put in a nice layer3 switch and be done?

                                    So what pix, you mentioned a 515 you got rid of.. What are the existing ones?  Why don't you just replace those all with 1 pfsense box?  You can easy add multiple ports there.  But I don't understand why you need so many segments?  If you want the ext and internal - great that is 2 boxes ;)  And then a L3 switch below there for your other segments.  Sure set them up in HA if you want, etc.  So say 4 boxes 2 ext, 2 internal and 2 L3 switches.

                                    With the absense of Layer 3 switches would the following be possible? Likely to cause any issues?

                                    Green and Orange represent data flow along different VLans (only drawn 2 I have 25 in use) on the internal network. Blue would be a Vlan on the external side for traffic between subnets and would be on a private address range, red would be vlan for internet bound traffic, with the interface being public ips

                                    Black lines are the physical connections and would pretty much all be trunk connections.

                                    Hopefully that all makes sense, and thank you for your input

                                    ![Network and vlan.jpg](/public/imported_attachments/1/Network and vlan.jpg)
                                    ![Network and vlan.jpg_thumb](/public/imported_attachments/1/Network and vlan.jpg_thumb)

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