> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/dataserver/allowableiplist.md).

# AllowableIpList.txt

DataServer rejects every incoming GameServer connection whose public IP is not in this file. The check runs inside the accept-condition callback, so a rejected connection is never handed to the socket manager and never reads a byte of data.

This list gates the DataServer listen port configured in [`DataServer.ini`](/docs/dataserver/dataserver-ini.md); see [`README.md`](/docs/dataserver/dataserver.md) for the overall startup order and the companion [`BadSyntax.txt`](/docs/dataserver/badsyntax.md) for name filtering.

## File Location

```
DataServer/AllowableIpList.txt
```

Loaded once at startup, right after the TCP port opens. Changes require a DataServer restart.

## Format

```
0
"127.0.0.1"
"10.0.0.5"
"10.0.0.6"
end
```

* First line: section number `0`. This is a numeric section selector the parser reads before the inner loop; without it the IP loop is not entered and the list stays empty
* Middle lines: one IPv4 address per line, double-quoted. Each address is capped at 31 characters (buffer is 32 bytes including the null terminator); longer strings are truncated
* Last line: the literal token `end`

Rules:

* IPv4 only. The comparison is a plain string match against the output of `inet_ntoa` on the remote socket address, so only dotted-decimal IPv4 will ever match
* Exact string match; no CIDR, no wildcards, no hostnames
* Whitespace and blank lines between entries are ignored
* `//` begins a line comment and is skipped to end-of-line
* The file is read as a whole buffer and tokenized, not parsed line-by-line; the `0` and `end` markers are required

## Important Behavior

* A missing, empty, or malformed file results in an empty whitelist, which blocks every GameServer
* Addresses are compared to the remote IP as seen by the OS. Behind NAT, list the public IP that reaches DataServer, not the private one the GameServer binds to
* `127.0.0.1` allows only loopback connections from the same host; it does not cover `::1` or any LAN IP
* IPv6 clients cannot match any entry; DataServer only listens on IPv4
* Duplicate entries collapse silently because the list is stored as a map keyed on the IP string

## Examples

{% tabs %}
{% tab title="Single host" %}
{% code title="AllowableIpList.txt" %}

```
0
"127.0.0.1"
end
```

{% endcode %}
{% endtab %}

{% tab title="Multiple GameServers" %}
{% code title="AllowableIpList.txt" %}

```
0
"10.0.0.5"
"10.0.0.6"
"10.0.0.7"
end
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Common Issues

* **GameServer connects and instantly drops** - the IP DataServer sees is not the one in the file
* **All GameServers rejected after restart** - file saved without the `end` line, or the `0` header is missing
* **Works on one host, fails on another** - NAT or a proxy changed the source IP; add the translated address
