• 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!

TFS 0.X Can't login into character (Display only list)

GhostWD

I'm in love with the var_dump()
Joined
Jan 25, 2009
Messages
185
Solutions
6
Reaction score
29
Hi there!

I've got issue with TFS0.4 on Ubuntu16.04. What exactly?
When I try to login from outter network and in config.lua IP is set to 192.168.0.102 I can login into account but im stuck on character list and can't proceed because connection is timing out and https://www.yougetsignal.com/tools/open-ports/ says that port 7171 and 7172 are opened

When I try to login from outter network and in config.lua IP is set to e.g. 93.233.20.61(public ip from whatismyip.com) I can't login to account and https://www.yougetsignal.com/tools/open-ports/ says that port 7171 and 7172 are closed

website(port 80) works always (my friends can access it)

Network:
Internet->Modem->Router->PC1,PC2,PCn
On router i have used DMZ and Port Forwarding and nothing helped
ufw disabled

Config:
[Lua] -- The Forgotten Server Config -- Account manager accountManager = true - Pastebin.com
 
Router should DMZ/port forward to 192.168.0.102
In IP changer from outer network you should use IP 93.233.20.61
In config.lua you should use 93.233.20.61

Then connection from internet should work. Connections from local network and 'this PC' (host) may not work.
If it does not, it means that router does not work properly or some firewall block connections from internet.

-------------------
I recommend to host server on dedic/VPS. For small server/tests you can use VPS or super cheap dedic:
Kimsufi: affordable dedicated servers! (2GB RAM VPS for 3 euro per month)
Kimsufi: affordable dedicated server! (4GB RAM dedic for 8 euro per month)

Dedic got one IP and it's public IP.
 
I've found this using netstat -tulpn

IP set to public (on local ip 192.168.0.102:7171-7172 is present)
bindOnlyGlobalAddress = true (on false 127.0.1.1:7171-7172 is present)
Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1251/dnsmasq   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3200/sshd       
tcp        0      0 127.0.0.1:5910          0.0.0.0:*               LISTEN      1788/Xvnc       
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1456/xrdp-sesman
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3465/cupsd     
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1454/xrdp       
tcp        0      0 127.0.0.1:7171          0.0.0.0:*               LISTEN      4395/theforgottense
tcp        0      0 127.0.0.1:7172          0.0.0.0:*               LISTEN      4395/theforgottense
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1000/mysqld     
tcp6       0      0 :::22                   :::*                    LISTEN      3200/sshd       
tcp6       0      0 ::1:631                 :::*                    LISTEN      3465/cupsd     
tcp6       0      0 :::80                   :::*                    LISTEN      1490/apache2   
udp        0      0 0.0.0.0:51274           0.0.0.0:*                           844/avahi-daemon: r
udp    17408      0 0.0.0.0:47810           0.0.0.0:*                           1251/dnsmasq   
udp    16896      0 127.0.1.1:53            0.0.0.0:*                           1251/dnsmasq   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1239/dhclient   
udp        0      0 0.0.0.0:631             0.0.0.0:*                           3466/cups-browsed
udp    24576      0 0.0.0.0:5353            0.0.0.0:*                           844/avahi-daemon: r
udp6       0      0 :::52145                :::*                                844/avahi-daemon: r
udp6   16896      0 :::5353                 :::*                                844/avahi-daemon: r

should it be like this? apache2 is accessible outside and have :::80. Can anyone check this on own server?
 
I've found this using netstat -tulpn

IP set to public (on local ip 192.168.0.102:7171-7172 is present)
bindOnlyGlobalAddress = true (on false 127.0.1.1:7171-7172 is present)
Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1251/dnsmasq  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3200/sshd      
tcp        0      0 127.0.0.1:5910          0.0.0.0:*               LISTEN      1788/Xvnc      
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1456/xrdp-sesman
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3465/cupsd    
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1454/xrdp      
tcp        0      0 127.0.0.1:7171          0.0.0.0:*               LISTEN      4395/theforgottense
tcp        0      0 127.0.0.1:7172          0.0.0.0:*               LISTEN      4395/theforgottense
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1000/mysqld    
tcp6       0      0 :::22                   :::*                    LISTEN      3200/sshd      
tcp6       0      0 ::1:631                 :::*                    LISTEN      3465/cupsd    
tcp6       0      0 :::80                   :::*                    LISTEN      1490/apache2  
udp        0      0 0.0.0.0:51274           0.0.0.0:*                           844/avahi-daemon: r
udp    17408      0 0.0.0.0:47810           0.0.0.0:*                           1251/dnsmasq  
udp    16896      0 127.0.1.1:53            0.0.0.0:*                           1251/dnsmasq  
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1239/dhclient  
udp        0      0 0.0.0.0:631             0.0.0.0:*                           3466/cups-browsed
udp    24576      0 0.0.0.0:5353            0.0.0.0:*                           844/avahi-daemon: r
udp6       0      0 :::52145                :::*                                844/avahi-daemon: r
udp6   16896      0 :::5353                 :::*                                844/avahi-daemon: r

should it be like this? apache2 is accessible outside and have :::80. Can anyone check this on own server?
7171, 7172 have to be ported for udp & tcp, not only tcp
 
Hmm It seems that I have only problem with Fir3Element distro(my edited and clean from github) idk why. this one is running smooth but I need to run my server because off modifications I've added ( some months ago it was working ) maybe some source modifications?


oh and when I used this distro netstat -tulpn returned
Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1251/dnsmasq  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3200/sshd      
tcp        0      0 127.0.0.1:5910          0.0.0.0:*               LISTEN      1788/Xvnc      
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1456/xrdp-sesman
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3465/cupsd    
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1454/xrdp      
tcp        0      0 0.0.0.0:7171            0.0.0.0:*               LISTEN      11194/otserv  
tcp        0      0 0.0.0.0:7172            0.0.0.0:*               LISTEN      11194/otserv  
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1000/mysqld    
tcp6       0      0 :::22                   :::*                    LISTEN      3200/sshd      
tcp6       0      0 ::1:631                 :::*                    LISTEN      3465/cupsd    
tcp6       0      0 :::80                   :::*                    LISTEN      1490/apache2  
udp        0      0 0.0.0.0:51274           0.0.0.0:*                           844/avahi-daemon: r
udp     3392      0 0.0.0.0:47810           0.0.0.0:*                           1251/dnsmasq  
udp    49920      0 127.0.1.1:53            0.0.0.0:*                           1251/dnsmasq  
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1239/dhclient  
udp        0      0 0.0.0.0:631             0.0.0.0:*                           3466/cups-browsed
udp    35328      0 0.0.0.0:5353            0.0.0.0:*                           844/avahi-daemon: r
udp6       0      0 :::52145                :::*                                844/avahi-daemon: r
udp6   24704      0 :::5353                 :::*                                844/avahi-daemon: r
 
idk man. I'll just copy-paste what my friend wrote

HTTP TCP Port: 80
Tibia Both Port 7171
Tibia2 Both Port: 7172
webdav Both Port: 81

Code:
worldId = 0
    ip = "YOUR GLOBAL IP"
    bindOnlyGlobalAddress = false
    loginPort = 7171
    gamePort = 7172
    adminPort = 7171
    statusPort = 7171
    loginTries = 10
    retryTimeout = 5 * 1000
    loginTimeout = 60 * 1000
    maxPlayers = 300
    motd = "Welcome to zzzzzzzzzzzz"
    displayOnOrOffAtCharlist = false
    onePlayerOnlinePerAccount = false
    allowClones = false
    serverName = "zzzzzzzzzz"
    loginMessage = "zzzzzzzzz."
    statusTimeout = 5 * 60 * 1000
    replaceKickOnLogin = true
    forceSlowConnectionsToDisconnect = false
    loginOnlyWithLoginServer = false
    premiumPlayerSkipWaitList = false

Code:
sqlType = "mysql"
    sqlHost = "127.0.0.1"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = "zzzzzzzzzz"
    sqlDatabase = "zzzzzzzzzzz"
    sqlFile = "theforgottenserver.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 100
    mysqlWriteTimeout = 100
    encryptionType = "plain"
-- these ones below probably don't matter
Code:
-- Process
    daemonize = false
    defaultPriority = "high"
    niceLevel = 5
    serviceThreads = 1
    coresUsed = "-1"

Code:
-- Admin
    adminPort = 7171
    adminLogs = true
    adminPassword = ""
    adminLocalhostOnly = true
    adminConnectionsLimit = 1
    adminRequireLogin = true
    adminEncryption = ""
    adminEncryptionData = ""

Other players need to use your global IP to login
You need to use your local ip to login. 127.0.01

----
You also need to make sure you have 'xaamp' open, and the first two things active.
Or w/e the program is.
If both aren't active, then your ports will appear closed I think.
 
@Xikini
Thank you for your help!

Could your friend use this command in terminal? "netstat -tulpn" and copy output like this
Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:7171          0.0.0.0:*               LISTEN      4395/theforgottense
tcp        0      0 127.0.0.1:7172          0.0.0.0:*               LISTEN      4395/theforgottense
because what I would like to know are local adresses which are used for theforgottenserver process

i think fir3element repo uses some ip setter(?) and it automatically sets local ip adress as global (because i could connect to server [this one] on same host using other pc outside of host local network)
 
Last edited:
last *BUMP* and I'll let it go :C

@reminder
Other distro[this] is working corectly by this I mean I can login to account and play on any character using global ip
On my edited sources and "vanilla" fir3element sources I can't login to server using global ip
 
Last edited:
What's the output of sudo ufw status?
What happens if you change the port?
Also, I'm unfamiliar with "admin port". It has "adminlocalhostonly" set equal to true. What happens if you change that?
 
ufs disabled haven't tried to change ports but netstat shows some um... differences between otserv0.6.4 and tfs0.4

otserv
Code:
tcp        0      0 0.0.0.0:7171            0.0.0.0:*               LISTEN      11194/otserv
tcp        0      0 0.0.0.0:7172            0.0.0.0:*               LISTEN      11194/otserv
tfs
Code:
tcp        0      0 127.0.0.1:7171          0.0.0.0:*               LISTEN      4395/theforgottense
tcp        0      0 127.0.0.1:7172          0.0.0.0:*               LISTEN      4395/theforgottense
IP in those two config is set to my global address
i will try to change ports and that second config value

@edit
still nothing server is using 127.0.0.1 even if in config is my ip only on local ip it changes to that local adress
 
Last edited:
Back
Top