Container's embedded DERP only has STUN port #290

Closed
opened 2025-12-29 01:26:14 +01:00 by adam · 5 comments
Owner

Originally created by @1itt1eB0y on GitHub (Jul 9, 2022).

config.yml

server_url: https://*.com:8080
listen_addr: 0.0.0.0:8080
metrics_listen_addr: 0.0.0.0:19090
grpc_listen_addr: 0.0.0.0:50443
grpc_allow_insecure: false
private_key_path: /etc/headscale/private.key
ip_prefixes:
  - 10.10.0.0/16
derp:
  server:
    enabled: false
    region_id: 999
    region_code: "headscale"
    region_name: "Headscale Embedded DERP"
    stun_listen_addr: "0.0.0.0:44444"
  paths: ["/etc/headscale/derp.yaml"]
  auto_update_enabled: true
  update_frequency: 5m
disable_check_updates: false
ephemeral_node_inactivity_timeout: 30m
db_type: sqlite3
db_path: /etc/headscale/db.sqlite
tls_client_auth_mode: disabled
tls_cert_path: "/etc/headscale/*.com/fullchain1.pem"
tls_key_path: "/etc/headscale/*.com/privkey1.pem"
log_level: debug
acl_policy_path: ""
dns_config:
  nameservers:
    - 10.10.0.1
  domains: []
  magic_dns: false
  base_domain: lan
unix_socket: /var/run/headscale.sock
unix_socket_permission: "0770"

docker-compose.yml

version: "3"
services:
  headscale:
    container_name: headscale
    restart: always
    environment:
      - TZ=UTC+8
      - GIN_MODE=release
    image: headscale/headscale:latest
    ports:
      - 8080:8080/tcp
      - 10.0.21.1:19090:19090/tcp
      - 44444:44444/udp
    volumes:
      - /root/docker/headscale/config:/etc/headscale/
    command:
      - headscale
      - serve

port status
图片

STUN port is working. I didn't capture a screenshot but it can be found with nmap

Originally created by @1itt1eB0y on GitHub (Jul 9, 2022). config.yml ```yaml server_url: https://*.com:8080 listen_addr: 0.0.0.0:8080 metrics_listen_addr: 0.0.0.0:19090 grpc_listen_addr: 0.0.0.0:50443 grpc_allow_insecure: false private_key_path: /etc/headscale/private.key ip_prefixes: - 10.10.0.0/16 derp: server: enabled: false region_id: 999 region_code: "headscale" region_name: "Headscale Embedded DERP" stun_listen_addr: "0.0.0.0:44444" paths: ["/etc/headscale/derp.yaml"] auto_update_enabled: true update_frequency: 5m disable_check_updates: false ephemeral_node_inactivity_timeout: 30m db_type: sqlite3 db_path: /etc/headscale/db.sqlite tls_client_auth_mode: disabled tls_cert_path: "/etc/headscale/*.com/fullchain1.pem" tls_key_path: "/etc/headscale/*.com/privkey1.pem" log_level: debug acl_policy_path: "" dns_config: nameservers: - 10.10.0.1 domains: [] magic_dns: false base_domain: lan unix_socket: /var/run/headscale.sock unix_socket_permission: "0770" ``` docker-compose.yml ```yaml version: "3" services: headscale: container_name: headscale restart: always environment: - TZ=UTC+8 - GIN_MODE=release image: headscale/headscale:latest ports: - 8080:8080/tcp - 10.0.21.1:19090:19090/tcp - 44444:44444/udp volumes: - /root/docker/headscale/config:/etc/headscale/ command: - headscale - serve ``` port status ![图片](https://user-images.githubusercontent.com/29831189/178110188-e768a8e9-d969-4187-af8a-d4545aa6049f.png) STUN port is working. I didn't capture a screenshot but it can be found with nmap
adam added the bug label 2025-12-29 01:26:14 +01:00
adam closed this issue 2025-12-29 01:26:15 +01:00
Author
Owner

@kradalby commented on GitHub (Jul 10, 2022):

Hi, can you elaborate what the problem is? I do not understand what is not working.

@kradalby commented on GitHub (Jul 10, 2022): Hi, can you elaborate what the problem is? I do not understand what is not working.
Author
Owner

@1itt1eB0y commented on GitHub (Jul 10, 2022):

It is simple, the embedded DERP doesn't create a DERP port to accept the DERP connection.

@1itt1eB0y commented on GitHub (Jul 10, 2022): It is simple, the embedded DERP doesn't create a DERP port to accept the DERP connection.
Author
Owner

@juanfont commented on GitHub (Jul 10, 2022):

The DERP endpoint runs in the same addr:port as the Headscale API.

On Sun, Jul 10, 2022, 15:25 1itt1eB0y @.***> wrote:

It is simple, the embedded DERP doesn't create a DERP port to accept the
DERP connection.


Reply to this email directly, view it on GitHub
https://github.com/juanfont/headscale/issues/673#issuecomment-1179728743,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABMGQ6I5XIEQ3VEPTGRWM3VTLFNJANCNFSM53DO4N3Q
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

@juanfont commented on GitHub (Jul 10, 2022): The DERP endpoint runs in the same addr:port as the Headscale API. On Sun, Jul 10, 2022, 15:25 1itt1eB0y ***@***.***> wrote: > It is simple, the embedded DERP doesn't create a DERP port to accept the > DERP connection. > > — > Reply to this email directly, view it on GitHub > <https://github.com/juanfont/headscale/issues/673#issuecomment-1179728743>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AABMGQ6I5XIEQ3VEPTGRWM3VTLFNJANCNFSM53DO4N3Q> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@1itt1eB0y commented on GitHub (Jul 10, 2022):

OH! Got it 🤣
BTW, can I set the embedded DERP running with -verify-clients or it will run with it by default

@1itt1eB0y commented on GitHub (Jul 10, 2022): OH! Got it 🤣 BTW, can I set the embedded DERP running with `-verify-clients` or it will run with it by default
Author
Owner

@Houiin commented on GitHub (Oct 26, 2024):

OH! Got it 🤣 BTW, can I set the embedded DERP running with -verify-clients or it will run with it by default

same question... Do you have any answer, bro?

@Houiin commented on GitHub (Oct 26, 2024): > OH! Got it 🤣 BTW, can I set the embedded DERP running with `-verify-clients` or it will run with it by default same question... Do you have any answer, bro?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#290