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

    Weird routing issue

    Scheduled Pinned Locked Moved Routing and Multi WAN
    17 Posts 3 Posters 2.8k 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.
    • R Offline
      rolandk
      last edited by

      sorry, there is some infos in the description fields i do not want to have on the internet and im new to this forum so it didnt come to my mind.

      yes, from the ruleset i should not be able to connect to 192.168.0.x IP adresses, but i CAN.

      i can login via ssh to 192.168.1.50 for example and on the remote system, i see client`s ip 172.16.27.45 in netstat. so no nat or anything else in place.

      i don`t understand how this is possible as there is no rule which would allow or policyroute this.

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

        Well if wan_um gateway can get there then you could get there.

        Do you have any floating rules?

        What other routes do you have?  When you do a traceroute to this 192.168.1.50 from your client 172.16.27.45 what do you show?

        Have seen users have any any in their floating and then wonder why stuff is working even though they have a block on the interface ;)

        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 25.07.1 | Lab VMs 2.8, 25.07.1

        1 Reply Last reply Reply Quote 0
        • R Offline
          rolandk
          last edited by

          no floating rules in place.

          i investigated further and apparently the thing is all about "negate_networks"

          https://forum.pfsense.org/index.php?topic=66776.45

          i can see with "pfctl -T show -t negate_networks that it contains 192.168.1.0 (and others) but not 172.18.28.0. the question is , why.

          will read into it further.

          thanks for help so far

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

            Because 192.168.1.0/24 is defined in a VPN somewhere, most likely.

            You need to bypass policy routing for the 172.18.28.0/23 subnet.

            Your problem is not routing in general, it is that you are policy routing out the WAN_UM gateway, which means everything not explicitly exempted in the rules above gets shoved that way without regard to the routing table. Why are you doing that? Is WAN_UM not the default gateway?

            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
            • R Offline
              rolandk
              last edited by

              yes, 192.168.1.0 is also defined in a deactivated ipsec tunnel definition - apparently thats the reason why it exists in negate_networks, though - and thats the reason why 192.168.1.0 is (by chance) being routed the correct way and 172.18.28.0 not

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

                Dude as Derelict said and I stated in post 1 you need to allow rule above your rule that shoves everything down that gateway..
                "If your forcing traffic out a gateway say your internet gateway before you allow traffic using the normal pfsense routing then yeah your going to have problems."

                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 25.07.1 | Lab VMs 2.8, 25.07.1

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rolandk
                  last edited by

                  yes, i know.

                  but i was more curious why 192.168.1.0 was working THOUGH (i.e. without explicit allow rule).

                  you should know how your firewall works and how things behave.
                  you should be able to explain things and do not wonder about miraculous firewall behaviour.
                  that kann kill your security.

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

                    Agreed, but since you have figured that out.. Now its time to correct your rules.

                    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 25.07.1 | Lab VMs 2.8, 25.07.1

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rolandk
                      last edited by

                      Your problem is not routing in general, it is that you are policy routing out the WAN_UM gateway, which
                      means everything not explicitly exempted in the rules above gets shoved that way without regard to
                      the routing table. Why are you doing that? Is WAN_UM not the default gateway?

                      WAN_UM is a gateway group, you cant set that as a default gateway and you can only route to a gw-group via policy routing, cant you ?

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

                        if you force a gateway, be it default or a group or whatever.. You have to allow rules above that if you want your clients to talk to other networks off pfsense that are not reachable through that gateway your forcing traffic through.  Is that simple!

                        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 25.07.1 | Lab VMs 2.8, 25.07.1

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