Friends can't connect to my L2j [H5] server

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Kruel
Posts: 5
Joined: Mon Apr 13, 2015 1:56 pm

Friends can't connect to my L2j [H5] server

Post by Kruel »

Hello all, im trying to run my test L2j server [H5] for other players. It's my first time so im probably missing somthing. Pleas help :(

OS: Win 7
IP: 78.11.xxx.xxx
IPv4: 192.168.x.xxx
Open ports: 2106, 3304, 7777, 9014 (windows firewall and router aswell)

Login Server Properties

Code: Select all

# ---------------------------------------------------------------------------
# Login Server Settings
# ---------------------------------------------------------------------------
# This is the server configuration file. Here you can set up the connection information for your server.
# This was written with the assumption that you are behind a router.
# Dumbed Down Definitions...
# LAN (LOCAL area network) - typically consists of computers connected to the same router as you.
# WAN (WIDE area network) - typically consists of computers OUTSIDE of your router (ie. the internet).
# x.x.x.x - Format of an IP address. Do not include the x'es into settings. Must be real numbers.
# ---------------------------------------------------------------------------
# Networking
# ---------------------------------------------------------------------------

# Enables automatic port mapping for login server.
# If you have a router login server will request for port forwarding.
# Default: True
EnableUPnP = True

# Bind ip of the LoginServer, use * to bind on all available IPs
# WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u>
# WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u>
# Default: * (0.0.0.0) my ip = 78.11.172.118
LoginserverHostname = *

# Default: 2106
LoginserverPort = 2106

# The address on which login will listen for GameServers, use * to bind on all available IPs
# WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u>
# WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u>
# Default: 127.0.0.1
LoginHostname = 127.0.0.1

# The port on which login will listen for GameServers
# Default: 9014
LoginPort = 9014

# ---------------------------------------------------------------------------
# Security
# ---------------------------------------------------------------------------

# How many times you can provide an invalid account/pass before the IP gets banned.
# Default: 5
LoginTryBeforeBan = 5

# Time you won't be able to login back again after LoginTryBeforeBan tries to login.
# Default: 900 (15 minutes)
LoginBlockAfterBan = 900

# If set to True any GameServer can register on your login's free slots
# Default: True
AcceptNewGameServer = True

# Flood Protection. All values are in MILISECONDS.
# Default: True
EnableFloodProtection = True

# Default: 15
FastConnectionLimit = 15

# Default: 700
NormalConnectionTime = 700

# Default: 350
FastConnectionTime = 350

# Default: 50
MaxConnectionPerIP = 50

# ---------------------------------------------------------------------------
# Database
# ---------------------------------------------------------------------------

# Specify the appropriate driver and url for the database you're using.
# Examples:
# Driver = com.mysql.jdbc.Driver (default)
# Driver = org.hsqldb.jdbcDriver
# Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver = com.mysql.jdbc.Driver
# Database URL
# URL = jdbc:mysql://localhost/l2jls (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jls
# URL = jdbc:sqlserver://localhost/database = l2jls/user = sa/password = 
URL = jdbc:mysql://localhost/l2jdb
# Database user info (default is "root" but it's not recommended)
Login = root
# Database connection password
Password = 

# Default: 10
MaximumDbConnections = 10

# Default: 0
MaximumDbIdleTime = 0

# Connection close time.
# Default: 60000
ConnectionCloseTime = 60000


# ---------------------------------------------------------------------------
# Misc.
# ---------------------------------------------------------------------------

# If False, the license (after the login) will not be shown.
# Default: True
ShowLicence = True

# Default: True
AutoCreateAccounts = True

# Datapack root directory.
# Defaults to current directory from which the server is started.
DatapackRoot = .

# ---------------------------------------------------------------------------
# Developer Settings
# ---------------------------------------------------------------------------

# Default: False
Debug = False

# ---------------------------------------------------------------------------
# Restart LS every 24 hours?
# ---------------------------------------------------------------------------

# Enable disable scheduled login restart.
# Default: False
LoginRestartSchedule = False
# Time in hours.
# Default: 24
LoginRestartTime = 24
Server Properties

Code: Select all

# ---------------------------------------------------------------------------
# Game Server Settings
# ---------------------------------------------------------------------------
# This is the server configuration file. Here you can set up the connection information for your server.
# This was written with the assumption that you are behind a router.
# Dumbed Down Definitions...
# LAN (LOCAL area network) - typically consists of computers connected to the same router as you.
# WAN (WIDE area network) - typically consists of computers OUTSIDE of your router (ie. the internet).
# x.x.x.x - Format of an IP address. Do not include the x'es into settings. Must be real numbers.

# ---------------------------------------------------------------------------
# Networking
# ---------------------------------------------------------------------------

# Enables automatic port mapping for game server.
# If you have a router game server will request for port forwarding.
# Default: True
EnableUPnP = True

# Where's the Login server this gameserver should connect to
# WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u>
# WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u>
# Default: 127.0.0.1
LoginHost = 127.0.0.1

# TCP port the login server listen to for gameserver connection requests
# Default: 9014
LoginPort = 9014

# Bind address for gameserver. You should not need to change it in most cases.
# WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u>
# WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u>
# Default: * (0.0.0.0)
GameserverHostname = *

# Default: 7777
GameserverPort = 7777


# ---------------------------------------------------------------------------
# Database
# ---------------------------------------------------------------------------

# Specify the appropriate driver and url for the database you're using.
# Examples:
# Driver = com.mysql.jdbc.Driver (default)
# Driver = org.hsqldb.jdbcDriver
# Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver = com.mysql.jdbc.Driver
# Database URL
# URL = jdbc:mysql://localhost/l2jgs (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jgs
# URL = jdbc:sqlserver://localhost/database = l2jgs/user = sa/password = 
URL = jdbc:mysql://localhost/l2jdb
# Database user info (default is "root" but it's not recommended)
Login = root
# Database connection password
Password = 

# Default: 100
MaximumDbConnections = 100

# Default: 0
MaximumDbIdleTime = 0

# ---------------------------------------------------------------------------
# Misc Server Settings
# ---------------------------------------------------------------------------

# This is the server ID that the Game Server will request.
# Example: 1 = Bartz
# Default: 1
RequestServerID = 1

# True = The Login Server will give an other ID to the server if the requested ID is already reserved.
# Default: True
AcceptAlternateID = True

# Datapack root directory.
# Defaults to current directory from which the server is started unless the below line is uncommented.
# WARNING: <u><b><font color="red">If the specified path is invalid, it will lead to multiple errors!</font></b></u>
#Default: .
DatapackRoot = .

# Define how many players are allowed to play simultaneously on your server.
# Default: 100
MaximumOnlineUsers = 100

# Numbers of protocol revisions that server allows to connect.
# Delimiter is ;
# WARNING: <u><b><font color="red">Changing the protocol revision may result in incompatible communication and many errors in game!</font></b></u>
# Default: 267;268;271;273
AllowedProtocolRevisions = 267;268;271;273


# ---------------------------------------------------------------------------
# Misc Player Settings
# ---------------------------------------------------------------------------

# Character name template.
# Examples:
# CnameTemplate = [A-Z][a-z]{3,3}[A-Za-z0-9]*
# The above setting will allow names with first capital letter, next three small letters,
# and any letter (case insensitive) or number, like OmfgWTF1
# CnameTemplate = [A-Z][a-z]*
# The above setting will allow names only of letters with first one capital, like Omfgwtf
# Default .* (allows any symbol)
CnameTemplate = .*

# This setting restricts names players can give to their pets.
# See CnameTemplate for details
PetNameTemplate = .*

# This setting restricts clan/subpledge names players can set.
# See CnameTemplate for details
ClanNameTemplate = .*

# Maximum number of characters per account.
# Default: 7 (client limit)
CharMaxNumber = 7
IPconfig

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- Note: If file is named "ipconfig.xml" this data will be used as network configuration, otherwise server will configure it automatically! -->
<!-- Externalhost here (Internet IP) or Localhost IP for local test -->
<gameserver address="78.11.xxx.xxx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../data/xsd/ipconfig.xsd">
	<!-- Localhost here -->
	<define subnet="127.0.0.0/8" address="127.0.0.1" />
	<!-- Internalhosts here (LANs IPs) -->
	<define subnet="10.0.0.0/8" address="10.0.0.0" />
	<define subnet="172.16.0.0/19" address="172.16.0.0" />
	<define subnet="192.168.0.0/16" address="192.168.x.xxx" />
</gameserver>
Host file (for me and players)

Code: Select all

 127.0.0.1  L2authd.lineage2.com
 78.11.xxx.xxx L2authd.lineage2.com

I will be grateful for any help

Corrected my IPv4 adress, but it still ain't working :( (Actually i don't know why i post it wrong, had to be really tired lol)
Last edited by Kruel on Sun May 24, 2015 9:59 pm, edited 3 times in total.
User avatar
godfreyouwens
Posts: 21
Joined: Wed May 11, 2011 10:49 pm
Location: CheeseLand USA !

Re: Friends can't connect to my L2j [H5] server

Post by godfreyouwens »

1st .. I dont think they like discussing client modding here ( which I believe adding your IP to the L2.ini is ) but your ipconfig.xml is wrong...

where you have this: <define subnet="192.168.0.0/16" address="78.11.172.118" />

it should say this: <define subnet="192.168.0.0/16" address="lan IP of L2 server" />
Kruel
Posts: 5
Joined: Mon Apr 13, 2015 1:56 pm

Re: Friends can't connect to my L2j [H5] server

Post by Kruel »

UPDATE

So i don't need to edit l2.ini? Its all about the host file?
User avatar
Faelucc
Posts: 27
Joined: Sun Nov 28, 2010 8:22 pm

Re: Friends can't connect to my L2j [H5] server

Post by Faelucc »

Hi,
UPDATE

So i don't need to edit l2.ini? Its all about the host file?
Yep (and your friends too).

Also, you shouldn't give your WAN IP :p (You can give your local IP address "192.168.1.136", but not the other one).

And, just a recommendation : if the login server, the game server and the database run on the same machine, you don't need to "open" ports 9014 and 3304 on your computer and your router, you only need 7777 and 2106.
Kruel
Posts: 5
Joined: Mon Apr 13, 2015 1:56 pm

Re: Friends can't connect to my L2j [H5] server

Post by Kruel »

Closing 2 ports. Any hint how those "hosts" files should look like? I'm using the same on my and players PC.
User avatar
Faelucc
Posts: 27
Joined: Sun Nov 28, 2010 8:22 pm

Re: Friends can't connect to my L2j [H5] server

Post by Faelucc »

You should have a line in your host file that looks like this :

Code: Select all

x.x.x.x	l2authd.lineage2.com
To connect with a client running on the same machine than the server, replace x.x.x.x by 127.0.0.1
To connect with a client running on a different machine but on the same network, replace x.x.x.x by your local IP (for you, it seems to be 192.168.1.136).
To connect with a client running on a different network (for example : your friends), replace x.x.x.x by your WAN IP (78.x.x.x).

Once you (or your friends) have saved the file, open it again to check if it worked. If the line doesn't appear, you need to open notepad (or any program to edit the file) with administratives rights (right click > Execute as an administrator), then open the file and add the line.

Also, check the name of the hosts file : it shouldn't have any extention as ".txt".
User avatar
volix
Posts: 106
Joined: Tue May 17, 2011 5:20 pm

Re: Friends can't connect to my L2j [H5] server

Post by volix »

Hello Rat* ;)
  • Public IP
  • Game Server Settings
    LoginHost = 127.0.0.1
    LoginPort = 9014
    GameserverHostname = *
    GameserverPort = 7777
  • Login Server Settings
    LoginserverHostname = *
    LoginserverPort = 2106
    LoginHostname = 127.0.0.1
    LoginPort = 9014
  • ipconfig.xml
    important: <gameserver address="78.11.172.118" ... (public ip)
    optional: <define subnet="78.11.172.0/24" address="78.11.172.118" /> (because: see above - localhost conf)
Open ports: 7777, 2106. (and probably need to setup port-forwarding in local network [router<->win pc])
Check: http://www.yougetsignal.com/tools/open-ports/
Now port 7777 and 2106 is closed on 78.11.172.118.

+ for players create one of: L2.ini or hostfile or L2.exe or L2.bat file (e.g. : start L2.bin IP=ipaddress)

*iYKwIM ;)
Kruel
Posts: 5
Joined: Mon Apr 13, 2015 1:56 pm

Re: Friends can't connect to my L2j [H5] server

Post by Kruel »

Okay, so let's make it more simple...

I wanna open server by the "host file" way...all i need is host file with this line :

Code: Select all

127.0.0.1 l2authd.lineage2.com 

bc im running client and server on the same PC

and my friends host file only need this line:

Code: Select all

(my WAN IP) l2authd.lineage2.co

7777, 2106 : Ports are forwarded on router setings, made na excptions in windows firewall-defense, shot down my anti-vir... not sure what more i can do about them.
User avatar
godfreyouwens
Posts: 21
Joined: Wed May 11, 2011 10:49 pm
Location: CheeseLand USA !

Re: Friends can't connect to my L2j [H5] server

Post by godfreyouwens »

Kruel wrote:Okay, so let's make it more simple...

I wanna open server by the "host file" way...all i need is host file with this line :

Code: Select all

127.0.0.1 l2authd.lineage2.com 

bc im running client and server on the same PC

and my friends host file only need this line:

Code: Select all

(my WAN IP) l2authd.lineage2.co

7777, 2106 : Ports are forwarded on router setings, made na excptions in windows firewall-defense, shot down my anti-vir... not sure what more i can do about them.

correct, plus the ipconfig.xml and double check the ports you are forwarding are the ports it states in the server.properties configs
User avatar
Faelucc
Posts: 27
Joined: Sun Nov 28, 2010 8:22 pm

Re: Friends can't connect to my L2j [H5] server

Post by Faelucc »

Kruel wrote:and my friends host file only need this line:

Code: Select all

(my WAN IP) l2authd.lineage2.co
Almost correct :p
I hope that wasn't a copy/paste you only forget that "m" at the end of the line when you posted here :p

With your hosts file (127.0.0.1), are you able to connect yourself to your server ?
If yes, you should check your router configuration, your firewall and ask your friens to check the hosts file.
If no... It's not a network problem...
Kruel
Posts: 5
Joined: Mon Apr 13, 2015 1:56 pm

Re: Friends can't connect to my L2j [H5] server

Post by Kruel »

Dudes!

I created a new server... once again, step-by-step... reconfig my router and FW setings... and suddenly it all started to work! Finally i can have funn with friends.

I guess the main issue was with port 2106 and 7777... or maybe bc i was testing only with the loginserver "on". Dunno, anyway i feel less newb now. Getting smarter thanks to U guys!

Thanx all!

P.S. And now i'm losing nights trying to make a custom NPC... but i guess thats a story for another topic ;-)
Post Reply