Perforce Public Knowledge Base - Accessing a home Perforce server over the Internet
Perforce Software logo
Reset Search
 

 

Article

Accessing a home Perforce server over the Internet

« Go Back

Information

 
Problem
How do I share my Perforce server to others on the Internet from my home?
Solution
It is possible to share Perforce over the Internet.  This requires opening up a port on your router to allow external access.  To make things easier, we will open up port 80 and set Perforce to start on port 80.
 
  1. Find your IP address and machine name
On Windows, open a command prompt and run

ipconfig /all

On Unix, run

/sbin/ifconfig -a
uname -a

 
  1. Access your router interface
Your router typically will use your IP address and end with .1 or .254.   For example, if your IP address is 10.0.10.5, try http://10.0.0.1 or http://10.0.0.254.  If your IP address is 192.168.1.8, try http://192.168.1.254 or http://192.168.1.1
 
  1. Use your router interface to modify your firewall to open or port forward the Perforce port
Every router is different, so follow the menu items, or find instructions for changing the firewall for your router on the Internet.  Your interface will need to know which machine is running the Perforce service.  While in the router interface, choose the machine that is running Perforce, then allow a web server or open up port 80.  Or, configure port forwarding to forward the port Perforce is running on.
 
  1. Find your external IP address
Your router interface will show your external IP address.  Or, run

http://www.whatismyip.com

to find your IPv4 address. 
You may have to disable IPv6 to get the IP address in the form of
<number>.<number>.<number>.<number>
 
  1. Change your Perforce server to run on port 80
On Windows, place your Command Prompt icon on the desktop, and right-click "Run as Administrator".  Then run

p4 set -S Perforce P4PORT=80

Stop and restart the Perforce service.
 
  1. Check that Perforce is accessible internally
p4 -p <internal IP>:80 info
 
  1. Check that Perforce is accessible externally
p4 -p <external IP>:80 info
 
  1. Verify external connectivity by connecting from an external machine
p4 -p <external IP>:80 info
 
  1. We would advise setting your Perforce to SSL mode
Your server is on the Internet, so it would be wise to encrypt your connections.  See See
http://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.superuser.html#DB5-58511 and Enabling SSL Support for the Server/Broker/Proxy.

Once this is working, you can set your Perforce server to run on another port such as port 1666.

If you have problems, temporarily disable the firewall on your Perforce server.  You can also check connectivity by enabling the "ping" command through your router interface, then using ping to see if your computer responds without errors when running

ping <external IP>
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255