tuna / ipv6.tsinghua.edu.cn

http://ipv6.tsinghua.edu.cn/
403 stars 77 forks source link

Problem on macOS #22

Open lemondante opened 6 years ago

lemondante commented 6 years ago

When I input sudo /usr/local/bin/thu6tunnel.sh it shows 'delete net default awk: syntax error at source line 1 context is

<<< awk: illegal statement at source line 1 missing } awk: syntax error at source line 1 context is <<< awk: illegal statement at source line 1 missing }'

What should I do?

alick commented 6 years ago

It seems to me your (BSD?) awk might be picky when its input is empty. The quick-and-dirty walkaround would be:

  1. Find your local IPv4 address, either from ifconfig output or GUI interface
  2. Replace the 7 lines of thu6tunnel.sh starting from EN0_IP... to simply LOCAL_IP=1.2.3.4 where 1.2.3.4 should be your IPv4 address found in the first step.

It would be better if you can debug the script and see what is the exact issue (and hopefully find a fix).

lemondante commented 6 years ago

So I execute the script line by line, then I found some mistakes. The cause of problems I raised before may be some wrong characters. I delete some space and the Chinese characters(line2)and it worked.(But I think there's nothing to do with the Chinese characters).

And then here's another problem when I execute "ifconfig gif0 tunnel $LOCAL_IP 166.111.21.1" this line in file,it shows "ifconfig: error in parsing address string: nodename nor servname provided, or not known". Maybe there's something wrong with the parser. I replace $LOCAL_IP with 192.168.1.4 (if I execute "ifconfig en0 | grep inet | grep -v inet6 | awk {print}" then I got " inet 192.168.1.4 netmask 0xffffff00 broadcast 192.168.1.255") and then execute continuously, nothing happens and the final response was "add net ::/0: gateway gif0", but I still cannot use xx-net.

That's what I found minutes before.

alick commented 6 years ago

In the old days it seems that using private IP address (e.g. 192.168.x.x) with ISATAP will only work with certain ISATAP servers. I'm not sure what it is these days. Perhaps someone on campus can tell.

You might have better luck with a public IPv4 address.

lemondante commented 6 years ago

Yep... I shall try it later...