Hamachi/Haguichi无法连接,执行IPv6启用命令遇权限拒绝求助
Hey there, let's work through this problem together—those "Connecting → Disconnected" loops with Hamachi/Haguichi are super frustrating, and the permission error when trying to enable IPv6 is a common roadblock for new Ubuntu users. Here's what to do:
Step 1: Fix the "Sysctl Permission Denied" Error
You're seeing this because modifying system network settings requires administrative privileges. Use sudo (superuser do) to run those IPv6 commands—here's how:
- Open your terminal and run these two commands one by one:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0 - When prompted for your password, type it in (note: the terminal won't show any characters as you type—this is normal!) and press Enter.
These commands immediately enable IPv6 for all network interfaces, which Hamachi often relies on to establish connections.
Step 2: Make IPv6 Enablement Permanent (Optional but Recommended)
The above changes will reset after a reboot. To keep IPv6 enabled long-term:
- Open the sysctl configuration file with a beginner-friendly text editor:
sudo nano /etc/sysctl.conf - Scroll to the very end of the file and add these two lines:
net.ipv6.conf.all.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 - Press
Ctrl+Oto save the file, thenCtrl+Xto exit the editor. - Apply the new settings right away with:
sudo sysctl -p
Step 3: Restart Hamachi/Haguichi
Now let's refresh the Hamachi service to pick up the new IPv6 settings:
- Run this command to restart the Hamachi background service:
sudo systemctl restart logmein-hamachi - Close the Haguichi app completely, then reopen it. Try clicking the power button again to connect.
If It Still Doesn't Work: Check Hamachi Logs
If you're still stuck, checking the Hamachi log can help pinpoint the issue. Run this command to view real-time log entries while you attempt to connect:
sudo tail -f /var/log/logmein-hamachi.log
The log will show error messages that might reveal other problems (like firewall blocks or network conflicts).
内容的提问来源于stack exchange,提问作者ResidentSojourn

