Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Share internet from Ethernet 2 to Ethernet 1

Hello,


My Mac Pro is connected to a router by its Ethernet 2 port; I want to connect another computer (Linux) to Ethernet 1 (so the Linux computer can connect to the Internet passing by the Mac Pro). I can easily share the connection from Ethernet 2 to AirPort (e.g. to synchronise my iPhone) using the Sharing pane of System Preferences, but sharing from Ethernet 2 to Ethernet 1 does not work.

I tried several configurations; sometimes I can just ping from the Linux computer to the Mac Pro (Ethernet 1 address only), sometimes I can ping up to my home's router and other times I can't ping at all. With all the configurations I tried, Internet can't be reached, even when I can ping the router.


Searched on various forums, found no help.

How should I go for this?

Mac Pro, Mac OS X (10.6.8)

Posted on Feb 12, 2014 1:43 PM

Reply
29 replies

Feb 14, 2014 5:36 AM in response to Grant Bennet-Alder

Grant Bennet-Alder wrote:

No. That is not an intermediate step. That is what shows up and stays there the whole time while you are using it as a Shared Port. Changing it will not make anything work better.

Ok, so I keep it as DHCP.

I summarise my configuration (which doesn't yet work):

On my Mac Pro, Ethernet 1 is connected to my router. It uses DHCP with a manual address (192.168.2.222, subnet mask=255.255.255.0). Ethernet 1 works.

Ethernet 2, connected to my Linux computer, has a self-assigned IP (169.254.99.127, subnet mask=255.255.0.0) and is set to “Using DHCP”.

On my Linux computer, eth0 (Ethernet) is set to “Automatically (DHCP)”. There's a checkbox saying “Requires IPv4 addressing to make the connection working”; should I check it?

On the Linux box, Ethernet has the IP 192.168.2.22 (broadcast address=192.168.2.255, subnet mask=255.255.255.0, default router=192.168.2.1*, primary DNS=192.168.2.1*). (* these are my real router's IP). From Linux, I can ping 169.254.99.127 and 192.168.2.1 (thought I'm not sure if Linux sees 192.168.2.1 as my router; perhaps it's the Mac Pro's DHCP server?). I can't ping 192.168.2.222 nor can't I ping any website (including by IP address).

Do these settings and facts look ok? What else should I tell or try?

Feb 14, 2014 8:24 AM in response to Anic264b

On the Linux box, Ethernet has the IP 192.168.2.22 (broadcast address=192.168.2.255, subnet mask=255.255.255.0, default router=192.168.2.1*, primary DNS=192.168.2.1*). (* these are my real router's IP).

Those Manual Addresses will not work. The Hardware Router is not reachable directly.


The Linux box is not going to be talking directly to the Real Router. It will be talking to the software Router provided by the Mac Pro shared Ethernet port. You must set them all the Linux settings to DHCP. And checking the IPv4 required checkbox may be helpful.

Feb 14, 2014 8:37 AM in response to Grant Bennet-Alder

Grant Bennet-Alder wrote:

The Linux box is not going to be talking directly to the Real Router. It will be talking to the software Router provided by the Mac Pro shared Ethernet port. You must set them all the Linux settings to DHCP. And checking the IPv4 required checkbox may be helpful.

Ok, Linux is set to DHCP (it has been so since at least yesterday), and I tried with and without the checkbox.

So, if the Linux machine is not supposed to talk to the router, I'm assuming it's the reason why I can't ping to it; but why can't I ping, say, www.google.com, and how can my Linux computer browse to a website if it can't ping to it (assuming the website isn't configured to deny pinging)?

What tools do I have to check where and why my connection is blocking if pinging is not reliable?

Thanks

Feb 14, 2014 9:30 AM in response to Grant Bennet-Alder

It looks like it gets an IP address, yes. I'm getting 192.168.2.22 (sometimes 23) for the Ethernet address of the Linux computer.


I'm currently reading various forums about the Console entries I'm getting:

14.02.14 18:12:12natd[42951]failed to write packet back (No route to host)

In one forum, I've read something interesting: an user is thinking that some virtual machines software (which usually add virtual NAT services) might be conflicting with the native natd. There are other opinions, so it's hard to tell if this is indeed true, but it surely makes a lot of sense to me (messing with natd would indeed break sharing), especially since I have Parallel Desktop installed. Now, how can I disable Parallel Desktop's virtual network cards without uninstalling Parallel Desktop?

Otherwise, how can I know if this is actually the “right problem”?

Feb 14, 2014 12:17 PM in response to Grant Bennet-Alder

I'm sure it's interesting, as I also have curiosity. For now, I'm more interested in resolving the problem.

I'm listening to your suggestions.


(for what it's worth, Ethernet 2 has, in System Preferences, the 169.254.x.y address, but when I look in Network Utility, it has 192.168.2.1. Can this mean my Mac is providing the same IP address than my router and thus things are actually somewhat working?)

Feb 14, 2014 12:51 PM in response to Anic264b

If I take my Mac Pro and enable Internet Sharing on Ethernet 2,


In System Preferences > Network ...


... I get an addresss of "cable unplugged"


In network Utility ...


... I get an IP Address of 192.168.2.1


^^ That must be the deafult Software Router Address.


If that is also your Hardware Router Address, you have a clash -- one of those Addresses must be changed.

Feb 14, 2014 2:19 PM in response to Grant Bennet-Alder

Grant Bennet-Alder wrote:

If that is also your Hardware Router Address, you have a clash -- one of those Addresses must be changed.

And this was the problem! No need to wonder why this was so complicated to solve (having 192.168.2.1 in a router is rather unusual)! I've now changed my router's IP (will have to change all my other computers/devices which have all a manual address) and… hurray, it works! This problem lasted for around 5 years, where it worked for others and it didn't made sense to me.

I really appreciate your help, thank you a lot!

BTW: I think it was not a mistake to over-think this 😉

Feb 14, 2014 2:45 PM in response to Grant Bennet-Alder

For this problem, I couldn't solve it without your help! Searching further on the Web would have not helped (this is not a common problem). Granted, it's always better to stick to a problem to hope resolving it.

I learnt computer science, 10 years ago, but networking was not the branch I chose, so I learnt only the “basis”.

Thank you again, really happy!

Feb 15, 2014 1:57 PM in response to Grant Bennet-Alder

One last question, though: should I deactivate Internet Sharing each time I turn the Linux computer off (well, I'm sure it would continue to work as when the computer is on, but would I gain something in turning sharing off when I don't need it)?

(up to today, with sharing Ethernet to Airport for my iPhone, I always deactivated the share once I finished; obviously, it's more convenient to keep sharing on from Ethernet 1 to Ethernet 2, but are there drawbacks?)

Feb 15, 2014 3:03 PM in response to Grant Bennet-Alder

Grant Bennet-Alder wrote:


As I understand it, there should be no packets sent back-and-forth, so the impact of having the remote computer off should be negligible.

Hmmm… When I turn my Linux machine off (and Internet Sharing is still on), I start getting these entries in the Console (it just happened to me now):

15.02.14 23:59:44natd[48364]failed to write packet back (No route to host)

Is it the same thing as packets sent back-and-forth?

If instead you were Sharing over WiFi, that might cause some very minor load due to broadcasting the network name periodically and polling the WiFi looking for stations coming and going.

Understood.

Thank you

Share internet from Ethernet 2 to Ethernet 1

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.