• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Ports are opened / can't connect to server or site

AkHolic

paradox.zapto.org
Joined
Oct 15, 2012
Messages
26
Reaction score
0
Hi guys so I am in a bit of a trouble. I'm running pokemon TFS 1.2 server for 10.98 tibia that I found on this forum. Problem that I have is that I can't access my site with my public IP or cant log in to my server using the same IP.

Things that I have done already:
  • Opened all ports ( 80, 7171, 7172, 3360 ) and checked using canyouseeme
  • Added ports 80, 7171, 7172 to firewall inbound rules. ( also I turned my fw off now )
  • I made dynamic host on no-ip and downloaded program to keep it updated.
  • Called my ISP and they gave me Ip that starts with 109.xxxx
  • I added my serv to the firewall
  • Im using uniserver to host site and mysql
  • added to host file " 127.0.0.1 localhost, global ip attached to no-ip dns and local ip ( ip of my computer ) attached to dns "
  • I made ip of my computer static where I host site and the server
So whats going on? First I can't access my site using my global ip ( I can if I use localhost or my computer ip ). If I try to use my global ip it wont connect. / I get connection time run out error.
Second when I try to use global ip to log into my server it will give me long " connecting to login server " and after that " CONNECTION FAILED. ERROR 10060 "
I am running out of ideas what to try and how to solve this so any tip would be highly appreciated. Thank you!
 
Many home routers have that problem. Port forwarding works only for connections coming from internet, not from local network.
When you try to visit your public IP from PC in local network, it drops packets or tries to handle that on router, which listens only on some port [admin panel of router].

Players must use public IP (109.x.x.x) to connect to OTS. You must use local IP (127.0.0.1) to connect to OTS.
New engines should handle it properly and allow connections using both IPs.
 
Many home routers have that problem. Port forwarding works only for connections coming from internet, not from local network.
When you try to visit your public IP from PC in local network, it drops packets or tries to handle that on router, which listens only on some port [admin panel of router].

Players must use public IP (109.x.x.x) to connect to OTS. You must use local IP (127.0.0.1) to connect to OTS.
New engines should handle it properly and allow connections using both IPs.
When I set public IP to my server and try to log in with 127.0.0.1 ( set in the client ) it will open char list but won't enter the game. If I set serv and client to localhost it will enter.
 
When I set public IP to my server and try to log in with 127.0.0.1 ( set in the client ) it will open char list but won't enter the game. If I set serv and client to localhost it will enter.
It means your server does not handle it properly. I've checked TFS 1.2, it has no code to handle properly 'home PC hosting' :(

It must detect that connection is from localhost and on characters list add local IP, not IP from config.lua [server adds IP of server to every player on 'characters list' when you login].
In TFS 0.4 there is a code that checks connection IP and return IP from config.lua or IP of connecting player (127.0.0.1):

You will faster learn how to host OTS on Linux VPS, than how to fix all problems with Windows and home PC.
 
Hello

your solution is here.

goodbye
 
It means your server does not handle it properly. I've checked TFS 1.2, it has no code to handle properly 'home PC hosting' :(

It must detect that connection is from localhost and on characters list add local IP, not IP from config.lua [server adds IP of server to every player on 'characters list' when you login].
In TFS 0.4 there is a code that checks connection IP and return IP from config.lua or IP of connecting player (127.0.0.1):

You will faster learn how to host OTS on Linux VPS, than how to fix all problems with Windows and home PC.
Is there a way around this or I'm doomed to use VPS? I'm hosting this for me and some friends can play it easily without hamachi etc.
Hello

your solution is here.

goodbye
I already set
127.0.0.1 localhost
globalIPv4 noip dns
LocalIPv4 noip dns
 
I already set
127.0.0.1 localhost
That fix works only, if server has code to handle connections from 127.0.0.1 like TFS 0.4 does.
If it's only for you and your friends, you can add some dumb IF in TFS 1.2 engine in protocollogin.cpp like if (accountName == 'admin') { serverIp= "127.0.0.1" }

EDIT:
In this line:
Change this:
C++:
output->addString(g_config.getString(ConfigManager::IP));
with:
C++:
if (accountName == "admin") {
    output->addString("127.0.0.1");
} else {
    output->addString(g_config.getString(ConfigManager::IP));
}
Replace "admin" with your account name. It will be able to login to that account characters only from localhost.
 
That fix works only, if server has code to handle connections from 127.0.0.1 like TFS 0.4 does.
If it's only for you and your friends, you can add some dumb IF in TFS 1.2 engine in protocollogin.cpp like if (accountName == 'admin') { serverIp= "127.0.0.1" }

EDIT:
In this line:
Change this:
C++:
output->addString(g_config.getString(ConfigManager::IP));
with:
C++:
if (accountName == "admin") {
    output->addString("127.0.0.1");
} else {
    output->addString(g_config.getString(ConfigManager::IP));
}
Replace "admin" with your account name. It will be able to login to that account characters only from localhost.
Yeah, I don't plan to run it like an official serv to earn money or some big project, we just don't want to pay for premmy on other servers so we want to play it like this. I will set this in serv so I can join from my PC ( I host the serv), but any ideas why my site won't show on my global IP?
 
To you or to others?
I apologize I'm just plain stupid. The site is working for people out of my LAN network just fine.
Post automatically merged:

That fix works only, if server has code to handle connections from 127.0.0.1 like TFS 0.4 does.
If it's only for you and your friends, you can add some dumb IF in TFS 1.2 engine in protocollogin.cpp like if (accountName == 'admin') { serverIp= "127.0.0.1" }

EDIT:
In this line:
Change this:
C++:
output->addString(g_config.getString(ConfigManager::IP));
with:
C++:
if (accountName == "admin") {
    output->addString("127.0.0.1");
} else {
    output->addString(g_config.getString(ConfigManager::IP));
}
Replace "admin" with your account name. It will be able to login to that account characters only from localhost.
I added the IF in the protocollogin.cpp and that didn't fix my issue. I still can log into the acc and see the chars, but when I try to enter I get the 10060 error :/

Also if I try to use client with global IP it wont even connect to the character list. If I use pc IP or localhost while server is on global IP it will show the char list but wont enter the game. Only time when it will enter the game is when the client and IP in server config.lua is 127.0.0.1
 
Last edited:
Back
Top