I have a mac and raspberry pi connected via ethernet cable which are communicated fine. Internet sharing is turned on but my raspberry pi can't connect to the internet.

My mac is connected to the internet via Wifi with the following settings: enter image description here

Internet is working on my mac and have connected an ethernet cable between my mac and my raspberry pi. I turned on internet sharing on my mac and gave the ethernet the following settings: enter image description here

I gave my raspberry pi a static IP address in the same subnet ( by editing the network/interaces file and set the gateway the same as my Macs ip address, which looks like this:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

I can ping from my RPi to my mac (ping and can ssh into my RPi from my mac (set up previously; ssh [email protected]).

The problem: I can't seem to connect to the internet. Running sudo apt-get update shows errors in the lines of "temporary failure resolving archive.raspberrypi.org'. Any help or advice is appreciated.

Update 1: The output of "route" is (after waiting many seconds):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 eth0     *        U     0      0        0 eth0
  • try changing the gateway to the router ip address of
    – rob
    Nov 4, 2014 at 10:33
  • I tried but 'sudo apt-get update' still gives the same error that it cannot connect..
    – crazjo
    Nov 4, 2014 at 10:46
  • what is the output of the command "route"? and can you ping google.com?
    – rob
    Nov 4, 2014 at 10:48
  • I added the output of "route" to the post above. If I type "ping google.com" nothing happens and after a long while it says "ping: unknown host google.com"
    – crazjo
    Nov 4, 2014 at 10:54
  • Do you have the DNS set correctly? I also had an issue with Mac Internet Sharing, and rebooting fixed my issue.
    – baum
    Nov 4, 2014 at 13:56

2 Answers 2


Your route is incorrect: default

If your gateway (in this case the Mac) is at .1.90, your gateway has to be at .1.90

If you have just set the fixed IP in network/interfaces, then you may need to restart your networking stack (/etc/init.d/network restart).

Also check your current network configuration with "ifconfig eth0", you may see the problem right there. To fix your route do this: "route add default gw"


You have to enable this in 'Sharing' under 'Settings'

Follow this



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.