Hosts file
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Hosts file
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 5004
L2JDP Revision Number: 8460
Hi there im having some trouble modifying the hosts file. First off my ipconfig file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Externalhost here (Internet IP) or Localhost IP for local test -->
-<gameserver xsi:noNamespaceSchemaLocation="ipconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" address="209.189.245.111">
<!-- Localhost here -->
<define address="127.0.0.1" subnet="127.0.0.0/8"/>
<!-- Internalhosts here (LANs IPs) -->
<define address="10.0.0.0" subnet="10.0.0.0/8"/> <define address="172.16.0.0" subnet="172.16.0.0/19"/> <define address="192.168.1.5" subnet="192.168.0.0/16"/> </gameserver>
Now its set up with my current outgoing ip on my router. Does that look correct to yall? The 209.189.245.111 is my IP.
So im running the server on my computer and im trying to connect to it on the same computer and i put this in my hosts file:
127.0.0.1 L2authd.lineage2.com
127.0.0.1 localhost
Now with that i was able to connect to my server, but my question is what do people need to put in their hosts files so they can connect to it too from a different computer. Can anyone help?
» Find Revision
L2J Revision Number: 5004
L2JDP Revision Number: 8460
Hi there im having some trouble modifying the hosts file. First off my ipconfig file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Externalhost here (Internet IP) or Localhost IP for local test -->
-<gameserver xsi:noNamespaceSchemaLocation="ipconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" address="209.189.245.111">
<!-- Localhost here -->
<define address="127.0.0.1" subnet="127.0.0.0/8"/>
<!-- Internalhosts here (LANs IPs) -->
<define address="10.0.0.0" subnet="10.0.0.0/8"/> <define address="172.16.0.0" subnet="172.16.0.0/19"/> <define address="192.168.1.5" subnet="192.168.0.0/16"/> </gameserver>
Now its set up with my current outgoing ip on my router. Does that look correct to yall? The 209.189.245.111 is my IP.
So im running the server on my computer and im trying to connect to it on the same computer and i put this in my hosts file:
127.0.0.1 L2authd.lineage2.com
127.0.0.1 localhost
Now with that i was able to connect to my server, but my question is what do people need to put in their hosts files so they can connect to it too from a different computer. Can anyone help?
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: Hosts file
as you can read in the same config...
"Externalhost here (Internet IP)..."
so you need that, to allow other people play in your server
"Externalhost here (Internet IP)..."
so you need that, to allow other people play in your server

-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Re: Hosts file
So would the proper format for other people to connect be:MELERIX wrote:as you can read in the same config...
"Externalhost here (Internet IP)..."
so you need that, to allow other people play in your server
209.189.245.111 L2authd.lineage2.com
127.0.0.1 localhost
Because if so i have tried that and it hasnt worked so i must have another problem.
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Re: Hosts file
Im pretty sure i have those open, i went to portforward.com and open the ports they told me to for L2J, is there anything else i need to do and if so can you run me through it?MELERIX wrote:yes, but you need to have login and server ports open too.
Currently i have the 80,2106, and 7777 port forwarded on my router.
EDIT: Ok i went to portforward.com to make sure i had those ports forwarded and confirmed that i did. However i downloaded their port checker tool and checked if those ports were open with it and none of them were. What did i do wrong?
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Re: Hosts file
Login:
# ---------------------------------------------------------------------------
# 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
# ---------------------------------------------------------------------------
# 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)
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: * (0.0.0.0)
LoginHostname = *
# The port on which login will listen for GameServers
# Default: 9014
LoginPort = 9014
# ---------------------------------------------------------------------------
# Security
# ---------------------------------------------------------------------------
# Default: True
LogLoginController = True
# How many times you can provide an invalid account/pass before the IP gets banned.
# Default: 10
LoginTryBeforeBan = 10
# Time you won't be able to login back again after LoginTryBeforeBan tries to login.
# Default: 600 (10 minutes)
LoginBlockAfterBan = 600
# If set to True any GameServer can register on your login's free slots
# Default: False
AcceptNewGameServer = False
# 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/l2jdb (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jdb
# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password = corbob100
URL = jdbc:mysql://localhost/l2jdb
# Database user info (default is "root" but it's not recommended)
Login = root
# Database connection password
Password = removed
# Default: 10
MaximumDbConnections = 10
# Default: 0
MaximumDbIdleTime = 0
# ---------------------------------------------------------------------------
# Misc.
# ---------------------------------------------------------------------------
# If False, the license (after the login) will not be shown.
# Default: True
ShowLicence = False
# Default: True
AutoCreateAccounts = True
# Datapack root directory.
# Defaults to current directory from which the server is started unless the below line is uncommented.
#DatapackRoot = C:/Work/tmp/DataPack
# ---------------------------------------------------------------------------
# Developer Settings
# ---------------------------------------------------------------------------
# Default: False
Debug = False
# ---------------------------------------------------------------------------
# Restart LS every 24 hours?
# ---------------------------------------------------------------------------
# Default: False, 24
LoginRestartSchedule = False
LoginRestartTime = 24
Server:
# ---------------------------------------------------------------------------
# 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
# ---------------------------------------------------------------------------
# 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/l2jdb (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jdb
# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password = corbob100
URL = jdbc:mysql://localhost/l2jdb
# Database user info (default is "root" but it's not recommended)
Login = root
# Database connection password
Password = removed
# 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 = .*
# Maximum number of characters per account.
# Default: 7 (client limit)
CharMaxNumber = 7
ipconfig:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Externalhost here (Internet IP) or Localhost IP for local test -->
-<gameserver xsi:noNamespaceSchemaLocation="ipconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" address="209.189.245.111">
<!-- Localhost here -->
<define address="127.0.0.1" subnet="127.0.0.0/8"/>
<!-- Internalhosts here (LANs IPs) -->
<define address="10.0.0.0" subnet="10.0.0.0/8"/> <define address="172.16.0.0" subnet="172.16.0.0/19"/> <define address="192.168.1.5" subnet="192.168.0.0/16"/> </gameserver>
# ---------------------------------------------------------------------------
# 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
# ---------------------------------------------------------------------------
# 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)
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: * (0.0.0.0)
LoginHostname = *
# The port on which login will listen for GameServers
# Default: 9014
LoginPort = 9014
# ---------------------------------------------------------------------------
# Security
# ---------------------------------------------------------------------------
# Default: True
LogLoginController = True
# How many times you can provide an invalid account/pass before the IP gets banned.
# Default: 10
LoginTryBeforeBan = 10
# Time you won't be able to login back again after LoginTryBeforeBan tries to login.
# Default: 600 (10 minutes)
LoginBlockAfterBan = 600
# If set to True any GameServer can register on your login's free slots
# Default: False
AcceptNewGameServer = False
# 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/l2jdb (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jdb
# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password = corbob100
URL = jdbc:mysql://localhost/l2jdb
# Database user info (default is "root" but it's not recommended)
Login = root
# Database connection password
Password = removed
# Default: 10
MaximumDbConnections = 10
# Default: 0
MaximumDbIdleTime = 0
# ---------------------------------------------------------------------------
# Misc.
# ---------------------------------------------------------------------------
# If False, the license (after the login) will not be shown.
# Default: True
ShowLicence = False
# Default: True
AutoCreateAccounts = True
# Datapack root directory.
# Defaults to current directory from which the server is started unless the below line is uncommented.
#DatapackRoot = C:/Work/tmp/DataPack
# ---------------------------------------------------------------------------
# Developer Settings
# ---------------------------------------------------------------------------
# Default: False
Debug = False
# ---------------------------------------------------------------------------
# Restart LS every 24 hours?
# ---------------------------------------------------------------------------
# Default: False, 24
LoginRestartSchedule = False
LoginRestartTime = 24
Server:
# ---------------------------------------------------------------------------
# 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
# ---------------------------------------------------------------------------
# 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/l2jdb (default)
# URL = jdbc:hsqldb:hsql://localhost/l2jdb
# URL = jdbc:sqlserver://localhost/database = l2jdb/user = sa/password = corbob100
URL = jdbc:mysql://localhost/l2jdb
# Database user info (default is "root" but it's not recommended)
Login = root
# Database connection password
Password = removed
# 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 = .*
# Maximum number of characters per account.
# Default: 7 (client limit)
CharMaxNumber = 7
ipconfig:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Externalhost here (Internet IP) or Localhost IP for local test -->
-<gameserver xsi:noNamespaceSchemaLocation="ipconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" address="209.189.245.111">
<!-- Localhost here -->
<define address="127.0.0.1" subnet="127.0.0.0/8"/>
<!-- Internalhosts here (LANs IPs) -->
<define address="10.0.0.0" subnet="10.0.0.0/8"/> <define address="172.16.0.0" subnet="172.16.0.0/19"/> <define address="192.168.1.5" subnet="192.168.0.0/16"/> </gameserver>
Last edited by Zoey76 on Mon Oct 17, 2011 1:57 pm, edited 1 time in total.
Reason: Deleting sensitive information.
Reason: Deleting sensitive information.
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: Hosts file
why you have it like:
instead of:

Code: Select all
<gameserver xsi:noNamespaceSchemaLocation="ipconfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" address="209.189.245.111">
Code: Select all
<gameserver address="209.189.245.111" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ipconfig.xsd">

-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Re: Hosts file
I dont know, i havent altered that file much. Thats the format it was given in. But that still doesnt address the issue. I changed it to that but i still cant connect. Im pretty sure it has to do with my ports because the port checker said they werent open but my router and firewall say they are.
-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Re: Hosts file
Alright ive checked with a friend and my ports are open and they can ping my router and the hosts file is correct but they still cant connect to my server. Everything seems to have been set up correctly and we cant figure out whats wrong. Can any1 point out what ive missed?
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: Hosts file
and that is your right internet ip ?
is your friend using a clean and updated l2 client ?
is your friend using a clean and updated l2 client ?
-
- Posts: 12
- Joined: Thu Oct 13, 2011 9:16 pm
Re: Hosts file
Yes it is. And yes she just fully redownloaded and updated. Im starting to think it has something to do with my internet provider. Any suggestions?MELERIX wrote:and that is your right internet ip ?
is your friend using a clean and updated l2 client ?
-
- Posts: 19
- Joined: Fri Nov 11, 2011 6:08 pm
Re: Hosts file
Many ISPs have a firewall blocking those ports. Try calling your ISP or read their FAQ , it should be in there.
My ISP HAS a firewall like that.They also have a webpage which i connect with my account , go to setting and disable their firewall. Maybe thats your problem
GL ^^
My ISP HAS a firewall like that.They also have a webpage which i connect with my account , go to setting and disable their firewall. Maybe thats your problem
GL ^^