#!/bin/sh echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter ipset create vpn hash:ip iptables -t mangle -A PREROUTING -m set --match-set vpn dst -j MARK --set-mark 4 iptables -t mangle -A OUTPUT -m set --match-set vpn dst -j MARK --set-mark 4 ip rule add fwmark 4 lookup vpn /usr/local/bin/set-route --list /etc/setroute.list --ipset vpn