Static route added via route utility in pfSense shell is working but suddenly stopped working



  • Hi to everyone in this forum,

    I'm having a problem with pfSense static route that was added via shell, i've used command:
    "route add -net 202.60.9.71/32 192.168.1.246" (temporary)
    This worked immediately, i'm able to access 202.60.9.71 after adding my static route.

    I also added this command to the "rc.conf" file of my pfSense:
    95ec51a1-4386-4916-8909-07e0aecd545f-image.png
    (permanent)
    This also worked, I've rebooted my pfSense server. Static is auto added. I'm able to access 202.60.9.71 after reboot of my pfSense.

    This setup is working fine for the last 4 days since my pfSense deployment.

    But since yesterday, it stopped working. Below are the troubleshooting done:

    1. My static route is present in routing table of my pfSense:
      45175f82-8508-4599-a9a3-76ef26cf57bf-image.png

    2. pfSense is able to ping 202.60.9.71(host) and 192.168.1.246(gw)
      aedae49b-1610-432b-946f-5f97c8c6749b-image.png

    Also my computer connected to my pfSense is able to ping it as well:
    e77a70d0-aaa6-4397-b834-74dee4fc600f-image.png

    1. Trace route 202.60.9.71 in my workstation, traffic to it is routed via pfSense WAN1, it suppose to be routed to 192.168.1.246.
      60d80cec-0b36-476f-9693-7b155a753c9e-image.png
      (10.91.15.102 is network of my WAN1)

    2. Tried to del and add static route to 202.60.9.71, still the same.

    3. Tried to reboot my pfSense but still the same.

    4. Bypass firewall rules for traffic on the same interface is also enabled:
      74e5cea2-0617-4a7c-82fe-decc5ffc1071-image.png

    This is my brief network setup:
    b00bc81a-22f8-490a-adf6-af633b4e2805-image.png

    202.60.9.71 can be ping over the internet but access to it is only possible via 192.168.1.246(gw)

    Please help!
    Thank you in advance!



  • Hi to everyone in this forum,

    I've managed to resolved this issue. Resolution is to add a firewall rule for my LAN interface.
    afe5ad78-a887-4474-bcda-68d771cdb880-image.png


  • LAYER 8 Moderator

    That doesn't make much sense or SHOUTS bad/asymetric routing. <LAN net> as source on the WAN interface should never ever happen.



  • I realized just now. I've posted the wrong picture. My screenshot suppose to show the LAN interface rule.
    But then again, its kind wierd thst pfSense is working fine with my static route via route utility, then suddenly stopped working. 😅


  • LAYER 8 Moderator

    Via "route utility" means what exactly? You added a route via "route add" on the console/via SSH?

    It's not strange that this stopped working. If you make changes that touch the routing table, it get's reloaded and if you didn't add the entry via the System/Routing WebUI those manual entries get purged.



  • @JeGr yes via SSH console. As far as I know it doesn't get purged. It stays there. The fact that I had it working for 4 days.
    beaec51e-7a57-4d4d-b1a9-5c0b06bd5097-image.png

    Adding this route via System/Routing is not possible. Only GW options listed there are the current GW only of pfSense. My static route is routed to other GW.


  • LAYER 8 Moderator

    @limez17 said in Static route added via route utility in pfSense shell is working but suddenly stopped working:

    @JeGr yes via SSH console. As far as I know it doesn't get purged. It stays there. The fact that I had it working for 4 days.

    Doesn't mean it doesn't get overwritten if you make any change in the UI that somehow triggers a route/gateway specific reload.

    Adding this route via System/Routing is not possible. Only GW options listed there are the current GW only of pfSense. My static route is routed to other GW.

    Nonsense. Add your GW 192.168.1.246 on whatever interface that is on your Firewall (igb1?) to your gateway list, disable monitoring if that is a problem and add a static route. Just like the documentation says...



  • @JeGr said in Static route added via route utility in pfSense shell is working but suddenly stopped working:

    Nonsense. Add your GW 192.168.1.246 on whatever interface that is on your Firewall (igb1?) to your gateway list, disable monitoring if that is a problem and add a static route. Just like the documentation says...

    @JeGr I tried deleting, then added again my static route, still won't work.
    Adding this other gateway as my gateway for my LAN1 is not possible. Should not set upstream GW for LAN right?


  • LAYER 8 Moderator

    @limez17 said in Static route added via route utility in pfSense shell is working but suddenly stopped working:

    Adding this other gateway as my gateway for my LAN1 is not possible. Should not set upstream GW for LAN right?

    Then you're doing something wrong. Post your screens from gateway and routes screens so we can see and help. I've configured countless setups that were not directly connected on the same LAN in the same way: added a manual route via console, got into the WebUI, added the gateway and static routes there, done. No disconnect any more.

    And no you shouldn't set it as your LAN gateway. Just add it as another gateway and add a route via it on the static routes tab and it's done.



  • @JeGr how to add my other router as another gateway for my pfSense?



  • @JeGr here is my screens:
    GW:
    d4eb5d6e-19b3-456f-b126-f8838dc03322-image.png

    Route:
    c5896d12-36a6-487b-b7ef-15aa70baac3c-image.png


  • LAYER 8 Moderator

    That is not the Routes Screen I was talking but the "static routes" tab on system/routing!

    Also: I don't see your gateway 192.168.1.246 in the gateway screenshot.



  • @JeGr I don't have static routes under system/routing. I can't add my static route there.

    How to add gateway my other router as gateway on my pfSense?
    95c73a39-cd81-47fa-8fd8-5e5b3f7f7ba0-image.png


  • LAYER 8 Moderator

    I was already telling you at least twice now 🙄
    Select the Interface from which your remote LAN gateway has to be reached (I expect LAN! or otherwise you wouldn't add it there manually every...time...again) and add it. Then add your static route with THAT newly defined gateway.

    A gateway is a gateway. It hasn't to be on WAN if it's not an uplink.



  • @JeGr thank you for clarifying this. This really helped me. Done setting my gateway on LAN interface. It worked well ^_^

    Thank you so much.



  • @JeGr route still won't work after adding static route! My static route via static/routing still need a rule on my LAN interface to destination 202.60.9.71 in order to access it.


  • LAYER 8 Netgate

    Post your:

    Interface rules
    Gateway configuration
    Static route

    And describe exactly what source address cannot reach what destination address.

    A network diagram would probably help you communicate your issue more effectively.



  • @Derelict
    Interface rule:
    1efa4a8e-c5a9-4e55-8b3d-95517c62df16-image.png

    Gateway configuration:
    ea2aed3f-ed57-4664-b8d9-deab815f6f33-image.png
    14422b99-061a-4aa7-93dc-9bd94a461183-image.png

    5baefd9a-6fd9-477c-95c8-e9b187ff6ed5-image.png

    My LAN address is unable to reach 202.60.9.71 without the LAN rule, should be accessible without it since I have a static route for it.

    I already posted my diagram before, but here it is:
    e85000c4-22d6-42d8-a1b1-962b859dc0b4-image.png


Log in to reply