[GH-ISSUE #4321] Which stun server implement is suitable for frp xtcp? #3409

Closed
opened 2026-05-05 14:11:41 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @kkocdko on GitHub (Jul 7, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4321

Use stun.miwifi.com:3478 and 111.206.174.3:3478 works well. However:

frp-0.58.1 - debian-12-x86-64-kernel-6.1

# other config (frpc)
serverAddr = "111.111.111.111"
serverPort = 7000
natHoleStunServer = "111.111.111.111:3478" # use stun.miwifi.com:3478 and 111.206.174.3:3478 works fine

debian apt coturn (4.6.1-1) failed:

# coturn
turnserver -L 0.0.0.0 -p 3478 -v --no-auth --allow-loopback-peers --no-cli --no-dtls --no-tls
66: : session 000000000000000001: usage: realm=<>, username=<>, rp=1, rb=20, sp=1, sb=80
66: : session 000000000000000001: peer usage: realm=<>, username=<>, rp=0, rb=0, sp=0, sb=0
66: : session 000000000000000001: closed (2nd stage), user <> realm <> origin <>, local 0.0.0.0:3478, remote 222.222.222.222:35326, reason: allocation watchdog determined stale session state
77: : session 001000000000000001: usage: realm=<>, username=<>, rp=1, rb=20, sp=1, sb=80
77: : session 001000000000000001: peer usage: realm=<>, username=<>, rp=0, rb=0, sp=0, sb=0
77: : session 001000000000000001: closed (2nd stage), user <> realm <> origin <>, local 0.0.0.0:3478, remote 222.222.222.222:44711, reason: allocation watchdog determined stale session state

# frp
2024-07-08 06:15:53.473 [I] [visitor/visitor_manager.go:172] [56412290dbbec8b7] visitor added: [klc2_rdp_visitor klc_klc2_rdp_visitor klc_ssh_visitor klc3_ssh_visitor]
2024-07-08 06:15:55.839 [W] [visitor/xtcp.go:280] [56412290dbbec8b7] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:16:05.839 [W] [visitor/xtcp.go:280] [56412290dbbec8b7] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:16:15.795 [E] [visitor/xtcp.go:179] [56412290dbbec8b7] [klc_ssh_visitor] open tunnel error: open tunnel timeout

paullouisageneau/violet (0.5.0) failed:

# violet
2024-07-08 06:18:09 INFO    Got STUN binding from client 99.99.99.99:47800
2024-07-08 06:18:19 INFO    Got STUN binding from client 99.99.99.99:41618

# frp
2024-07-08 06:17:58.626 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:18:08.624 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:18:18.579 [E] [visitor/xtcp.go:179] [9c4d203bf39c6acb] [klc_ssh_visitor] open tunnel error: open tunnel timeout
2024-07-08 06:18:18.625 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
Originally created by @kkocdko on GitHub (Jul 7, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4321 Use `stun.miwifi.com:3478` and `111.206.174.3:3478` **works well**. However: frp-0.58.1 - debian-12-x86-64-kernel-6.1 ```toml # other config (frpc) serverAddr = "111.111.111.111" serverPort = 7000 natHoleStunServer = "111.111.111.111:3478" # use stun.miwifi.com:3478 and 111.206.174.3:3478 works fine ``` debian apt [coturn](https://github.com/coturn/coturn) (4.6.1-1) failed: ```sh # coturn turnserver -L 0.0.0.0 -p 3478 -v --no-auth --allow-loopback-peers --no-cli --no-dtls --no-tls 66: : session 000000000000000001: usage: realm=<>, username=<>, rp=1, rb=20, sp=1, sb=80 66: : session 000000000000000001: peer usage: realm=<>, username=<>, rp=0, rb=0, sp=0, sb=0 66: : session 000000000000000001: closed (2nd stage), user <> realm <> origin <>, local 0.0.0.0:3478, remote 222.222.222.222:35326, reason: allocation watchdog determined stale session state 77: : session 001000000000000001: usage: realm=<>, username=<>, rp=1, rb=20, sp=1, sb=80 77: : session 001000000000000001: peer usage: realm=<>, username=<>, rp=0, rb=0, sp=0, sb=0 77: : session 001000000000000001: closed (2nd stage), user <> realm <> origin <>, local 0.0.0.0:3478, remote 222.222.222.222:44711, reason: allocation watchdog determined stale session state # frp 2024-07-08 06:15:53.473 [I] [visitor/visitor_manager.go:172] [56412290dbbec8b7] visitor added: [klc2_rdp_visitor klc_klc2_rdp_visitor klc_ssh_visitor klc3_ssh_visitor] 2024-07-08 06:15:55.839 [W] [visitor/xtcp.go:280] [56412290dbbec8b7] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses 2024-07-08 06:16:05.839 [W] [visitor/xtcp.go:280] [56412290dbbec8b7] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses 2024-07-08 06:16:15.795 [E] [visitor/xtcp.go:179] [56412290dbbec8b7] [klc_ssh_visitor] open tunnel error: open tunnel timeout ``` paullouisageneau/[violet](https://github.com/paullouisageneau/violet) (0.5.0) failed: ```sh # violet 2024-07-08 06:18:09 INFO Got STUN binding from client 99.99.99.99:47800 2024-07-08 06:18:19 INFO Got STUN binding from client 99.99.99.99:41618 # frp 2024-07-08 06:17:58.626 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses 2024-07-08 06:18:08.624 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses 2024-07-08 06:18:18.579 [E] [visitor/xtcp.go:179] [9c4d203bf39c6acb] [klc_ssh_visitor] open tunnel error: open tunnel timeout 2024-07-08 06:18:18.625 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses ```
gitea-mirror 2026-05-05 14:11:42 -06:00
Author
Owner

@kkocdko commented on GitHub (Jul 7, 2024):

Is frp server + stun server on same ip not allowed?

The point I checked:

  • Firewall (all port passed, use stunner test fine).
  • NAT Type: 3 (both side).
  • Other public stun server: default server and stun.miwifi.com:3478 and 111.206.174.3:3478 works well.
<!-- gh-comment-id:2212596409 --> @kkocdko commented on GitHub (Jul 7, 2024): Is frp server + stun server on same ip not allowed? The point I checked: - Firewall (all port passed, use [stunner](https://github.com/firefart/stunner) test fine). - NAT Type: 3 (both side). - Other public stun server: default server and `stun.miwifi.com:3478` and `111.206.174.3:3478` works well.
Author
Owner

@fatedier commented on GitHub (Jul 8, 2024):

I'm not sure. Most likely your stun server is not following the standard STUN protocol.

<!-- gh-comment-id:2212870685 --> @fatedier commented on GitHub (Jul 8, 2024): I'm not sure. Most likely your stun server is not following the standard STUN protocol.
Author
Owner

@kkocdko commented on GitHub (Jul 10, 2024):

I will test more stun server implement, then post my test result here. After all done, I'll close this issue.

<!-- gh-comment-id:2219821664 --> @kkocdko commented on GitHub (Jul 10, 2024): I will test more stun server implement, then post my test result here. After all done, I'll close this issue.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 1, 2024):

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:2261715617 --> @github-actions[bot] commented on GitHub (Aug 1, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@automan-bot commented on GitHub (Sep 9, 2024):

换别人的stun服务器就可以,自己用coturn和eturnal 搭建的stun服务器,死活不行,希望能出一个frp支持的stun的搭建方式

<!-- gh-comment-id:2338580755 --> @automan-bot commented on GitHub (Sep 9, 2024): 换别人的stun服务器就可以,自己用coturn和eturnal 搭建的stun服务器,死活不行,希望能出一个frp支持的stun的搭建方式
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3409
No description provided.