To check a specific port, you can use telnet:
telnet 127.0.0.1 8080
(The port follows the IP / hostname with a space, not a colon.)
If you get an immediate error, then the port is not available. If telnet hangs, then you have successfully connected to the port. Ctrl + C to kill telnet, then.
This may or may not help with the port forwarding issue, though. It just gets you to that IP and port.
Theres is hping utility that allows you to ping TCP ports. This is also available via homebrew (brew install hping).
backdrift.org gives a simple instructions on how to use hping for this purpose
$ hping -S -p 80 google.com HPING google.com (eth0 184.108.40.206): S set, 40 headers + 0 data bytes len=44 ip=220.127.116.11 ttl=47 id=10442 sport=80 flags=SA seq=0 win=5720 rtt=97.7 ms len=44 ip=18.104.22.168 ttl=47 id=40838 sport=80 flags=SA seq=1 win=5720 rtt=97.7 ms len=44 ip=22.214.171.124 ttl=47 id=64607 sport=80 flags=SA seq=2 win=5720 rtt=97.7 ms len=44 ip=126.96.36.199 ttl=47 id=10443 sport=80 flags=SA seq=3 win=5720 rtt=97.7 ms ^C --- google.com hping statistic --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 97.7/97.7/97.7 ms
You could use
curl etc. to check that the website is responding.
Telnet gets the job done, but I’m unable to integrate that with GeekTool. I ended up doing a mysqladmin ping to the remote machine. The website has a db backend, so this (more-or-less) returns the info I’m looking for. Thanks for all the help!