[GH-ISSUE #3591] [Feature Request] Restore Original IP address using iptables/masquerade #2867

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

Originally created by @xorweak on GitHub (Aug 29, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3591

Describe the feature request

Hey there,

So, I'm using this reverse proxy to kinda "mask" the real IP address of a game server, and it's working like a charm. But, there's this one little hiccup: the players' IP addresses show up as "127.0.0.1" instead of their actual IPs.

Any idea what might be causing this glitch? Is there a way to get back the players' original IP addresses? I used to pull this off before with a VPN Server + iptables combo, but man, the connection was terrible. Tons of lag inside the server, which totally killed the gaming experience.

Not sure if this is tied directly to the reverse proxy setup. If there's a different approach to sort this out without messing with the proxy, could someone point me in the right direction?

Thanks a ton.

Describe alternatives you've considered

  1. OpenVPN + iptables
  2. GRE Tunnel

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @xorweak on GitHub (Aug 29, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3591 ### Describe the feature request Hey there, So, I'm using this reverse proxy to kinda "mask" the real IP address of a game server, and it's working like a charm. But, there's this one little hiccup: the players' IP addresses show up as "127.0.0.1" instead of their actual IPs. Any idea what might be causing this glitch? Is there a way to get back the players' original IP addresses? I used to pull this off before with a VPN Server + iptables combo, but man, the connection was terrible. Tons of lag inside the server, which totally killed the gaming experience. Not sure if this is tied directly to the reverse proxy setup. If there's a different approach to sort this out without messing with the proxy, could someone point me in the right direction? Thanks a ton. ### Describe alternatives you've considered 1. OpenVPN + iptables 2. GRE Tunnel ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [X] Security - [X] User Experience - [ ] Test and Release - [X] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [X] Others
gitea-mirror 2026-05-05 13:51:19 -06:00
Author
Owner

@fatedier commented on GitHub (Aug 30, 2023):

If your service is using TCP protocol, you can refer to the documentation at https://github.com/fatedier/frp#proxy-protocol to enable Proxy Protocol and obtain the real IP.

If it is UDP, currently it is not supported, but there is a possibility of support in the future.

iptables releated feature is not used.

<!-- gh-comment-id:1698403431 --> @fatedier commented on GitHub (Aug 30, 2023): If your service is using TCP protocol, you can refer to the documentation at https://github.com/fatedier/frp#proxy-protocol to enable Proxy Protocol and obtain the real IP. If it is UDP, currently it is not supported, but there is a possibility of support in the future. `iptables` releated feature is not used.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 30, 2023):

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

<!-- gh-comment-id:1741604395 --> @github-actions[bot] commented on GitHub (Sep 30, 2023): Issues go stale after 30d 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#2867
No description provided.