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

    Pfsense source based routing seems broken

    Scheduled Pinned Locked Moved General pfSense Questions
    19 Posts 3 Posters 1.4k 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.
    • T
      tonysud
      last edited by

      you mean policy based routing?  Via rule that forces traffic out a gateway..

      yes

      Are you using any sort of load balance or failover between the 2 gateways?

      No, nothing of that
      I have three separate pppoe connections

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

        Yes simple screen shot.

        Also keep in mind that rules can be set to be skipped if a gateway is down.. So depending on how you have your rules set if a gateway is down then traffic could go out a different gateway even if not using failover gateway groups, 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
        • T
          tonysud
          last edited by

          screenshots:
          https://s1.postimg.org/430m48z667/image.png
          https://s1.postimg.org/4vdhlzhhmn/image.png
          https://s1.postimg.org/5yd6wvbthp/image.png
          https://s1.postimg.org/4kqnsu2owt/image.png

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

            adding them to the thread is much easier!

            So do you have pfsense set to skip rules if gateway down.. Can see that your gateways have different uptime.

            Plus your policy routes are set for TCP only so yeah that would fall through and other protocols would go out your default gateway.

            BTW what is the mask you have sources in 0.88 and 2.88?  And if the connections were IPv6 they would just go out your normal gateway..  So what exactly are you seeing not go out your policy rule?

            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
            • DerelictD
              Derelict LAYER 8 Netgate
              last edited by

              Much easier for those from whom you are asking for help, anyway.

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • T
                tonysud
                last edited by

                mask is 255.255.0.0 for all ip in the network, ipv4 only

                So what exactly are you seeing not go out your policy rule?

                from ip 192.168.2.88
                If I check my ip  with
                lynx –dump http://tttxmh.altervista.org/myip.php
                I get the ip of 79.33.xxxxxx instead of 79.62.xxxxxxxx

                1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  I think you miss the point….

                  ![Screen Shot 2017-10-18 at 5.49.14 AM.png](/public/imported_attachments/1/Screen Shot 2017-10-18 at 5.49.14 AM.png)
                  ![Screen Shot 2017-10-18 at 5.49.14 AM.png_thumb](/public/imported_attachments/1/Screen Shot 2017-10-18 at 5.49.14 AM.png_thumb)

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                    Ok - I have to ask why?  Since its one of my pet peeves, a /16 makes no sense on network.  It makes sense as /cidr in some firewall rule or summary route.. On a network wow.. You have some 65k nodes? ;)

                    But back to the topic at hand.. Your 2 policy route rule has not seen any hits at all.  And again its only tcp.. So no it would not route traffic say udp or icmp out that gateway.. So what traffic are you seeing that is not going out your gateway?

                    "from ip 192.168.2.88"

                    From your rules listing there are no hits on that rule.. So is it using some other gateway?

                    Did you clear states after creating that rule.. That could also cause your problem.. If you client went there before you put in the rule, then there could be a state already, 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
                    • T
                      tonysud
                      last edited by

                      Ok - I have to ask why?  Since its one of my pet peeves, a /16 makes no sense on network.  It makes sense as /cidr in some firewall rule or summary route.. On a network wow.. You have some 65k nodes? ;)

                      no, but there are a lot of fixed ip in different places like 192.168.0.* 192.168.2.* 192.168.29.* 192.168.17.* 192.168.195.* etc so a with a /16 it's easier to communicate in lan
                      I should change a lot of Ip, and it's a lot of work with printer etc

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

                        So just plain bad management ;)  And then laziness vs fixing ;)

                        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
                        • T
                          tonysud
                          last edited by

                          @johnpoz:

                          So just plain bad management ;)  And then laziness vs fixing ;)

                          In these days I'm trying to change machines IP to 192.168.2.0/24 and use pfsense as dhcp server but it's difficult, for example I don't understand how to give to a particular MAC-address gateway:nothing and dns:nothing instead of gateways and dns passed to all other machines

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

                            In your reservation just hand out loopback to that client 127.0.0.1 if you don't want it to have a gateway or dns that works.

                            But if you don't want it the client to get out or use dns on pfsense.  You could also just firewall it.

                            nogateordns.png
                            nogateordns.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
                            • T
                              tonysud
                              last edited by

                              @johnpoz:

                              In your reservation just hand out loopback to that client 127.0.0.1 if you don't want it to have a gateway or dns that works.

                              yes, but it's strange…
                              why to use this workaround?? wouldn't it be easier to give nothing as gateway and nothing as dns?
                              where's the problem? with dhcpd or with pfsense?

                              1 Reply Last reply Reply Quote 0
                              • DerelictD
                                Derelict LAYER 8 Netgate
                                last edited by

                                A DHCP static mapping should probably accept none like the main configuration does.

                                Chattanooga, Tennessee, USA
                                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                1 Reply Last reply Reply Quote 0
                                • T
                                  tonysud
                                  last edited by

                                  no, it doesn't work with none:
                                  it says:

                                  The following input errors were detected:
                                  A valid IPv4 address must be specified for the gateway.

                                  I need to provide only ip address and netmask nothing else

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

                                    dhcpd can be set to not hand that out.. So prob just something in the validation script not allowing for the none entry..  Could put in a feature request for sure on that.

                                    Simple work around though is just loopback.

                                    But to be honest this is got to be a rare sort of use case..

                                    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
                                    • DerelictD
                                      Derelict LAYER 8 Netgate
                                      last edited by

                                      Right. I was saying it should accept none there, at least if it is possible to do an override like that in ISC dhcpd.

                                      That would be a feature request.

                                      Yeah, a static config of that single host seems like a workaround in your case.

                                      Chattanooga, Tennessee, USA
                                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

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