- Home /
Creating a Home Master Server
Hello.
My problem is that I cannot connect to the master-server that i set up on one of my computers over internet. I can connect fine over LAN (e.g. 192.168.1.36) or locally using the localhost ip ( e.g. 127.0.0.1). When I try to use the public ip, its as if it doesn't exist. I even used no-ip.com to forward my ip, but with no avail. I believe I set it up correctly, because I can connect over LAN, and I know my firewall is not a problem, because it is not enabled. I believe it is a NAT issue, but I don't know why or how to fix it. Thanks in advance.
Here is my code so far:
public string NewIPAddress = "172.22.173.177";
public int NewIPPort = 23466;
public string NewNATFAddress = "172.22.173.177";
public int NewNATFPort = 50005;
void Start(){
MasterServer.ipAddress = NewIPAddress;
MasterServer.port = NewIPPort;
Network.natFacilitatorIP = NewNATFAddress;
Network.natFacilitatorPort = NewNATFPort;
Network.Connect(MasterServer.ipAddress,MasterServer.port);
//MasterServer.RegisterHost("LobbyChat","NLGFPS");
print(Network.player.ipAddress);
print(Network.TestConnectionNAT(true));
}
I usually check $$anonymous$$aster-Server log and see error log, but maybe is not available.
Because we don't know what exactly the problem, try to trace your error message
private ConnectionTesterStatus connectStatus = ConnectionTesterStatus.Undeter$$anonymous$$ed;
void TestConnection(){
connectStatus = Network.TestConnection();
switch(connectStatus){
case ConnectionTesterStatus.Error:
print("Problem deter$$anonymous$$ing NAT capabilities");
break;
case ConnectionTesterStatus.LimitedNATPunchthroughPortRestricted:
print("LimitedNAT");
break;
}
}
Answer by lil_billy · Dec 08, 2012 at 03:25 AM
sorry if this is wrong but this seems to be due to the NAT punch through which i got the sense would be the hidden evil to people making their own servers.
Id look in to photon, they seem to provide an awesome solution to unity Networking all around
I like Photon, but I want to have exclusive control of the server. I hear Photon Server might be a good choice, but how to I set THAT up on a home computer?