You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Parallels下Ubuntu实例桥接网络无法Ping/SSH问题求助

Hey there! Let's tackle this connectivity issue step by step. Since both your Ubuntu VMs are set to bridged mode in Parallels but can't reach each other via ping or SSH, here are the key checks you should run—including how to interpret your ifconfig logs:

Step 1: Validate ifconfig Output for Proper Bridged Setup

First, confirm both VMs have valid, subnet-matching IP configurations. Run ifconfig (or ip addr for newer Ubuntu versions, since ifconfig is deprecated) on each machine and verify these details:

  • The active network interface (usually eth0 or enp0sX) shows the correct IP (10.171.102.162 for control, 10.171.102.161 for host)
  • The subnet mask matches across both VMs (typically 255.255.255.0 or 255.255.0.0 depending on your network)
  • A default gateway is listed (and it’s the same for both instances)

A valid ifconfig snippet should look something like this:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
      inet 10.171.102.162  netmask 255.255.255.0  broadcast 10.171.102.255
      inet6 fe80::xxxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
      ether 00:1c:42:xx:xx:xx  txqueuelen 1000  (Ethernet)

If either VM has no valid IP (shows inet 0.0.0.0 or missing inet line), reset the network interface with:

sudo ifdown eth0 && sudo ifup eth0
# Or for systemd-based Ubuntu:
sudo systemctl restart networking
Step 2: Check Firewall Rules (The Most Common Culprit!)

Ubuntu’s default ufw (Uncomplicated Firewall) often blocks ICMP (ping) and SSH traffic by default:

  • On the host VM (10.171.102.161), check if ufw is active:
    sudo ufw status
    
  • If it’s enabled, allow ping and SSH access:
    sudo ufw allow icmp
    sudo ufw allow ssh
    sudo ufw reload
    
  • On the control VM, double-check outgoing traffic isn’t blocked (default allows outgoing, but sudo ufw status will confirm).
Step 3: Confirm Parallels Bridged Network Configuration

Parallels sometimes bridges to the wrong physical host interface, breaking connectivity:

  1. Open Parallels Desktop, go to Settings for each VM > Network
  2. Ensure "Bridged Network" is selected, and it’s mapped to your host’s active network adapter (e.g., Wi-Fi or Ethernet that’s connected to your network)
  3. Toggle the network mode temporarily to "Shared Network" then back to "Bridged Network", then reboot both VMs to apply changes.
Step 4: Test Local Connectivity First

Rule out VM-specific network issues by pinging the loopback and local IP:

  • On each VM, ping itself: ping 10.171.102.XXX (replace XXX with the VM’s own IP)
  • If this fails, check your static IP configuration (in /etc/netplan/ files if using static IP) or ensure DHCP is working correctly.
Step 5: Check ARP Tables for MAC Address Recognition

If ping returns "Destination Host Unreachable", verify the VMs can see each other’s hardware addresses:

  • On the control VM, run arp -a and look for an entry for 10.171.102.161 with a valid MAC (should match the ether line from the host’s ifconfig)
  • If no entry exists or it’s incomplete, clear the ARP cache and retry:
    sudo arp -d 10.171.102.161
    ping 10.171.102.161
    
Step 6: Ensure SSH Service is Running on the Host VM

If ping starts working but SSH still fails:

  • On the host VM, check if the SSH daemon is active:
    sudo systemctl status sshd
    
  • If it’s not running, start it and enable auto-start on boot:
    sudo systemctl start sshd
    sudo systemctl enable sshd
    
  • Also, verify /etc/ssh/sshd_config allows password authentication (set PasswordAuthentication yes if using password login) and permits your user to connect.

If you’ve gone through all these steps and still have issues, share the full ifconfig output from both VMs, and we can troubleshoot further!

内容的提问来源于stack exchange,提问作者Rıfat Erdem Sahin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:07:25