I set up a routing of TUN at my server like below:
10.0.1.0/24 dev eth0 proto kernel scope link src 10.0.1.2
192.168.1.0/24 dev tun0 scope link
default via 10.0.1.1 dev eth0
If I use "ip route get" to check the routing from eth0, there is no problem as below:
ip r g 192.168.1.3 from 10.0.1.3 iif eth0
192.168.1.3 from 10.0.1.3 dev tun0 src 10.0.1.2
cache mtu 1462 advmss 1422 hoplimit 64 iif eth0
But if I used as below:
ip r g 192.168.1.3 from 10.0.1.3 iif tun0
RTNETLINK answers: Invalid argument
Supposedly it should still work. I think some network config issue is here. Any thoughts? Thanks in advance.