I want to forward all packet coming from internet to tun0. Quick scheme:
internet <-> eth0 (10.68.195.23) <-> tun0 (10.68.195.78) <-> local program.
Currently I am using ROUTE target for acheiving this.>
iptables -A PREROUTING -t mangle -p tcp -s 10.68.195.78 -j ROUTE --oif eth0
iptables -A PREROUTING -t mangle -p tcp -d 10.68.195.78 -j ROUTE --oif tun0
then I learned the ROUTE target support is been removed from kernel 2.6.32 ( iptables 1.4.8 )
After some quick search it turned out this is also possible with mark, but not sure how to do.
iptables -t mangle -A PREROUTING -i eth0 xxx -j MARK --set-mark 1
ip rule add fwmark 1 table (nb?)
Btw I'm running Debian squeeze with security updates.
Johnnie Alan