The online racing simulator
How to set up a dedicated host though a internet router?
(18 posts, started )
How to set up a dedicated host though a internet router?
I try to set up a dedicated host in my pc,which was connected to Internet via a net-router. I aleady set the router to re-map the port 63393 to my local ip address,but I just simply get the reply which said that:"SetupServerSocket:bind failed"

I started the host with command line like this:"lfs.exe /cfg=server.cfg"

and here is the content of the server.cfg
/host=server#2
/port=63393
/mode=s2
/usemaster=hidden
/track=south city
/config=5
/reversed=no
/cars=race
/weather=1
/maxguests=20
/carsmax=20
/carshost=1
/carsguest=1
/pps=3
/qual=0
/laps=5
/wind=1
/vote=yes
/select=no
/dedicated=nogfx
/autokick=spectate
/midrace=yes
/mustpit=no
/start=finish
/insim=19124

Did i do something wrong?
For a start your forwarded port is not the same as the one you say you have forwarded.

Not sure, but this address > www.portforward.com has information for pretty much all routers and apps/games and port forwarding instructions.
Also remember that if you are forwarding ports you MUST have a static IP address, many routers are setup by default to use DCHP which wont work.

Then again, maybe its not that, in which case someone else maybe can assist.

Dan.
#3 - vari
Check the cfg.txt for "Server IP". Add the IP of the network adapter you're using. It might help
The forwarded port seems to be different from the one you specified in the cfg file. Try making them the same

Usually a bind fails if the port is already in use, which could be caused by forwarding the wrong port, or having a firewall on your local machine as well.

Edit: Jinx guys! Make a wish
#5 - vari
Good point

A Wrong IP causes the bind error at least here though. It should work if you leave it empty too unless you got multiple network adapters in that machine.
I was under the impression that LFS automagically bound to ADDR_ANY if no IP was specifically given; in which case, it should bind to all adapters i.e. eth0, eth1 etc. I'd be happily proved wrong though
#7 - vari
That may also very well be but the thing I'm trying to say is that you won't get BindError by not forwarding the port in the router.
First of all,I would like to thank all guys who try to help me out. I really appreciate for that.

Sec..that was my fault for wrong-typing the forwarded port.Actually,I did it right in my router,and just type it wrong in here.

Third.I have tried every single way that you guys metion above,and was still replied by the same error message.

Finally,I use a virtual network software which will set me a static virtual local IP address,and put the IP into cfg file.Guess what?Wrong message was gone,and the host just got online.But sadly,this host only can access from ones who have installed the same virtual network software I think that was good,but not good enough.

So here is my new question,Does the host only get work under the static IP address?
Any reason why you have to use this "virtual network" software?, why can't you use do it the "normal" way?.

Dan.
#10 - vari
Quote from Sheepy1977 :
So here is my new question,Does the host only get work under the static IP address?

It doesn't matter if it's static or not but don't you need a static IP for the port forwarding anyway?

You don't need any virtual network software to set up a static IP btw.

Have you tried to make a non dedicated host? It shouldn't matter either but might be easier to experiment with.
Yes, a static IP address is neccasary for your router to be able to forward ports to your machine.

Dan.
Hi guys! I am back again with a good news and a bad news.

Good news is that a no-dedicated host which was set by me in "normal" way finnally get online,and ppl can connect to it via internet.

Bad news is that the dedicated server still cant get online.

I dont know why this happened..
Quote from Sheepy1977 :Hi guys! I am back again with a good news and a bad news.

Good news is that a no-dedicated host which was set by me in "normal" way finnally get online,and ppl can connect to it via internet.

Bad news is that the dedicated server still cant get online.

I dont know why this happened..

Alright... If you want me to have a look, post all the network settings on the dedicated server machine, and tell me exactly what kind of virtual network software you're running... Also include the configuration info from your router (make sure you delete any passwords from that, please).
I may not know much, but there hasn't been a network setup I've been unable to get to work (except my own at home, of course, but that's because I'm lazy).

PS: Maybe a good idea to change the IP addresses from what you use to something else too when you post them here... Never trust anybody on the internet.
Quote from danowat :Yes, a static IP address is neccasary for your router to be able to forward ports to your machine.

I wouldnt say it necessay, but more common sense. You can port forward to a dynamic IP, but its a pain i the arse as next time the machine's address is renewed it might be forwarding to the wrong machine.

Quote :Finally,I use a virtual network software which will set me a static virtual local IP address,and put the IP into cfg file.Guess what?Wrong message was gone,and the host just got online.But sadly,this host only can access from ones who have installed the same virtual network software I think that was good,but not good enough.

It sounds as if you're running a VPN server, which would explain why people can only connect when they're running the same software and connecting to your server. Without knowing exactly what it is, we cant really advise, but my opinion would be to not bother with the "virtual network software".
TagForce..Thx...

Here are the finnal result.......

I MADE IT !!!!!

The solution is quite simple.

USE LOCAL IP ADDRESS IN CFG FILE,NOT USE WAN IP.

Dedicated host get online and can be connected from internet. that is all.

At last ..I still want to say thanks to TagForce and the_angry_angel.Thanks a lot!!!
Quote from Sheepy1977 :USE LOCAL IP ADDRESS IN CFG FILE,NOT USE WAN IP.
Dedicated host get online and can be connected from internet. that is all.

Uhmmm... Yeah... Your PC doesn't know the WAN IP, so it won't be able to bind a port to it.

Thanks for thanks, but I didn't do anything. Good job on figuring it out yourself though... See you on the track, m8
#17 - vari
I said it in third post heh Maybe that wasn't clear enough though.
Does it mean that i have to disable DHCP on my network to get it work???
No one can see the dedicated server i put up. Even when i disable the firewall.

How to set up a dedicated host though a internet router?
(18 posts, started )
FGED GREDG RDFGDR GSFDG