[GH-ISSUE #4459] Not binding to IPv4 Interface #3524

Closed
opened 2026-05-05 14:15:55 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @rcarlet on GitHub (Sep 26, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4459

Bug Description

Hello,

I currently have the following frps.toml

bindPort = 7000
bindAddr = "0.0.0.0"

But after running the server (./frps -c ./frps.toml) it binds to the IPv6 interface:

$ netstat  -tnlp
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::7000                 :::*                    LISTEN      6155/./frps         
tcp6       0      0 :::111                  :::*                    LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -      

When trying directly from the command line (./frps -p 7000), it binds only via IPv6.
I found no way to force only IPv4, besides the binding Address, which is not followed.

frpc Version

0.60.0

frps Version

0.60.0

System Architecture

linux/amd64

Configurations

frps.toml
bindPort = 7000 bindAddr = "0.0.0.0"

Logs

2024-09-26 18:47:05.043 [I] [frps/root.go:107] frps uses command line arguments for config
2024-09-26 18:47:05.949 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000
2024-09-26 18:47:05.950 [I] [frps/root.go:114] frps started successfully

Steps to reproduce

  1. Create the frps.toml config file with the configuration mentioned
  2. Run the server using ./frps -c ./frps.toml
  3. Check the listening connections using netstat -tnlp

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @rcarlet on GitHub (Sep 26, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4459 ### Bug Description Hello, I currently have the following frps.toml ``` bindPort = 7000 bindAddr = "0.0.0.0" ``` But after running the server (./frps -c ./frps.toml) it binds to the IPv6 interface: ``` $ netstat -tnlp Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::7000 :::* LISTEN 6155/./frps tcp6 0 0 :::111 :::* LISTEN - tcp6 0 0 :::22 :::* LISTEN - ``` When trying directly from the command line (./frps -p 7000), it binds only via IPv6. I found no way to force only IPv4, besides the binding Address, which is not followed. ### frpc Version 0.60.0 ### frps Version 0.60.0 ### System Architecture linux/amd64 ### Configurations frps.toml `bindPort = 7000 bindAddr = "0.0.0.0"` ### Logs 2024-09-26 18:47:05.043 [I] [frps/root.go:107] frps uses command line arguments for config 2024-09-26 18:47:05.949 [I] [server/service.go:237] frps tcp listen on 0.0.0.0:7000 2024-09-26 18:47:05.950 [I] [frps/root.go:114] frps started successfully ### Steps to reproduce 1. Create the frps.toml config file with the configuration mentioned 2. Run the server using ./frps -c ./frps.toml 3. Check the listening connections using netstat -tnlp ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:15:55 -06:00
Author
Owner

@superzjg commented on GitHub (Sep 27, 2024):

Displayed as::: 7000, can be connected using IPv4 and IPv6。
To force only IPv4, requires setting bindAddr to the actual IPv4 address or domain, not 0.0.0.0

<!-- gh-comment-id:2378188273 --> @superzjg commented on GitHub (Sep 27, 2024): Displayed as`::: 7000`, can be connected using IPv4 and IPv6。 To force only IPv4, requires setting `bindAddr` to the actual IPv4 address or domain, not `0.0.0.0`
Author
Owner

@xqzr commented on GitHub (Sep 30, 2024):

frp 监听 :: 时,没有附加 V6ONLY 套接字选项。所以 :: 监听,可以接受 IPv4 连接

<!-- gh-comment-id:2383608336 --> @xqzr commented on GitHub (Sep 30, 2024): frp 监听 `::` 时,没有附加 V6ONLY 套接字选项。所以 `::` 监听,可以接受 IPv4 连接
Author
Owner

@github-actions[bot] commented on GitHub (Oct 22, 2024):

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

<!-- gh-comment-id:2427982474 --> @github-actions[bot] commented on GitHub (Oct 22, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#3524
No description provided.