In addition to the many other routes suggested above, it might be simplest/easiest/whatever to just write a tiny socket program that sits on the firewall/gateway that listens for requests from inside, passes it to the outside and then returns it. You can find an extremely simple one in the Cookbook (socket section).
Comment on Re: Sending a Signal to a computer inside an intranet
It's a neat example, but it would be safer and simpler to use SSH for this. It already has port forwarding built in, and is carefully checked for security.