1 (edited by Donald Duck 2011-08-30 20:31:13)

Topic: [HELP]Linux server

any one can help me


****@****-desktop:~$ sudo -s
[sudo] password for ****: 
root@****-desktop:~# cd '/home/****/teeworlds'
root@****-desktop:~/teeworlds# ./teeworlds_srv -f config.cfg
[4e5bc15d][engine]: running on unix-linux-amd64
[4e5bc15d][engine]: arch is little endian
[4e5bc15d][storage]: added path '$USERDIR' ('/home/****/.teeworlds')
[4e5bc15d][storage]: added path '$DATADIR' ('data')
[4e5bc15d][storage]: added path '$CURRENTDIR' ('/home/****/teeworlds')
[4e5bc15d][console]: failed to open 'autoexec.cfg'
[4e5bc15d][console]: executing 'config.cfg'
[4e5bc15d][server]: starting...
[4e5bc15d][datafile]: loading. filename='maps/dm1.map'
[4e5bc15d][datafile]: allocsize=2684
[4e5bc15d][datafile]: readsize=2396
[4e5bc15d][datafile]: swaplen=2416
[4e5bc15d][datafile]: item_size=2012
[4e5bc15d][datafile]: loading done. datafile='maps/dm1.map'
[4e5bc15d][server]: maps/dm1.map crc is f2159e6e
[4e5bc15d][server]: server name is 'unnamed server'
[4e5bc15d][datafile]: loading data index=17 size=325 uncompressed=12000
[4e5bc15d][server]: version 0.6 626fce9a778df4d4
[4e5bc15d][engine/mastersrv]: refreshing master server addresses
[4e5bc15d][register]: refreshing ip addresses
[4e5bc15f][engine/mastersrv]: saving addresses
[4e5bc15f][register]: fetching server counts
[4e5bc162][register]: chose 'master3.teeworlds.com' as master, sending heartbeats
[4e5bc195][register]: ERROR: the master server reports that clients can not connect to this server.
[4e5bc195][register]: ERROR: configure your firewall/nat to let through udp on port 8303.

what did I do wrong???

Added code tag for better readability //heinrich5991

2

Re: [HELP]Linux server

You didn't forward a port for the server to use...

ERROR: configure your firewall/nat to let through udp on port 8303.

Once in a century...

3

Re: [HELP]Linux server

Donald Duck wrote:

root@****-desktop:~/teeworlds# ./teeworlds_srv -f config.cfg

Never run progams as root unless they explicitly require it (e.g. system configuration tools)

4

Re: [HELP]Linux server

heinrich5991 wrote:
Donald Duck wrote:

root@****-desktop:~/teeworlds# ./teeworlds_srv -f config.cfg

Never run progams as root unless they explicitly require it (e.g. system configuration tools)

He wasn't even logged in as root, but of course he had to use sudo. big_smile

5 (edited by Donald Duck 2011-08-31 15:34:28)

Re: [HELP]Linux server

i have see sudo -s in the forum

6

Re: [HELP]Linux server

Don't use it; it' potentially unsafe.

7

Re: [HELP]Linux server

so what must i do for a Linux server and how can i public it?

8

Re: [HELP]Linux server

Donald Duck wrote:

so what must i do for a Linux server and how can i public it?

You have to forward the choosen port. Do you host your server from home or do you have a vserver/root?

9

Re: [HELP]Linux server

GBKing wrote:

He wasn't even logged in as root, but of course he had to use sudo. big_smile

There is NO need for sudo to run teeworlds. You can (and should) even compile TW as normal user.

10

Re: [HELP]Linux server

If it's a public server and you don't have a clue how to configure your firewall right, this might give you some basic setup:

apt-get install arno-iptables-firewall  

If you get asked which ports should be allowed enter at least 8303 for UDP and TCP (8303 is standard TW port). If you connect to your server remote even don't forget the port that is necessary for that (for example port 22 if you use SSH) - otherwise you would lock out yourself big_smile.


If your server is not public but is just at home I'd recommend to forget it. Yes it's even possible if you forward the necessary ports. But if all got lag if for example your little brother likes to look some youtube stuff and cut down your bandwidth without mercy or if all drop out if you go to bed then this sucks.


Greetings,
Mo(2)

11 (edited by Donald Duck 2011-09-01 18:56:19)

Re: [HELP]Linux server

Donald Duck wrote:
so what must i do for a Linux server and how can i public it?
Niki49:
You have to forward the choosen port. Do you host your server from home or do you have a vserver/root?

i host the server from home, so the server is runing

i have use:


****@nico-desktop:~$ cd teeworlds
****@nico-desktop:~/teeworlds$ ./teeworlds_srv -f config.cfg

12 (edited by Mo2 2011-09-01 20:04:01)

Re: [HELP]Linux server

Donald Duck wrote:

i host the server from home, so the server is runing

So your question have less to do with a linux-server itself but more how to portforward (there's no difference to windows-servers here). And regarding portforwarding: This depends on your router. If you don't have a clue what to do there I would recommend to not host a server. I'm still no friend of home-servers anyway. It's necessary to cut in at least one hole into your private lan freedom. And you already wrote that you are doing something via root... Why not just play? Or create some nice maps and try to get it hosted at some already existing dedicated servers?

13

Re: [HELP]Linux server

yes ok to build maps is better ;D

14

Re: [HELP]Linux server

I wrote a little tutorial on port forwarding...

Many people get errors saying they have to configure their firewalls or NAT systems properly when they try to run a Teeworlds server. As a result of that, their server won't show up in the server list and (almost) no one will be able to connect to it. It's quite easy to get rid of this problem, if you know what's wrong. This tutorial is meant to teach you what a NAT is, how it works and, at the end, fix your problem.

Your router
A lot of people in Europe connect to the internet either via optic fibre or DSL. Especially the latter one, DSL, tends to require a router, otherwise you'll be limited to one computer per household. Each household/home usually gets one public IP address. It can be in the form of 171.25.159.10 or 91.90.27.84. You have probably seen an IP address before. Because each computer needs an unique IP address, but you only get one IP per household, it needs to be divided up into many IP addresses. This is where NAT comes in. NAT stands for Network Address Translation and its primary function is to allow several devices to connect to the internet from a single public IP.

It's done by using so-called “internal IP addresses”. They usually begin with 192.168 or 10, and they cannot be reached from outside your household. An example of a valid, internal, IP address is 192.168.1.3. You can see your own internal IP address by opening a command prompt and typing “ipconfig”. It'll look something like this:
http://171.25.159.71/archive/pictures/ipconfig.png
On the picture above you'll see that my internal IP address is 10.97.64.67.


How does this work?
http://171.25.159.71/archive/pictures/routernat-diagram.png
When you connect your computer either via a cable or via a wireless network, it will connect your computer to your router. A router is a small device with one or several antennas on the top. It's the link between your home and the internet. The router is the only device in your house that “holds” or uses the public IP. When you connect, the router will give you one of its internal IP addresses. It's either in the form of 192.168.x.x or 10.x.x.x. See the picture above for a graphical example.

Port forwarding
Each computer has around 65 000 ports. Each port can be used by one application. For instance, Teeworlds uses ports 8303 for servers and 8300 for master servers. Web servers (HTTP) use 80 and 443 and ICQ uses 5190. As stated previously, you cannot reach computers with internal IP addresses from the public internet. In order to allow access, you need to setup “port forwarding” in your router. Because the actual router doesn't run any Teeworlds server, it won't know what to do. Imagine if the router got a message on port 8303 (the Teeworlds port) saying “connect me to the Teeworlds server”. Because there are more than one computer connected to your router from inside your household, it can't possibly know where to send this connection request. So it'll just ignore it.

By setting up port forwarding rules, your router will know where to send the message, within the local network. In that way, you can have one Teeworlds server running from your laptop, on port 8303, and another one from your desktop computer on port 8304. Because of the nature of the system, you cannot run two servers on the same port on different computers (or even the same computer).

The actual port forwarding differentiates depending on your router model. A good site which describes how port forwarding works is www.portforward.com. Select your router model (or a similar one if you can't find the one you have) in the list and the follow the “Default guide” and make sure to forward port 8303/UDP. It may be a bit tricky, but give it a try.

15

Re: [HELP]Linux server

Really nice article.

16

Re: [HELP]Linux server

Thank you, this was needed!

Not Luck, Just Magic.