I had a similar issue in my home network. I had decided to run my Mac Pro headless for a while - it runs my media server, a wiki server and an ownCloud instance. All of those services were available to machines on the LAN, but from an ssh shell on that machine, I wasn't able to ping or otherwise reach any hosts outside of our LAN, so I couldn't (for example) do my "brew update" or other maintenance chores.
I finally gave up network troubleshooting and reattached the monitor, and found that my firewall (in this case, Little Snitch) was prompting me to allow those outgoing connections. Both options of loosening the rules, or disabling the firewall restored that machine's ability to reach the Internet.