Answer the question
In order to leave comments, you need to log in
How to let only selected sites through vpn in OpenVPN?
How to make it so that only some sites go through vpn and the rest are skipped?
Prescribed
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
;push "redirect-gateway def1 bypass-dhcp"
all traffic went through 45.45.241.110 push "redirect-gateway def1 bypass-dhcp"
all traffic went through 247.147.218.14 Answer the question
In order to leave comments, you need to log in
I don't know if it's right or wrong, but I figured it out.
I wrote this in the client config
route-nopull
# vk.com
route 87.240.160.0 255.255.224.0
route 95.213.0.0 255.255.128.0
route 185.32.248.0 255.255.255.0
route 95.142.192.96 255.255.255.224
route 95.142.192.128 255.255.255.128
route 95.142.193.0 255.255.255.0
route 95.142.194.0 255.255.254.0
route 95.142.196.0 255.255.252.0
# mail.ru
route 94.100.176.0 255.255.248.0
route 94.100.184.0 255.255.248.0
route 128.140.168.0 255.255.252.0
route 185.5.136.0 255.255.254.0
route 195.218.168.0 255.255.255.0
route 217.69.128.0 255.255.240.0
# yandex.ru
route 5.255.255.0 255.255.255.0
route 87.250.247.0 255.255.255.0
route 213.180.192.0 255.255.224.0
route 178.154.131.0 255.255.255.0
route 87.250.251.0 255.255.255.0
route 93.158.134.0 255.255.255.0
route add " + domain_ip + " via " + remote_ip + " dev " + interface
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question