• 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 Problem getting it online

dartedd450

Member
Joined
Dec 21, 2016
Messages
51
Reaction score
9
The only way I'm able to connect to my server is when I use 127.0.0.1 in the config.lua and the ip changer.

Both ports 7171-7172 are open, both router/pc firewalls disabled also

When I use my real IP ex. 123.456.789 in the config.lua and ip changer I am unable to connect, when I try to login I get the connection failed window *Cannot connect to a login server (10061)"
 
Last edited:
Both ports 7171-7172 are open, both router/pc firewalls disabled also

Ports have to be redirected. All ports are open by default by your internet provider nowadays. Noone from all router/pc sellers are 'closing' ports by default. Also, you don't have to disable firewalls.

Read about private and public ip address and read about redirecting, port forwarding.
 
Ports have to be redirected. All ports are open by default by your internet provider nowadays. Noone from all router/pc sellers are 'closing' ports by default. Also, you don't have to disable firewalls.

Read about private and public ip address and read about redirecting, port forwarding.

Not sure what you meant by redirection, but does this seem right? Would those options you're speaking of be elsewhere in the routers options?

nb9fz5.jpg
 
192.168.0.140 is a private ip address.

Protocol should be both TCP and UTP for both 7171 and 7172.

Server IP Address should be set to your PC where you are hosting your OTServer. If 192.168.0.140 is your PC, then ok.

Then you have to find your public IP address and set it to your config.lua too.

Then you have to add rule to your OS firewall and dedicated firewall if you are using it too. Just put there rule what allows your ots.exe to communicate on both TCP and UTP at ports 7171-7172

If you do all of it, it should be possible to connect to your OTS via your public ip address.

@edit
If after 1-2 days you will be no longer available to connect to OTS, check your private address again. Becouse becouse if you are using WiFi for example your private address may change after you turn off PC for day or few hours (depend on ip lease time). The other good idea is to put static IP address to that one PC where you are hosing OTS.
 
192.168.0.140 is a private ip address.

Protocol should be both TCP and UTP for both 7171 and 7172.

Server IP Address should be set to your PC where you are hosting your OTServer. If 192.168.0.140 is your PC, then ok.

Then you have to find your public IP address and set it to your config.lua too.

Then you have to add rule to your OS firewall and dedicated firewall if you are using it too. Just put there rule what allows your ots.exe to communicate on both TCP and UTP at ports 7171-7172

If you do all of it, it should be possible to connect to your OTS via your public ip address.

I have done all that. .140 is indeed my pc which hosts the OT, my public IP is set in config.lua, both 7171 7172 are opened TCP and UDP. Still nothing, I've read online that my router has nothing but issues with this so I'm wondering if that has something to do with it

Also should I change this?

2pp0wat.jpg
 
When I tried to bring it online setting the ports in range 7171-7172 it didn't work, so I've forwarded it individually.
7171 tcp/udp forwarded to machine IP
7172 tcp/udp forwarded to machine IP

I've also edited hosts file, pointing my hostname to machine ip, for example: otserver.tibia.com -> 192.168.0.42 (when I ping from my machine it will show my machine IP instead of global ip). Everyone out of your local network will connect trough global IP.
On config.lua I just put the hostname on IP address, for example: otserver.tbia.com and it works for me and everyone who tries to login.
 
If you are using Windows:
Open Windows Firewall in Control Panel and find there your OTS. Allow network traffic at ports 7171-7172 both for UPC and TCP. So, you should have there 4 new rules.
 
If you are using Windows:
Open Windows Firewall in Control Panel and find there your OTS. Allow network traffic at ports 7171-7172 both for UPC and TCP. So, you should have there 4 new rules.

Now when I try connecting to my server though public IP, I am able to load my charcter list properly, but when I try to log in it just says "Please wait, failed to establish connection to game server... trying to reconnect in X seconds"
 
Now when I try connecting to my server though public IP, I am able to load my charcter list properly, but when I try to log in it just says "Please wait, failed to establish connection to game server... trying to reconnect in X seconds"

Btw, it looks like you have still blocked traffic at 7172.
Code:
loginPort = 7171
gamePort = 7172


@edit
You can open 7173 too. As I remember, some servers were using 7173 too for sound support. Mock did sth like this, not sure.[/code]
 
Last edited:
Open 7173 too. As I remember, some servers were using 7173 too for sound support. Mock did sth like this, not sure.

7171, 7172, 7173 are opened (canyouseeme.org)

all firewalls are off/deactivated , config.lua is set perfectly, still no connection when trying to connect...
 
7171, 7172, 7173 are opened (canyouseeme.org)

all firewalls are off/deactivated , config.lua is set perfectly, still no connection when trying to connect...

Hello.
I've found this thread that may help you.

https://otland.net/threads/problem-with-tfs-0-1-10-37.212349/#post-2036409
You have to specify the global IP in config.lua for others to be able to connect. If you can't connect with your global IP; then there's a workaround.

Specify your domain as ip in config.lua, it would look something like:
ip = "example.com"

Then add this to your hosts file (/etc/hosts in Unix-like operating systems, C:/Windows/system32/drivers/etc/hosts in Windows):
192.168.0.1 example.com

Hope you get throgh it.

Sincerely,
l
 
bump, able to load character list properly with global public ip, but can't login. just tries reconnecting endlessly
What does the server log say when you try to login? Check the player in the database to make sure their vocation or town are properly set. Also make sure the map you are using has atleast one town id.
 
What does the server log say when you try to login? Check the player in the database to make sure their vocation or town are properly set. Also make sure the map you are using has atleast one town id.

When I set ip to 127.0.0.1 and login using that ip aswell everything works fine so it's not a database issue I think,

Failed to establish connection to the game server.. attempts a few times then this
Cannot connect to the game server. Error: Connection refused. (10061)
 
Last edited:
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = "1000"
motd = "Welcome!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Ots"
statusTimeout = 5000
replaceKickOnLogin = true
maxPacketsPerSecond = 300

enableLiveCasting = true
liveCastPort = 7173

Everything is as should be right? Btw 7171 , 7172 and 7173 are all open

MYSQL PORT is 3306, should I open that port aswell? could that be the issue?

-- MySQL
mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = "passwordhere"
mysqlDatabase = "tfs"
mysqlPort = 3306
passwordType = "sha1"
mysqlSock = ""
 
7172 tcp udp isnt forwarded on your router or is blocked on os firewall
make unique rule for each port
 
Last edited:
Back
Top