Jump to content

[Tutorial] Dedicated Server via LAN - IPv6/v4 routing issue (friend cant join)


dot

Recommended Posts

Tutorial (Windows) - Dedicated Server via virtual LAN

This is a small tutorial for windows users on hosting a dedicated server on your network or the pc you are playing on and have friends join via LAN (even tho it is over internet 😉 ) .

Problem: Friend cannot connect to my server, but I can connect to his! He only has IPv4!

This little tutorial also adresses a growing problem: some users will only get IPv6 and a general IPv4 adress from their ISP making it impossible for friends with only IPv4 from their ISP to join to any IPv6 server. You can check if you or your friends only have IPv4 or also have IPv6 adresses by checking here: https://www.whatismyip.com/

This Tutorial will help you be able to host if you have IPv6 and IPv4, but your friend only has IPv4!

Preface:

We will be using an open source tool called ZeroTier (think: "like hamachi"). Please read ZeroTier's description carefully and decide for yourself if this is an option for you.
If ZeroTier is an option for you, you will have to make an account with them - basic is free - in order to use their network and to setup a virtual lan. 
I will take you thru the process of setting up your connection!

Important: your friends will also have to register with ZeroTier, but only need to join your already setup network, so joining players only do number: 1, 2 and 3.

Let's begin: (FOR ALL PLAYERS)

Important: Make sure you have Port 9993 (UDP) open! For more Information,
see:
https://zerotier.atlassian.net/wiki/spaces/SD/pages/6815768/Router+Configuration+Tips

1.) Download Installer:

Download installer from ZeroTier.com, install and run it (no reboot required):  https://www.zerotier.com/download/
If the program was started correctly you should see a little orange/yellow/brown icon on your taskbar in the notification area (usually where your time and date is shown, also speaker, network etc).

2.) Register, Confirm eMail, get API Token:

Follow these steps (also from their webpage, step 1 to 3:
https://www.zerotier.com/download/ )

Register with them, get a
16-digit network ID.
After registering with them and confirming your eMail you will see your 16-digit network ID.

Otherwise:
1.) login
to your account at https://my.zerotier.com/
2.) scroll down to
API Access Tokens
3.) click the green button saying: generate new token

Now, if you see your 16-digit network ID, right click on the icon in your notification area and select ->  Preferences...
Copy the 16-digit network ID into the API field and click OK.
Good job!

Hint: After login: Authentication is where you confirm you eMail.

Example, should look like:
Central Instance: https://my.zerotier.com
API:
T3Po4i4Ry7Tvb5jH86vlcocAwt24Pyk3

3.) (FOR ANY PLAYER WHO WANTS TO JOIN, NOT HOST!):

3.1)
On your taskbar, right click on the icon of ZeroTier, select: Join Network...
Check "Allow Managed" (default on), enter network ID (that the hosting player will have to give you!), click join

Important: Make sure you have Port
9993 (UDP) open! For more Information,
see:
https://zerotier.atlassian.net/wiki/spaces/SD/pages/6815768/Router+Configuration+Tips

FROM HERE ON -- ONLY HOSTING PLAYER:

4.) Setup Network:


4.1) Create Network:

On your taskbar, right click on the icon of ZeroTier, select: Create and Join Network
Check if network was created: On your taskbar, right click on the icon of ZeroTier, select: Show Networks...

You should see something similar to this:

example1.png.0fb7e1e8d9502999adbbd5f69c971bbd.png

See: something like "c7c8172af16f90e2" (upper left corner) is the network ID you will have to give to your friends who want to join your network and your Vintage Story LAN server!
Hint: You can also see this network when just right clicking on the icon of ZeroTier in your notification area, with the name of the network in ().

4.2) Login and configure Network:

- Login to https://my.zerotier.com/
-- click on: Network  s,  you will see your created network from Step 4.1).
-- click on: <<you network's name>>
(or go here: https://my.zerotier.com/network/<<YouNetworkID>>
)
Side stepping:
--- Yes, you can change the name and add a description if you wish.
--- You can choose if your network is private or public. If you want to go private, you will have to add each node (here: person that can connect to your network, so other players) by getting your friends ID and add his ID in this window (scroll donw to:
Manually Add Member).

!! Scroll to: Advanced
Set: 
IPv4 Auto-Assign as shown below:
Click: Advanced
enter into (Range Start): 192.168.0.169    
enter into (Range End): 192.168.193.1

Click: Submit

!!!! Important: If you want to host on a different PC in your LAN network, of course you do all steps 1-4 (not 3) for that hosting PC in your network. And your "play PC" will only do steps 1-3 ! Yes, this would mean you have to register twice, each device, because of API Token!
Range End can be different, least tho 192.168.0.171 should suffice!

Example:

advanced1.thumb.png.194d7f64b2f2bec232528fd9e00f372c.png

5) Give you friends your (virtual) LAN IP: (same window as Step 4)

- Login to https://my.zerotier.com/
-- click on: Network  s,  you will see your created network from Step 4.1).
-- click on: <<you network's name>>
--- Scroll down to: MEMBERS
---- Find your ID, there will be a 192.168.xxx.xxx LAN IP adress. Give this -edit- OR the IPv6 adress - to your friends. All friends on this network can connect to your server via this IP! See picture below!

Hint: Usually you should only see yourself, unless you already had friends join the network. Put MEEEE into the (short name) Box:


5-LAN_IP.thumb.png.76b280e577974ab96842aee342f964dc.png


6) Have your friends join your network:

Give your Network ID to your friends and have them join the ZeroTier network (see Step 3).

7) Host Your Server:
 - like explained on VS Wiki
e.g. by creating a world in single player,
than exit game,
go to main directory, click on:
VintagestoryServer.exe,
start your normal game,
go to Multiplayer,
add new server //
Host player must enter: 192.168.0.170 (if server is on same pc as playing) OR the IPv6 (fcxx:xxx:xx:::::) is also ok
otherwise use IP like friends! Friends must enter LAN IP above (step 5)


Check out VS Wiki Server Commands

HAVE FUN PLAYING!

 

Edited by dot
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.