Hello, I had issues with CGNAT and wanted to bypass it using WireGuard and all was fine but I wanted my PC to see the remote address of people connecting to me but I couldnt find anything on the internet here is how I solved it:
- Add another VNIC to my instance (for seperation, not needed)
- Add chosen ports in security lists and UFW
allow to {interface_ip} port {port} - Allow forwarding from wg0
route allow in on wg0and allow connecting to wg0allow in on wg0 - Forward a port:
- Set up wireguard with keys and peer ips on server and 'client'
- Paste this PostUp PostDown pair, replace
vpn_interface_namewith the interface name you want your users to connect to androuting_table_nameto name of the table that has this interface as default route: