I've got a situation where a remote pcs is vpn'ed to my Ubuntu box, and I'm wondering how I set the Ubuntu box up to redirect calls to specific ports over to the PC.
The remote PC should receive on its port 8181 whatever packets are sent to the Ubuntu box on port 8181?
To test, you can : from your remote PC, connect to the Ubuntu via VPN, and then ssh to the Ubuntu once connected via the vpn, and in that SSH session, setup a Reverse Port Forwarding: localhost:8181 8181 : this will forward everything coming to port 8181 on the Ubuntu to go, via the tunnel (so the ssh needs to be up) to the PC on port 8181.
Advantage: easy to test and setup. Drawback: ssh needs to stay up (needs keepalive)
Otherwise, if you really want to forward from the Ubuntu to the connected PC, it depends on the type of VPN you use, its firewalling rules, the PC's firewalling rules, etc. Much more difficult to setup (especially if you cuold have several PCs coming in). Try the SSH tunneling way first.