P
P
piboho48572020-09-21 17:31:42
Computer networks
piboho4857, 2020-09-21 17:31:42

How to properly configure NAT in openWRT?

5f68b89c5c095853927348.png
There are several devices as shown in the image.
In the current configuration, the client has access to the Internet through the main router when requested from any of the assigned addresses. Routers 1-3 are pinged and allowed into the PU. If you change the gateway of the client to the IP of any of the routers 1-3 (192.168.5.101-103), you can get Internet access using the corresponding ISP.
How to make it so that when making a request using IP 192.168.5.201, the client accesses the target resource through Router 1 (192.168.5.101)? (202 for router 2 and 203 for 3, respectively) Internet access by default for 192.168.5.5 and others should be left through main (wan). I suspect that the matter is in the NAT or Static Route settings, but how to do it in practice is not clear.
thanks for answers

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Barbolin, 2020-09-21
@piboho4857

I twist, turn, I want to mess up)
This task is solved by routing using policy-routing .
In the classical routing scheme, the route is bound to the destination, but you want to bind the route to the source.
Command example.
https://habr.com/en/post/108690/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question