L2j Server rev 5630 からゲームサーバのアドレスの設定が自動になりました。
それ以前にあった設定ファイル ipconfig.xml は不要になったので default-ipconfig.xml にリネームされています。
もし、自動設定で何か問題があるときは、default-ipconfig.xml を ipconfig.xml にリネームするかコピーして、下記の説明にしたがって手動で書き換えてください。
ipconfig.xml ファイルが存在するときは ipconfig.xml の内容が読み込まれ、手動設定になります。無いときは自動設定です。すでに ipconfig.xml ファイルを作成しているひとは ipconfig.xml を削除すると自動設定になります。
以下、rev 5630 より前のリビジョンの説明です。
2012.10.13 JOJO
L2j Server v4.4 Freya (T2.5 セカンドスローン フレヤ)からゲームサーバのアドレスの設定場所が変更になりました。
T2.4まではserver.propertiesで設定していた項目が
T2.5からはipconfig.xmlになりました。
T2.4まで server.properties | T2.5から ipconfig.xml |
ExternalHostname=WAN側アドレス | <gameserver address="WAN側アドレス"> |
InternalHostname=LAN側アドレス | <define subnet="LANサブネットマスク" address="LAN側アドレス" /> |
具体的に、わが家の設定をお見せします。
わが家のネットワーク環境:
・無料のダイナミックDNSでxxxx.ath.cx(仮称)を取得しています。-- これがゲームサーバのWAN側アドレスになります。
(DNSを取得していないなら、数字のIPアドレスでもOKです)
コンピュータは
・サーバ専用機1台 192.168.0.200 -- これがゲームサーバのLAN側アドレスになります。
・クライアント専用機1台 192.168.0.201
すると、旧:T2.4までの server.properties ではこうなります。
# ---------------------------------------------------------------------------
# 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
# ---------------------------------------------------------------------------
# This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname
# Common settings...
# 127.0.0.1 - If you are playing alone on a test server
# 192.168.x.x - This is if you are on a 192.168.x.x type network (behind a standard consumer router) and want other computers from JUST the internal network to be able to connect
# x.x.x.x - WAN IP obtained from http://www.whatismyip.com/. This is if you want people outside your internal network to be able to connect to your server.
# If this IP is resolvable by the Login Server, just leave *.
# ---------------------------------------------------------------------------
# Default: *
ExternalHostname = xxxx.ath.cx
# ---------------------------------------------------------------------------
# This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname.
# This can be the internal IP such as 127.0.0.1 or the computer's IP such as 192.168.x.x.
# If this IP is resolvable by the Login Server, just leave *.
# ---------------------------------------------------------------------------
# Default: *
InternalHostname = 192.168.0.200
(以下省略)
新:T2.5からの ipconfig.xml だとこうなります。
<?xml version="1.0" encoding="UTF-8"?>
<!-- Externalhost here (Internet IP) or Localhost IP for local test -->
<gameserver address="xxxx.ath.cx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ipconfig.xsd">
<!-- Localhost here -->
<define subnet="127.0.0.0/8" address="127.0.0.1" />
<!-- Internalhosts here (LANs IPs) -->
<define subnet="192.168.0.0/16" address="192.168.0.200" />
</gameserver>
<define subnet="10.0.0.0/8" address="10.0.0.0" /> と
<define subnet="172.16.0.0/19" address="172.16.0.0" /> について。
元の ipconfig.xml には例としてこの2行も書いてあります。
ふつう、家庭のパソコン環境では滅多に使わないと思いますから削除してしまってオッケーです。そのまま残しておいても動くみたいですが、几帳面な私は消しました。
<define subnet="127.0.0.0/8" address="127.0.0.1" /> について。
これはゲームサーバとクライアントを1台のマシンで同時に動かすときに必要です。
サーバ専用機なら必要ありません。よくわからないときは、いじらずにそのままにしておいてください。
以上です。
2011.05.01 JOJO