Force client to use 2nd gateway



  • Hello, I try to force a client to use the second gateway instead of the default one.
    As far I can tell the firewall rule (choosed the 2nd gateway at adavanced settings) is okay and it should work but it doesn't.

    vlan12 (gateway 2) and vlan13 (gateway default) are just the wan vlans, vlan 30 is my vlan for all the clients
    10.24.96.25 is my client (asterisk server) that should use the 2nd gateway

    538093f1-0fbf-48ee-bcf4-402c83fcb9ef-grafik.png

    no firewall rules at floating and nothing at vlan12 (besides the 2 default one), 2nd gateway is working well (if I use it as default)

    any idea if this is correct at all btw if so how I can debug that problem ?


  • Galactic Empire

    Rules are read top -> down.

    Move the rule up.



  • tried that and I can see that the packets are routed through that rule BUT they still using the wrong gateway (cleared states just to be sure)

    if I change the default getaway it works instantly

    not sure if I miss here something fundamentally


  • LAYER 8 Netgate

    Post how it is configured when you think it should be working but isn't.



  • sorry for the delay, here the pics (gateway2 = fritz gateway, i renamed it ...)
    d3877235-0830-453b-94c3-7e68d07ba858-grafik.png

    here the complete rule

    a1d69555-c48e-4ebb-94a7-66f77cf15667-grafik.png

    Currently it shows 0B at the states tab but that is because I had it disabled, after some minutes it shows traffic.


  • LAYER 8 Netgate

    You do know that you have to kill all states when you make a routing change like that. existing traffic will continue to flow over any existing states.



  • @Derelict yes I did this, even if I use * as source everything is still routed to the default gateway.


  • LAYER 8 Netgate

    Except it won't be.

    Please post the contents of /tmp/rules.debug to me in a chat and explicitly and specifically state what you think should be routed where that doesn't do what you think it should.



  • I do it as soon as possible, tx !


Log in to reply