在 Mac OSX 10.12.2 上設定 TINC 時出現問題

在 Mac OSX 10.12.2 上設定 TINC 時出現問題

我在幾個 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 ...經過相當多的谷歌搜索後,我找到了可安裝的軟體包通塔波斯克斯在 sourceforge 上,因為嘗試安裝相同軟體包的版本時,homebrew 和 macports 失敗了。

所以,目前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 ping macosx002 時,出現以下錯誤:

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

現在我可以 ping 和 SSH 往返 .1 和 .2

相關內容