ip route add default dev tun1 table 20
ip rule add from 192.168.1.125 table 20
iptables -t nat -I POSTROUTING -s 192.168.1.125 -o tun1 -j MASQUERADE
iptables -I FORWARD -s 192.168.1.57 -o tun1 -j ACCEPT
iptables -I FORWARD -i tun1 -j ACCEPT -m state --state RELATED,ESTABLISHED
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!