Perforce with dynamic ip

流过昼夜 提交于 2019-12-04 19:16:55

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.

Launch p4d using

p4d -p 1666

rather than

p4d -p USERNAME.no-ip.org:1666

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.

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 )

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!