I can successfully share my Mac wireless through internet sharing and plugging the Pi into the ethernet. I can surf the net through a browser on the Pi. However, I cannot ping the Mac from the Pi. I cannot ping the gateway from the Pi. I cannot ping google from the Pi. But if I disable the Mac firewall, I can now do all of the pinging I could not do before. So how can I configure the mac firewall to allow the Pi to access the internet through terminal?
If you can browse from the Pi, then you should already have internet access from the terminal. The trouble is that you are using the wrong binary to test it. The firewall on a Mac blocks
ping for security reasons. Most firewall do the same, or at least, should do. So
ping is not a good binary to use to test network connectivity, in a secure environment. From OS X: About the application firewall
Enable stealth mode
Enabling stealth mode prevents the computer from responding to probing requests. The computer still answers incoming requests for authorized apps. Unexpected requests, such as ICMP (ping) are ignored.
To test your internet routing, through the Mac, try to
or sftp, something from the internet from the Pi terminal or see if you can use
wget. For example, try this exercise:
cd /usr/src mkdir test cd test
This three lines first create a test folder to download to. Now to test the internet connection.
wget to grab a kernel source. If this works, then your mac is sharing the (wireless) network correctly.
Another simple test is to run apt-get. Open a terminal and type:
sudo apt-get update
This will soon tell you if you have internet access or not.
If you don't need to
ping your Mac for a specific reason, then you should be fine, and need not worry any further. If you really do need
ping, then you can enable
ping individually in the firewall, without turning off the entire firewall, by disabling Stealth Mode.
If you are still experiencing problems, you may need to check
ipfw. Again, from OS X: About the application firewall
The application firewall is designed to work with Internet protocols most commonly used by applications – TCP and UDP. Firewall settings do not affect AppleTalk connections. The firewall may be set to block incoming ICMP "pings" by enabling Stealth Mode in Advanced Settings. Earlier ipfw technology is still accessible from the command line (in Terminal) and the application firewall does not overrule any rules set using ipfw. If ipfw blocks an incoming packet, the application firewall does not process it.