[GH-ISSUE #3171] [Feature Request] Allow client to specify with remote ip should be use (i.e. [fwd]type=tcp;remote_host=127.0.0.1) #2542

Closed
opened 2026-05-05 13:38:17 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ASSANDHOLE on GitHub (Nov 17, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3171

Describe the feature request

I want to expose multiple http services from client side, and then use Nginx on the server to reverse proxy those connections. However, I cannot specify the IP that the forwarded service is listen on, it seems like it always listens on 0.0.0.0

I need an option that can specify the remote host, for example:

[common]
...

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22

# this option lets the server forward the ssh and expose on its localhost
remote_host = 127.0.0.1

remote_port = 6001

Describe alternatives you've considered

Using firewalls could do the same, but it requires extra steps to configure, and also I still want some services to be exposed on 0.0.0.0

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @ASSANDHOLE on GitHub (Nov 17, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3171 ### Describe the feature request I want to expose multiple http services from client side, and then use Nginx on the server to reverse proxy those connections. However, I cannot specify the IP that the forwarded service is listen on, it seems like it always listens on 0.0.0.0 I need an option that can specify the remote host, for example: ```ini [common] ... [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 # this option lets the server forward the ssh and expose on its localhost remote_host = 127.0.0.1 remote_port = 6001 ``` ### Describe alternatives you've considered Using firewalls could do the same, but it requires extra steps to configure, and also I still want some services to be exposed on 0.0.0.0 ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Nov 17, 2022):

https://github.com/fatedier/frp/blob/dev/conf/frps_full.ini#L17

<!-- gh-comment-id:1318155502 --> @fatedier commented on GitHub (Nov 17, 2022): https://github.com/fatedier/frp/blob/dev/conf/frps_full.ini#L17
Author
Owner

@ASSANDHOLE commented on GitHub (Nov 17, 2022):

Thank you, I didn't see that line 😂.
So it should be like this in case someone has the same issue as me.

[common]
...
# see https://github.com/fatedier/frp/blob/dev/conf/frpc_full.ini#L95
connect_server_local_ip =127.0.0.1

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22

remote_port = 6001

or set in frps.ini

[common]
...
proxy_bind_addr = 127.0.0.1
<!-- gh-comment-id:1318666037 --> @ASSANDHOLE commented on GitHub (Nov 17, 2022): Thank you, I didn't see that line 😂. So it should be like this in case someone has the same issue as me. ```ini [common] ... # see https://github.com/fatedier/frp/blob/dev/conf/frpc_full.ini#L95 connect_server_local_ip =127.0.0.1 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6001 ``` or set in frps.ini ```ini [common] ... proxy_bind_addr = 127.0.0.1 ```
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#2542
No description provided.