Initial commit
[setroute.git] / usr / local / bin / create_vpn_ipset
1 #!/bin/sh
2
3 echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter 
4
5 ipset create vpn hash:ip
6 iptables -t mangle -A PREROUTING -m set --match-set vpn dst -j MARK --set-mark 4
7 iptables -t mangle -A OUTPUT -m set --match-set vpn dst -j MARK --set-mark 4
8 ip rule add fwmark 4 lookup vpn
9 /usr/local/bin/set-route --list /etc/setroute.list --ipset vpn