1

I've set up a direct ethernet connection with between PI (192.168.2.2) and my imac (192.168.2.1). I can connect ok to the pi via ssh, but I am unable to connect to the internet from the Pi. I've turned on internet sharing and put a static IP on the pi with a gateway. Here is a route -n dump from the Pi

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG    202    0        0 eth0
192.168.2.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0

I think this could have something to do with the bridge on the my imac (yosemite 10.10.5). I've turned off the firewall - didn't do anything. I'm not too sure on where to go next with this one. Ideas anyone? Thanks!

andrew_b
  • 11
  • 1
  • 2
    You can connect to the Pi using `ssh` OR the internet with `ICS` NOT BOTH. If you want to share internet TURN OFF static IP, and restore the default setting. – Milliways Dec 24 '15 at 01:13
  • so if I turn off static IP will I then be able to use SSH and connect to the internet? I have been following this tutorial https://galem.wordpress.com/2014/10/14/configuring-the-raspberry-pi-to-share-a-macs-internet-connection/ – andrew_b Dec 24 '15 at 01:43
  • 1
    No. You can have one or the other. Incidentally the link your have posted will NOT work with recent versions of Raspbian. See http://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-networking-wifi-static-ip If you have a keyboard and monitor on the Pi use ICS. If you want to run the Pi headless you need some other network connection to get internet access. Why not just connect it to your router? – Milliways Dec 24 '15 at 02:46
  • Thanks - I have a wifi only router without ethernet and I am waiting on a wifi dongle for the Pi. I also don't have a keyboard (well I have a Mac one, but it's bluetooth). Might just have to wait for the dongle :) – andrew_b Dec 24 '15 at 03:27
  • `You can connect to the Pi using ssh OR the internet with ICS NOT BOTH` that sounds wrong, unless mac's do internet sharing in some stupid way. With internet sharing and the Pi set to DHCP, it still has an IP address that should be accessible to the Mac - after all, the Mac is providing the route to the internets – Jaromanda X Dec 24 '15 at 04:00
  • exactly what I though @JaromandaX, but after reading the article quoted by Milliways I think he might be correct. – andrew_b Dec 24 '15 at 04:58
  • 1
    I have to post a correction. I have tried this in the past, with no success. I just tried connecting my Pi2 running the latest Jessie (standard network setup) to OS X 10.7. I was able to `ssh` using `ssh pi@raspberrypi.local` and do a `sudo apt-get update`, so it appears possible. I couldn't get the Pi to successfully ping the internet, and could not use `vnc` from the Mac. There have been some changes in the latest (using `dhcpcd` which lets `ssh` work over many protocols, even `link-local`) so you may want to give it another try. – Milliways Dec 24 '15 at 05:21

0 Answers0