Why doesn't Internet Sharing work?

Joined
Apr 2, 2018
Messages
7
Reaction score
0
Points
1
If I setup Internet Sharing on my Mac running 10.13.2 to share one Ethernet NIC to the other (this is on a Mac Pro), I will get assigned IP addresses, but no routing occurs and I can't get to the Internet on virtual machines attached to the shared NIC. Has anyone experienced anything similar?
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,614
Reaction score
1,079
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
You mention that you can't get to the Internet on virtual machines. When you are sharing the Internet can you get to the Internet on the Mac that is hosting the virtual machine? In other words, if Mac number 2 is hosting the virtual machine can Mac number 2 connect to the Internet under OS X while Internet sharing is being used? It sounds to me like the problem is a setting on the virtual machine.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,770
Reaction score
2,110
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
So confused. You have two NICs in the same machine it sounds like. Where does the virtual machine get into the picture? Why are you sharing between the NICs?
 
OP
M
Joined
Apr 2, 2018
Messages
7
Reaction score
0
Points
1
You mention that you can't get to the Internet on virtual machines. When you are sharing the Internet can you get to the Internet on the Mac that is hosting the virtual machine? In other words, if Mac number 2 is hosting the virtual machine can Mac number 2 connect to the Internet under OS X while Internet sharing is being used? It sounds to me like the problem is a setting on the virtual machine.

There is only one Mac, a Mac Pro with two NICs. The Mac can get on the Internet just fine. I am attempting to share the Internet-connected NIC to the second NIC and the virtual machines bridge to this NIC. It gets an IP but can't route, so it can't get the Internet.
 
Joined
May 21, 2012
Messages
10,740
Reaction score
1,191
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
How does the internet get to the Mac pro? If you are using ethernet to connect to the internet, you will be able to share with the second NIC, as the first is needed for the internet to get to the machine.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,770
Reaction score
2,110
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Why not bridge the VMs to the NIC that works?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,770
Reaction score
2,110
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Do you HAVE to bridge, if not, why not NAT the working connection?
 
OP
M
Joined
Apr 2, 2018
Messages
7
Reaction score
0
Points
1
Do you HAVE to bridge, if not, why not NAT the working connection?

I can't seem to access the NATted VMs from the Mac command line to ssh into them. It's a true NAT.

One other thing I observed is that when Internet Sharing is turned on is that the Ethernet 1 doesn't get an IP. A bridge is created of which Ethernet 1 is a member and the bridge itself is given the IP 192.168.2.1. On a virtual machine which is assigned 192.168.2.2, I can't even ping 192.168.2.1. I can ping it on the Mac command line, however.
 
Joined
May 21, 2012
Messages
10,740
Reaction score
1,191
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
It's plugged into the wall.
So, you have the internet, going into the Mac Pro using one NIC. Then to share the internet, the share would have to go out the second NIC, you would need a third, to share "To", right?
 
OP
M
Joined
Apr 2, 2018
Messages
7
Reaction score
0
Points
1
So, you have the internet, going into the Mac Pro using one NIC. Then to share the internet, the share would have to go out the second NIC, you would need a third, to share "To", right?

No, there are only 2 NICs like so:

Screen Shot 2018-04-18 at 16.49.55.png
 
Joined
May 21, 2012
Messages
10,740
Reaction score
1,191
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
Internet sharing, is for sharing internet with other devices. The internet will come in to the Mac through one NIC. Then will go out, through the second NIC, to another Mac,Win,other device, that's how internet sharing works.
 
OP
M
Joined
Apr 2, 2018
Messages
7
Reaction score
0
Points
1
Internet sharing, is for sharing internet with other devices. The internet will come in to the Mac through one NIC. Then will go out, through the second NIC, to another Mac,Win,other device, that's how internet sharing works.

It appears to be working as you describe though it doesn't make any sense. The way internet sharing works is that en0 is made to be a member of a bridge, so that any device be it physical or virtual tied to en0 should work completely. It only works partially in that it gets an IP, but can't reach the gateway.

There's more to what I was trying to do, which was to create a hotspot for an iPhone and I can't seem to find a way to do this on the command line. It seems to be functionality limited to the GUI, which means I needed internet sharing for that and for my virtual machines.

Since it doesn't work, I will revert to the command line for internet sharing (which does work when using pf) and get a wireless router to plug in physically to make my own hotspot.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top