M
M
Monarch882019-02-21 23:57:50
linux
Monarch88, 2019-02-21 23:57:50

How to redirect one client's traffic to vpn?

There is a router with Entware on board. Local network 192.168.1.0/24 on interface br0; gateway - usb modem 192.168.8.1 (weth0); a configured working OpenVPN client (tun0), which is not the default route (all traffic goes direct, if set as the default route, then the traffic of the entire local network goes through vpn perfectly). And there is a network hard on 192.168.1.127 (static ip).
Question: How can I make all traffic from the network hard to the external go through tun0? What are the iptables or route rules? As a result, it is necessary that only this hard drive go to the outside via vpn, and the rest of the clients directly, and within the local network, so that the hard drive is directly accessible to all devices.
PS: I'm not on friendly terms with routing at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-02-22
@Monarch88

It's called PBS - Policy Based Routing, your case is described heretyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question