shlusiak / isatapd

ISATAP client for Linux
http://www.saschahlusiak.de/linux/isatap.htm
GNU General Public License v2.0
12 stars 5 forks source link

Using specific local address #4

Open huiyiqun opened 9 years ago

huiyiqun commented 9 years ago

Is it possible for this daemon to specify local address?

~% sudo isatapd -r isatap.tsinghua.edu.cn -vvvvv                                                                                       
isatapd[29021]: Adding internal PDR 166.111.21.1
isatapd[29021]: is0 created (local 10.8.0.6, pmtudisc)
isatapd[29021]: interface is0 up
isatapd[29023]: Adding PDR 166.111.21.1 to kernel
isatapd[29023]: Soliciting fe80::5efe:a66f:1501
isatapd[29023]: Soliciting fe80::200:5efe:a66f:1501
...

But you can see, I start the daemon behind a nat, and the local address is 10.8.0.6 instead of the IP of my router.

shlusiak commented 9 years ago

Running ISATAP behind NAT is difficult because it embeds the IPv4 address into the IPv6 address and uses that for routing. You might be able to run a DNAT on the router and forward all proto-41 traffic to your exposed host behind the router.

You should be able to manually create an isatap tunnel as described in http://www.saschahlusiak.de/linux/isatap.htm at the end and give it the public IP address, but have in mind that this is not what ISATAP was designed for and is likely to cause problems.

Are there any reasons why you can't use another tunnel protocol or terminate the tunnel on your router (and use private addresses and nat6)?