Page 1 of 1

Problem with creating online server

Posted: Sun May 31, 2009 11:43 am
by Arif
ok ill write everything what i have done yet.
i have created a l2j server gracia part 2. i can play it alone.
1. i run loginserver
2. i run gameserver (in the server.properties for the external IP i write my external ip (i learn it from myipaddress.com), for internal IP i write 127.0.0.1)
3. in hosts file i write:

Code: Select all

127.0.0.1 localhost 127.0.0.1 l2authd.lineage2.com127.0.0.1 l2testauthd.lineage2.com
4. i run the l2.exe and can play
--------------------------- ok this part was easy----------------
now i want to make my server online so that my friends could join me over the internet. what i do is i go to 192.168.1.1 (to my router) and add ports to virtual server part (my router is D-link, so it may be in different place in different routers). i add these ports: 7777, 2106, 27016, 27021 and write my local IP (192.168.1.66) so that it would transfer incoming traffic to my comp. in the hosts file i write:

Code: Select all

127.0.0.1 localhost xx.xx.xx.xx l2authd.lineage2.comxx.xx.xx.xx l2testauthd.lineage2.com
where xx.xx.xx.xx is my WAN ip (and again i learned it from www.myipaddress.com).
so basically thats it. but then it doesnt work...
need a helping hand

thanks

Re: Problem with creating online server

Posted: Sun May 31, 2009 1:17 pm
by Arif
also on local computers when i write my local ip to their hosts file, and run l2.exe, i can login until the server list, when i choose server and click ok it just stays there, ping shows 9999, but server status is "light" (blue)

Re: Problem with creating online server

Posted: Sun May 31, 2009 1:44 pm
by Vapulabe
1) you should NOT put L2J on the same computer than L2.
2) When the server is behind a router doing NAT, you can't connect from the outside.

Re: Problem with creating online server

Posted: Sun May 31, 2009 3:01 pm
by Arif
ok, now i launched l2 from other computer and l2j from other, still cant connect.
and how do i prevent server from doin NAT (network address translation i guess) ?

Re: Problem with creating online server

Posted: Sun May 31, 2009 5:01 pm
by Vapulabe
NAT is used when you use a router which transform your unique IP address from a public range to multiple addresses in a private range.

In order to NOT use NAT, you'll have to have several IP addresses, one for the NAT to your system and one for your L2J server (which will have to be connected directly to the internet).

It may also be done using a firewall way more powerful than the common router boxes... But I guess that that kind of appliance is beyond your finances (several thousand Euros for the chepest one)

Re: Problem with creating online server

Posted: Mon Jun 01, 2009 3:56 am
by Arif
Vapulabe
oh... i see now. thank you for information.
Now tell me, why then i cant even play it in local? in local computers they can log in, they can see server list, but cant enter, what can be the problem?
maybe it can help, im pasting here my server.properties file:

Code: Select all

# This is the server configuration file. Here you can set up the connection for your server.# Usually you have to change the ExternalHostname option to# - 127.0.0.1 (if you want to play alone / testing purpose)# - LAN IP* (if you want to play from another computer in the network)# - WAN IP** (if you want to play with friends over internet)# - Questions? => http://l2jfree.com## * = If you want to get your LAN IP, simply choose "Start" => "Run..." then type "cmd" => "ipconfig"# **= If you want to get you WAN IP, visit http://www.whatismyip.com# =================================================================================================== # ================================================================# General server setting!!! REQUIRED to configure to everyone!!!# ================================================================ # Bind ip of the gameserver, use 0.0.0.0 to bind on all available IPsGameserverHostname = 0.0.0.0GameserverPort = 7777 # This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostnameExternalHostname = 192.168.1.66# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostnameInternalHostname = 127.0.0.1# Note: You can define server hostname for each network in subnets.properties # The Loginserver host and portLoginPort = 9014LoginHost = 127.0.0.1 # This is the server id that the gameserver will request (i.e. 1 is Bartz)RequestServerID = 1# If set to true, the login will give an other ID to the server if the requested ID is allready reservedAcceptAlternateID = True # Database infoDriver = com.mysql.jdbc.Driver# Driver = org.hsqldb.jdbcDriver# Driver = com.microsoft.sqlserver.jdbc.SQLServerDriverURL = jdbc:mysql://localhost/l2jdb# URL = jdbc:hsqldb:hsql://localhost/l2jdb# URL = jdbc:sqlserver://localhost/database=l2jdb/user=sa/password=Login = rootPassword = *******MaximumDbConnections = 50 # Datapack root directory, defaults to current directory from which the server is started# DatapackRoot = H:/workEclipse/L2J Free/trunk/L2_DataPack_CT2 # Define character name template# These ones are regular expressions, visit http://www.regular-expressions.info for details# Note: Checking lengths are done server side, but keep it in pattern for future purposes# Character name ( Default [A-Za-z0-9\-]{3,16} )CnameTemplate = [A-Za-z0-9\-]{3,16}# Pet name ( Default [A-Za-z0-9\-]{3,16} )PetNameTemplate = [A-Za-z0-9\-]{3,16}# Clan and ally name ( [A-Za-z0-9 \-]{3,16} )ClanAllyNameTemplate = [A-Za-z0-9 \-]{3,16}# Title ( [A-Za-z0-9 \-\\[\\]\<\>\(\)\!\|]{3,16} )TitleTemplate = [A-Za-z0-9 \-\\[\\]\<\>\(\)\!\|]{3,16} # Maximum number of chars per account - 0 = illimited - default = 7CharMaxNumber = 7 # Define how many players are allowed to play simultaneously on your server.MaximumOnlineUsers = 100  # Minimum and maximum protocol revision that server allow to connect.# You must keep MinProtocolRevision <= MaxProtocolRevision.MinProtocolRevision = 1MaxProtocolRevision = 999 # ---------------------------------------------# Safe Reboot configuration# ---------------------------------------------# This will prevent some exploit during restart/shutdown processSafeReboot = True# To use following options, SafeReboot must be set to True# Time in seconds before server complete shutdown/reboot, when# following striction take effectSafeRebootTime = 10# Disable item enchantSafeRebootDisableEnchant = True# Disable players teleportationsSafeRebootDisableTeleport = False# Disable craft and crystallizeSafeRebootDisableCreateItem = False# Disable trades and shopsSafeRebootDisableTransaction = False# Disable actions between playersSafeRebootDisablePcIteraction = False# Disable actions on NPCSafeRebootDisableNpcIteraction = False # Flood Protection# If enabled players which send more then PACKETLIMIT packets in PACKETTIMELIMIT ms will get kickedFloodProtection = FalsePacketLimit = 500PacketTimeLimit = 1100 # ================================================================# CT1 Legacy# ================================================================CT1LegacyMode = False

Re: Problem with creating online server

Posted: Mon Jun 01, 2009 7:50 am
by Vapulabe
192.168.1.66 is the LAN address... Don't use 127.0.0.1 which is local loopback.

Re: Problem with creating online server

Posted: Tue Jun 02, 2009 4:02 am
by Arif
Vapulabe wrote:192.168.1.66 is the LAN address... Don't use 127.0.0.1 which is local loopback.
oh, i changed and it worked in local. thank you very much.