Score:0

Redirect specific traffic through a VPN interface

us flag

I,

I would like to redirect specific ports through a specific interface.

Until now what I accomplished it was

 cat /etc/iproute2/rt_tables | grep "200 force.route" > /dev/null
 if [ $? != 0 ]; then
   echo "200       force.route" >> /etc/iproute2/rt_tables
 fi

 ip rule del from all fwmark 200 table force.route
 ip rule add from all fwmark 200 table force.route
 ip route del 0.0.0.0/1 via 92.240.245.1 dev tun_02 table force.route
 ip route add 0.0.0.0/1 via 92.240.245.1 dev tun_02 table force.route
 ip route flush cache
 iptables -A OUTPUT -t mangle -o br0 -p icmp -j MARK --set-mark 200

But....

when I ping the packages go through the specific device see with

 tcpdump -i tun_02

then, expecting response but I don't have a response to echo-request.

How can I accomplish that ?

Until now is what I accomplished.

Score:0
us flag

Resulution : Need to add the following two rules: ip route add 0.0.0.0/1 via 92.240.245.1 dev tun_02 table force.route

AND THE MISSING ONE ip route add default via 92.240.245.1 dev tun_02 table force.route

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.