pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.65k stars 1.68k forks source link

Applications report wrong IPv6 addresses #4332

Closed danir-de closed 5 months ago

danir-de commented 2 years ago

Current Behavior

When using IPv6 within the TeamSpeak egg, all users connected via IPv6 are reported having the exact same IPv6 address: [fdba:17c8:6c94::1011]

Upon digging this seems to be the default docker gateway address: https://github.com/pterodactyl/wings/blob/develop/config/config_docker.go

Expected Behavior

Applications like TeamSpeak reporting the users actual IPv6 addresses.

Steps to Reproduce

  1. Set-up a TeamSpeak egg with IPv6 allocations.
  2. Connect to the server via IPv6.
  3. Observe the incorrect IP address.

Panel Version

1.10.1

Wings Version

1.7.0

Games and/or Eggs Affected

TeamSpeak, (no others tested)

Docker Image

ghcr.io/pterodactyl/yolks:debian

Error Logs

No response

Is there an existing issue for this?

parkervcp commented 2 years ago

This is probably due to the server running container in a docker container. Or the the upstream isn't forwarding addresses properly due to ipv4 to ipv6 translation.

danir-de commented 2 years ago

I'm using the official TeamSpeak egg by Pterodactyl on a default debian installation, without additional configuration.

The IPv6 address + ports got directly assigned to the applications binding settings in pterodactyl.

Both the tested clients and the server have full IPv6 support and IPs get correctly picked up by the host system.

matthewpi commented 1 year ago

I'm not really sure what we can do here. This seems like an issue with either NAT, Docker, or TeamSpeak somewhere. Ideally people would be using public IPv6 blocks for this rather than relying on private blocks with NAT, however that isn't very well supported with Pterodactyl yet.

danir-de commented 1 year ago

We're currently using a public IPv6 address (block) without any NATing involved - so that can't be it. The NAT seems to be introduced by the Pterodactyl container (ghcr.io/pterodactyl/yolks:debian).

matthewpi commented 1 year ago

We're currently using a public IPv6 address (block) without any NATing involved - so that can't be it.

The NAT seems to be introduced by the Pterodactyl container (ghcr.io/pterodactyl/yolks:debian).

How do you have this configured? I assume a public IPv6 address on the Panel but what about in the Wings configuration?

danir-de commented 1 year ago

The wings configuration wasn't changed from default. This is the docker networking part in /etc/pterodactyl/config.yml:

docker:
  network:
    interface: 172.18.0.1
    dns:
    - 1.1.1.1
    - 1.0.0.1
    name: pterodactyl_nw
    ispn: false
    driver: bridge
    network_mode: pterodactyl_nw
    is_internal: false
    enable_icc: true
    network_mtu: 1500
    interfaces:
      v4:
        subnet: 172.18.0.0/16
        gateway: 172.18.0.1
      v6:
        subnet: fdba:17c8:6c94::/64
        gateway: fdba:17c8:6c94::1011
opuzlife commented 1 year ago

I'm having the same issue when using Minecraft Bungeecord. All users have the same IPv6 Address.

parkervcp commented 1 year ago

@opuzlife

I'm having the same issue when using Minecraft Bungeecord. All users have the same IPv6 Address.

Your issue is a configuration issue please see here - https://www.spigotmc.org/wiki/bungeecord-ip-forwarding/

danir-de commented 4 months ago

I just wanted to update this thread, as this is/was not a configuration issue on the game-servers side.

This is a configuration issue on docker, if someone else stumbles upon this issue, here is how to solve it: In docker enable the following configuration options:

You can do all configuration inside the /etc/docker/daemon.json-file if you use it to configure docker. When correctly setting these settings, applications can correctly resolve the public IPs of connecting users via IPv6, effectively solving the issue.

@parkervcp Maybe this could be included in the Pterodactyl docs, so that other users don't have to search for a solution first?

@opuzlife Can you try setting this up and see if it solves your problem?