I know it should be possible to communicate with a NAT/Router on a local network and ask for ports to be forwarded via UPnP, but I don't know any of the specifics.
I've found a gem that looks like it might be useful, but beyond that I'm at a loss (The gem's homepage appears to be down).
Does anyone have any pointers?