I am trying to setup PBR and it looks like I am missing something.
I have the following setup on the gateway (GW1):
set pbr table table1 static-route default nexthop gateway address <IP of GW2 > priority 1
set pbr table table1 static-route <SERVER> nexthop gateway address <IP of GW1 on eth2> priority 1
set pbr rule priority 100 match from <CLIENT>
set pbr rule priority 100 match interface <ETH1>
set pbr rule priority 100 action table table1
The regular routing table have default route towards "eth4" (blue line) and I need to override that and have default route pointing to GW2, but still maintaining access to the server.
It is working fine for the client in terms of traffic going through default route from PBR table, however I can't reach the server. Strangely in the logs I see connection was initiated, but with tcpdump I never see the traffic on the server.
Environment is R80.40 with one of the latest JHF