![Mac OSX 10.12.2 で TINC を設定する際の問題](https://rvso.com/image/697392/Mac%20OSX%2010.12.2%20%E3%81%A7%20TINC%20%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%E9%9A%9B%E3%81%AE%E5%95%8F%E9%A1%8C.png)
私はいくつかの Linux ボックスに TINC をセットアップしましたが、それらはうまく動作しています。
- linux001 (静的 IP VPS - 10.0.0.1)
- macosx002 (linux001 - 10.0.0.2 に接続)
- linux050 (linux001 - 10.0.0.50 に接続)
私もOSX 10.12.2のMacを持っていますが、linux001に接続しているようですが、通信できません。tinc-vpn.orgのこのガイドガイドに従って作業を進めるうちに、/dev/tun0や/dev/tap0がないという問題に遭遇しました。グーグルでかなり調べた結果、インストール可能なパッケージを見つけました。トゥンタポスHomebrew と MacPorts が同じパッケージのバージョンをインストールしようとしたときに失敗したため、SourceForge で使用しています。
つまり、現在macosx002はlinux001に接続しているようです
Sending PING to linux001 (x.x.x.x port 655): 8
Sending 2 bytes of metadata to linux001 (x.x.x.x port 655)
Flushing 2 bytes to linux001 (x.x.x.x port 655)
Got PING from linux001 (x.x.x.x port 655): 8
Sending PONG to linux001 (x.x.x.x port 655): 9
Sending 2 bytes of metadata to linux001 (x.x.x.x port 655)
Flushing 2 bytes to linux001 (x.x.x.x port 655)
Got PONG from linux001 (x.x.x.x port 655): 9
ただし、linux001 から macosx002 に ping を実行しようとすると、次のエラーが発生します。
Error while writing to Generic BSD tun device /dev/tun0: Input/output error
Error while writing to Generic BSD tun device /dev/tun0: Input/output error
Error while writing to Generic BSD tun device /dev/tun0: Input/output error
Error while writing to Generic BSD tun device /dev/tun0: Input/output error
反対方向に ping を実行しようとすると、次のエラーが発生します。
user-mac-mini:~ user$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
^C
--- 10.0.0.1 ping statistics ---
6 packets transmitted, 0 packets received, 100.0% packet loss
これにより、tincd は実際には双方向に接続していると考えられますが、macosx002 の tun/tap へのルーティングに問題があります。
/dev/ にアクセスすると、tun0 と tap0 は両方とも実際に存在しますが、これは sourceforge からパッケージをインストールした場合のみです... macports、homebrew、または make install 経由でパッケージをインストールした場合... tun0 と tap0 は存在しません。
どなたか助けていただければ幸いです。自分で答えを見つけたら、ここに投稿します。
答え1
読み終えた後これ素晴らしい投稿ですtinc-up
。ファイルを次のように変更しました:
ifconfig tun0 inet 10.0.0.2 10.0.0.1 up netmask 255.255.255.0
これで、.1と.2との間でpingとSSHができるようになりました