How can I route traffic from specific host via a dedicated route

Hi everyone,
I have the following setup:
Untitled Diagram.png
The two sites are in two different countries. When there is an http request, it is correctly routed to the WEB server, however the response tries to reach the requestor via the wrong router, due to the 0.0.0.0/0 route on router 172.30.0.1. And this is the proper behavior, I don’t want all internet traffic for all hosts to be routed through site 1. How can I add a speciffic route for the WEB server only, when it is the source to send all traffic to Site 1. Or if there is a layer 7 routing, that I can see the http request itself and route it properly?

Thank you in advance

You need two mangle rules on 10.0.0.2:

  1. with action=mark-connection for packets coming from tunnel to your web server
  2. with action=mark-routing for packets belonging to already marked connections and coming in the opposite direction

And after that - add a new default route for marked packets via 10.0.0.1

Thanks, it’s already a good direction, but could you please help further? Which chains should I use for the two mangle rules? I assumed input for the mark connection and prerouting for mark routing, then I created a new static route for the second, but it still doesn’t work.
Am not very exprienced in the policy based routing, sorry

Both mangle rules should be in the prerouting chain.

And both can be set to passthrough=no.

Works like a charm, thanks !