dndx / phantun

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Apache License 2.0
1.71k stars 137 forks source link

Could I specify a network interface for tun0/phantun? #106

Closed lanyuue closed 1 year ago

lanyuue commented 1 year ago

In my case, my client has two interface eth0 and eth1, i'd like to use eth1 instead eth0, tried to write ip route rules / change iptables rules / modify netplan / but these don't work, is there any easy way to specify an outway network interface or ip for tun0?

dndx commented 1 year ago

Add a static route to your destination specifying eth1's gateway as next hop should work. Do you mind showing what you did?