The Terminal is NOT responsible for how each individual application accesses the internet. That is the responsibility of each program.
So if your 'ping' utility has a way to specify a proxy server, then you have jump through whatever hoops your 'ping' command demands. Note: Mac OS X 'ping' man page does not mention proxy, so unless you have a different ping utility, the answer may be "No".
Now I've found that setting the following environment variables has allowed some network aware utilities to get through the firewall (wget and curl are the 2 I use the most via these environment variables):
http_proxy=http://my.proxy.server.com:8080
ftp_proxy=http://my.proxy.server.com:8080
FTP_PROXY=http://my.proxy.server.com:8080
HTTP_PROXY=http://my.proxy.server.com:8080