First required
- Having a working dedicated (ie other players can connect).
- Havig setup different ports for the dedicated and the game (for example, keep 2350 and 3450 for the game, and set 2352 and 3452 for the dedicated)

What's the problem ?
Using some nat-router modems, ports redirections don't work for connections from local network, or at least when the connexion come from the computer there are redirected to. If you have a router which refuse such redirection, you just can't connect to your TM dedicated server in internet mode (so, no ladder ).

Solution
Thanks to Mistral for the idea, and you can find some additional info here too.

You will have to add the public IP of your internet connection to the network adapter of the computer on which you start the dedicated. If the game and the dedicated are not on the same computer, you will have something else to do, see below.

In the example, the public IP is 82.125.58.101, and the local IP of the server is 192.168.1.210. Of course you will have to replace them by yours IPs ! To find your public IP, you can for example go there.

Note: because of pending connections of your(s) computer(s) and router, it can take some minutes to work after a correct configuration ! (you can try to reboot computer(s) and router too)

Server on Windows
If your adapter IP is in automatic (DHCP) mode, you have to reconfigure it static. Open a command line interface and use 'ipconfig /all', you will get the infos about actual connection, and use it to configure static values, just change the IP address 4th number (you have to set an address unused on your network, in the example, i set 210)

Sorry, the screenshots were made on a french Windows , anyway you should be able to recognise the panels

When the public address will be added to your adapter, then if the game and the computer are on the same computer, it should work

Of course, if you don't have a fixed public address, you will have to change the config each time your public IP change...

Server on Linux
For a Debian or Ubuntu, edit the file /etc/network/interfaces and add an alias to your network adapter. You will add something looking like that :

then use the command ''ifup eth0:0' (or restart the computer)
(you have to be root to edit the file and use ifup, on ubuntu, use 'sudo ')

For other linux, look for ip config and aliases in the documentation.

If the game is on another computer
After the upper changes on the server, you will have 2 possibilities to make a working change on the client :
- add a second IP to the client too, in the same LAN IP than the one you added for the server (with previous example, i could have used 82.125.58.102). Same method than before to add the IP.

or

- tell to the compute how to reach the server, giving him a static route. To do that, open a command line interface and use (with your own IP, not the example ones) :
route add 82.125.58.152 192.168.1.210
What it means is: to join 82.125.58.152, send to 192.168.1.210. So the server will receive it, and because 82.125.58.152 is also his IP, he will be happy and be able to reply

If you have a fixed IP and want to make this static route permanent (and so don't use the command each time you restart your computer), add a -p : route -p add .....

It should work, else re-read all, you probably missed something (hey, you did not used the IP of the example i hope ? ^^)

Some other way to do things (written here by Mistral long time before this tutorial)

Mistral wrote:For windows if server+client are on the same machine and your router denies connections from inside (LAN) to outside (WAN) address:
- find out your WAN-IP (ip address of your router) f.e.: http://www.meineipadresse.de/ip.php
- find out the name of your IP interface: Start -> Run... -> ipconfig.exe (you need a static configuration, its not possible to add interfaces with DHCP enabled)

This will ADD the WAN address of your router to your local interface. This means when ever you try to connect to the OUTSIDE address of your router (you normaly dont do this - but you have to for trackmania, because thats the address of your server stored in the masterserver's database) the request will goto the local interface.

You can also ADD the address using the TCP/IP settings window, but i am not going to make screenshots and explain where you have to click

When you are done or your DSL router gets a new address, you should delete the entry and redo above with new address.

This will ADD the WAN address of your router to your local interface. This means when ever you try to connect to the OUTSIDE address of your router (you normaly dont do this - but you have to for trackmania, because thats the address of your server stored in the masterserver's database) the request will goto the local interface.

Then i did that command line write my WANIP a table wiht adress conflict shows up;// Why? My static ip is 10.0.x.x and WANIP 84.32.x.x.

totemx wrote:nothing... i've done everything but my pc said that there is a IP conflict... and i can't join ladder... anyone?

You are not the first i see having an IP conflit. It's really strange, there is no logical reason.

Are you sure you configured correctly your main ip statically (and verified that your connection still work ok), then add on your computer network interface a secondary ip (the public ip of your router).

If it was done correctly, an IP conflit would mean that your router have also its public ip on its lan interface, which is really really strange.