I've set up a perforce server on an old always-on laptop which is always assigned a reserved address by the router. I have have an account at no-ip.com, which sends to my router, which in turn redirects port 1666 requests to this laptop.
when i try to set p4port to this no-ip.org address, that part is fine, but when i run p4d i get:
Perforce server error: Listen USERNAME.no-ip.org:1666 failed. TCP listen on USERNAME.no-ip.org:1666 failed. bind: USERNAME.no-ip.org:1666: WSAEADDRNOTAVAIL
Whereas if i just set the p4port to 192.168.0.6 i can access the server from behind the network using this one.. but i'd rather be able to access it externally as well..
I've read one other post on here in which someone had the same setup working (http://stackoverflow.com/questions/2397642/online-perforce-repositories , user was gaminghorror) but s/he hadn't gone into as much depth as I obviously needed..
have tried with router and windows xp firewalls off, and xp and router firewalls forward 1666 to this local ip
cheers!
Launch p4d using
rather than
USERNAME.no-ip.org is not a valid interface on your computer, since you are behind a NAT and not connected directly to the internet though that IP address. By setting p4port on the server to just the port number, it should bind on all interfaces available (0.0.0.0). If you then set the p4port on the client to USERNAME.no-ip.org:1666, then the NAT will take care of everything else.
Note that it might not work if you are trying to connect from behind the same NAT your server is on, so you'll probably need to test it from some external location. It really depends on how your routing tables on your router are set up.
My suggestion is that if you are using the free version of perforce and you're not stuck having to using it: use sourceforge.net SVN hosting which is free and your data will be available anywhere. If you have to use Perforce then I'd suggest forgetting about using it externally without having a static WAN IP and the correct port forwarding on your router as it sounds like a lot of work. Depends what you want to use the source control for really, perforce is really only worth it for big projects as the free version is very restrictive.
I think the problem comes from the p4d trying to bind its listening socket to USERNAME.no-ip.org:1666 and that address isn't the "correct" address for the PC at which p4d is running.
A solution would be to make p4d bind to 0.0.0.0:1666 (somewhere in p4d's config?) or to persuade the PC, that USERNAME.no-ip.org is indeed its address - by entering it into /etc/hosts (or for Windows in the hidden system file: c:\windows\system32\drivers\etc\hosts )