SadMonkey 1 Posted November 8, 2018 Share Posted November 8, 2018 Hello , i got a problem .. I got home server and people cant connect on my server.. I have all ports online but they cant to connect , i can do it if i'm in lan with external ip but they not, how to repair that? Link to comment Share on other sites More sharing options...
r00t3r 67 Posted November 8, 2018 Share Posted November 8, 2018 Check this -> Link to comment Share on other sites More sharing options...
Cunoo 210 Posted November 8, 2018 Share Posted November 8, 2018 Serverside: desc_client.cpp if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, "Your IP", 16); DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); } } TEMP_BUFFER buf; TPacketGDSetup p; memset(&p, 0, sizeof(p)); strlcpy(p.szPublicIP, "Your IP", sizeof(p.szPublicIP)); Clientside: NetAddress.cpp void CNetworkAddress::GetIP(char* szIP, int len) { BYTE IPs[4]; *((DWORD*)IPs)=m_sockAddrIn.sin_addr.s_addr; _snprintf(szIP, len, "Your IP", IPs[0], IPs[1], IPs[2], IPs[3]); Link to comment Share on other sites More sharing options...
SadMonkey 1 Posted November 8, 2018 Author Share Posted November 8, 2018 9 hours ago, Cunoo said: Serverside: desc_client.cpp if (!bSentBoot) { bSentBoot = true; TPacketGDBoot p; p.dwItemIDRange[0] = 0; p.dwItemIDRange[1] = 0; memcpy(p.szIP, "Your IP", 16); DBPacket(HEADER_GD_BOOT, 0, &p, sizeof(p)); } } TEMP_BUFFER buf; TPacketGDSetup p; memset(&p, 0, sizeof(p)); strlcpy(p.szPublicIP, "Your IP", sizeof(p.szPublicIP)); Clientside: NetAddress.cpp void CNetworkAddress::GetIP(char* szIP, int len) { BYTE IPs[4]; *((DWORD*)IPs)=m_sockAddrIn.sin_addr.s_addr; _snprintf(szIP, len, "Your IP", IPs[0], IPs[1], IPs[2], IPs[3]); Internal ip or external? ty 4 reply Link to comment Share on other sites More sharing options...
Cunoo 210 Posted November 9, 2018 Share Posted November 9, 2018 16 hours ago, SadMonkey said: Internal ip or external? ty 4 reply External. This is your public IP from ISP before router.. For example: 109.224.***.*** 1 Link to comment Share on other sites More sharing options...
SadMonkey 1 Posted November 11, 2018 Author Share Posted November 11, 2018 That really work , thanks alot! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now