[GH-ISSUE #4480] [Feature Request] remoteAdd bind to 127.0.0.1 only #3540

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

Originally created by @richervip on GitHub (Oct 10, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4480

Describe the feature request

Cloud I bind client service remote service port to 127.0.0.1 only or particular IP rather then 0.0.0.0 ?
I do not want to open this service to any.
for proxies example in frpc.tom.
proxies
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000
remoteIP = "127.0.0.1"

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @richervip on GitHub (Oct 10, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4480 ### Describe the feature request Cloud I bind client service remote service port to 127.0.0.1 only or particular IP rather then 0.0.0.0 ? I do not want to open this service to any. for proxies example in frpc.tom. [[proxies]] name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 6000 remoteIP = "127.0.0.1" ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [X] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Oct 10, 2024):

https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml#L18

<!-- gh-comment-id:2403875939 --> @fatedier commented on GitHub (Oct 10, 2024): https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml#L18
Author
Owner

@richervip commented on GitHub (Oct 11, 2024):

proxyBindAddr is only bind ALL proxy to particular IP address.
Could I bind proxy ssh/22 to 127.0.0.1 and http/80 to 0.0.0.0 in the same server ?

<!-- gh-comment-id:2406386811 --> @richervip commented on GitHub (Oct 11, 2024): proxyBindAddr is only bind ALL proxy to particular IP address. Could I bind proxy ssh/22 to 127.0.0.1 and http/80 to 0.0.0.0 in the same server ?
Author
Owner

@lcharles123 commented on GitHub (Oct 15, 2024):

If I understand what you are requesting, you want to specify source address of frp server and client. It is possible, but only for TCP connections, UDP based connections do not work and you need to use a wrapper to call the frp client.
The setting to specify bind addres on frp client is ConnectServerLocalIP , you need to put it in general section of frpc config
transport.ConnectServerLocalIP = "IP_addr"

Also on the server there is a option bindAddr

<!-- gh-comment-id:2414231807 --> @lcharles123 commented on GitHub (Oct 15, 2024): If I understand what you are requesting, you want to specify source address of frp server and client. It is possible, but only for TCP connections, UDP based connections do not work and you need to use a wrapper to call the frp client. The setting to specify bind addres on frp client is [ConnectServerLocalIP](https://github.com/fatedier/frp/blob/b14192a8d3bb5b5a844977ea82de9a7d87dbdf06/pkg/config/v1/client.go#L99) , you need to put it in general section of frpc config transport.ConnectServerLocalIP = "IP_addr" Also on the server there is a option bindAddr
Author
Owner

@richervip commented on GitHub (Oct 21, 2024):

This is my request.
Server IP : private_ip: 127.0.0.1 , public_ip : 123.123.123.123

frpc.toml
proxies
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 222
remoteIP = "127.0.0.1" #client ssh bind to server IP 127.0.0.1 only

proxies
name = "web"
type = "tcp"
localIP = "127.0.0.1"
localPort = 80
remotePort = 80
remoteIP = "123.123.123.123" #client web bind to server IP 123.123.123.123 only

<!-- gh-comment-id:2425850711 --> @richervip commented on GitHub (Oct 21, 2024): This is my request. Server IP : private_ip: 127.0.0.1 , public_ip : 123.123.123.123 frpc.toml [[proxies]] name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 222 remoteIP = "127.0.0.1" #client ssh bind to server IP 127.0.0.1 only [[proxies]] name = "web" type = "tcp" localIP = "127.0.0.1" localPort = 80 remotePort = 80 remoteIP = "123.123.123.123" #client web bind to server IP 123.123.123.123 only
Author
Owner

@fatedier commented on GitHub (Oct 21, 2024):

This is my request. Server IP : private_ip: 127.0.0.1 , public_ip : 123.123.123.123

frpc.toml proxies name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 222 remoteIP = "127.0.0.1" #client ssh bind to server IP 127.0.0.1 only

proxies name = "web" type = "tcp" localIP = "127.0.0.1" localPort = 80 remotePort = 80 remoteIP = "123.123.123.123" #client web bind to server IP 123.123.123.123 only

remoteIP is not supported. Please use proxyBindAddr and multiple frps instances to achieve this kind of requirement.

<!-- gh-comment-id:2425866344 --> @fatedier commented on GitHub (Oct 21, 2024): > This is my request. Server IP : private_ip: 127.0.0.1 , public_ip : 123.123.123.123 > > frpc.toml [[proxies]] name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 222 remoteIP = "127.0.0.1" #client ssh bind to server IP 127.0.0.1 only > > [[proxies]] name = "web" type = "tcp" localIP = "127.0.0.1" localPort = 80 remotePort = 80 remoteIP = "123.123.123.123" #client web bind to server IP 123.123.123.123 only remoteIP is not supported. Please use proxyBindAddr and multiple frps instances to achieve this kind of requirement.
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#3540
No description provided.