This needs its own thread really not on this thread…
Look this has more layers to it then just what your asking as well. This is a networking issue to begin with, you need to make sure you know the operating ports and that they are open on the server. You also need to make sure your router is forwarding the ports to the correct server which also means the pc should probably have its own static routing information and IP address. This is also dependent on the type of router you have, if you set it up to work externally from you ISP location then you will not be able to hit the server with the same information internally. Thus you can only host it out to people and not internally without setting up another set of ports for internal routing etc.
As far as setting up perforce and connecting to it - well there is probably a getting started somewhere for the software - I would follow that.
Look if you know how to setup and host a gaming server and get that working or maybe remote desktop or an FTP, hosting perforce will be no different. However I am willing to bet your going to run into the internal / external issue of hosting. Which is why I recommend offloading it to a perforce provider.