mochman / Bypass_CGNAT

Wireguard setup to bypass CGNAT with a VPS
619 stars 55 forks source link

Problem - Preserve user address #29

Open Hey opened 2 years ago

Hey commented 2 years ago

Terms

Description

Describe the problem.

It's not preserving user IP addresses for TCP (http and gameservers), and according to "Provide my NPM (Nginx Proxy Manager) Server with clients real IPs (for fail2ban blocking purposes)" this should be working.

steps-to-reproduce

N/A

Actual Behavior

I forwarded 80/tcp. 443/tcp and 25565/tcp, if I visit the IP address of the VPS and then locally check the logs of nginx, it shows the IP of the VM that hosts the wireguard. image

Each service I have is in it's own VM, nginx is in it's own VM, the gameserver is and the wireguard is too. ip_forward=1 on all

Another example with the game service showing the IP of the VM that hosts the wireguard instead of the user IP: image

Script Version

Digital Ocean

VPS wireguard config (/etc/wireguard/wg0.conf)

No response

Local Server wireguard config (/etc/wireguard/wg0.conf)

No response

mochman commented 2 years ago

I don't have my server with me right now, so I can't check to see if I get the same results. But when I get the server in, I will try and figure out a solution.