How to route all the traffic from a specific ip address to an openvpn tunnel to a client
Posted: Sat Jun 24, 2017 7:42 am
Hi guys,
I have openvpn server and some clients. I'd like to route all the traffic from one client to the internet via another client. For example:
Thank you, Dmitry
I have openvpn server and some clients. I'd like to route all the traffic from one client to the internet via another client. For example:
- openvpn server tun network is 10.10.11.0/24
client 1 tun0 address is 10.10.11.10, eth0 address is 192.168.1.10
client 2 tun0 address is 10.10.11.20, eth0 address is 192.168.2.10
- iroute 1.0.0.0 255.0.0.0
iroute 2.0.0.0 255.0.0.0
iroute 3.0.0.0 255.0.0.0
. . . . . .
iroute 254.0.0.0 255.0.0.0
iroute 255.0.0.0 255.0.0.0
- ip add default 10.10.11.2 table 120
ip rule add from 10.10.11.10 table 120
Thank you, Dmitry