[TUTORIAL]Connecting to his own dedicated...in internet mode

Answers to the most commonly asked questions with both user created and official tutorials

Moderator: TM-Patrol

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

[TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Slig » 05 Aug 2007 23:51

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 ;)

Image

Image

Image

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 :D

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 :

Code: Select all

auto eth0:0
iface eth0:0 inet static
        address 82.125.58.101
        netmask 255.255.255.0
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 :D

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 .....

Image

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)

Code: Select all

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 10.10.1.247
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :
Here it is "Local Area Connection"

- open a command line as administrator: Start -> Run... -> cmd.exe
- type

Code: Select all

netsh interface ip add address <NAMEOFINTERFACE> <WANIP> 255.255.255.0
Example:

Code: Select all

netsh interface ip add address "Local Area Connection" 1.2.3.4 255.255.255.0
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.

Code: Select all

netsh interface ip delete address <NAMEOFINTERFACE> <OLDWANIP>

Ezlock
highway camper
highway camper
Posts: 3
Joined: 29 Dec 2007 13:38
Owned TM-games: TMU

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Ezlock » 29 Dec 2007 13:47

Mistral wrote:

Code: Select all

netsh interface ip add address <NAMEOFINTERFACE> <WANIP> 255.255.255.0
Example:

Code: Select all

netsh interface ip add address "Local Area Connection" 1.2.3.4 255.255.255.0
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.

User avatar
Mistral
Pit Crew
Pit Crew
Posts: 1304
Joined: 02 May 2006 15:13
Owned TM-games: tmuf
Contact:

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Mistral » 29 Dec 2007 16:59

Even your doublepost wont help us to find your mistake.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Slig » 29 Dec 2007 17:57

Ezlock wrote: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.
Did you try a 'ipconfig /all' to verify your actual config ? are you sure your actual interface ip is static (ie not in automatic dhcp mode) ?

Ezlock
highway camper
highway camper
Posts: 3
Joined: 29 Dec 2007 13:38
Owned TM-games: TMU

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Ezlock » 02 Jan 2008 10:25

Yes i try ipconfig by tutorial, my ip is internal and DHCP is disabled;/ So what to do now? :?

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Slig » 03 Jan 2008 00:13

Ezlock wrote:Yes i try ipconfig by tutorial, my ip is internal and DHCP is disabled;/ So what to do now? :?
Don't know, it should not happen if you are sure that not other computer in your LAN has that ip, and that no other interface of your computer has that ip.

Perhaps that strangely some modem-router set their public ip on their LAN interface ? if really it's the case then i see no solution.

panzerboy
highway camper
highway camper
Posts: 3
Joined: 08 Jan 2008 16:16
Owned TM-games: trackmania nations

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by panzerboy » 12 Jan 2008 18:09

All that dosent work whit a internet card/infared net so can you help me where it's whit a card and not cable on an english pc please :D

panzerboy
highway camper
highway camper
Posts: 3
Joined: 08 Jan 2008 16:16
Owned TM-games: trackmania nations

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by panzerboy » 12 Jan 2008 18:10

ohh and my net goes over my moms 100 mbit those it has anything to say Sry for bad english

totemx
wheelbarrow operator
wheelbarrow operator
Posts: 18
Joined: 04 Feb 2008 00:04
Owned TM-games: Trackmania United

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by totemx » 04 Feb 2008 12:57

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

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Slig » 04 Feb 2008 13:26

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.

What is your router, what is your computer OS ?

totemx
wheelbarrow operator
wheelbarrow operator
Posts: 18
Joined: 04 Feb 2008 00:04
Owned TM-games: Trackmania United

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by totemx » 04 Feb 2008 13:39

Image
it seems not to recognize my web ip... but in tcp/ip config it goes right. Iv'e got a Zygel, windows xp sp2 and pc is a dualcore 6750, nvidia 8800gts etc...

User avatar
Mistral
Pit Crew
Pit Crew
Posts: 1304
Joined: 02 May 2006 15:13
Owned TM-games: tmuf
Contact:

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Mistral » 21 Jun 2008 22:56

*push* - gosh why this isnt sticky?

Katana
sunday driver
sunday driver
Posts: 50
Joined: 06 Jun 2008 11:03
Owned TM-games: TMN-F

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Katana » 22 Jun 2008 10:39

Nice guide, but i presume this is for routers without NAT?

All i did for hosting here ( on a gigabit network, nothing different except for the speeds )
PC A= Server
PC B = Gaming rig

Tell the router to forward ports 2350 and 3450 to IP of PC A ( all DHCP static IP's )
Started server and ignored warning.
Told my mates to connect, and it worked.

Then i sat behind my gaming rig and joined through both LAN connection and through the gamebrowser itself..
No need for putting your WAN IP in your nic's.

If you dont have a NAT enabled router then just join through LAN, because the server is broadcasting both WAN and LAN. No problems if you join LAN side and others WAN side.
DB 100 Pax
Netherlands - Zuid Holland
100 player server. Only custom maps made by Dutch Bulldogs.

User avatar
Mistral
Pit Crew
Pit Crew
Posts: 1304
Joined: 02 May 2006 15:13
Owned TM-games: tmuf
Contact:

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by Mistral » 22 Jun 2008 16:13

Did u read the first post? "Whats the problem" - "Using some nat-router modems" ...

If your router supports NAT-Loopback (thats the features name) be happy ;)

UKFC»ACE
smooth traffic navigator
smooth traffic navigator
Posts: 203
Joined: 08 Jun 2007 19:50
Owned TM-games: TMUF, TMNF
Location: Dublin, IRELAND

Re: [TUTORIAL]Connecting to his own dedicated...in internet mode

Post by UKFC»ACE » 22 Jun 2008 20:37

Katana wrote:No problems if you join LAN side and others WAN side.
You can't score ladder points through LAN.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest