Comment on Retain source IP when proxying through VPS
themoonisacheese@sh.itjust.works 11 months agoSo to be clear, you want traffic coming out of your VPS to have a source address that is your home IP?
let’s go back to fundamentals and assume for a second that your VPS provider allows these packets out and your VPS initiates a TCP connection like that. It sends a TCP SYN with source: home address and dest: remote.
The packet gets routed to the remote. The remote accepts and responds SYN/ACK with source: remote and dest: home address.
Where do you think this packet will get routed? When it gets there, do you think the receiving server (and NAT gateways in between) will accept this random SYN/ACK that doesn’t appear to have a corresponding outgoing packets sent first? If so, how?
adam@doomscroll.n8e.dev 11 months ago
No that’s not how I read it at all. He wants his VPS to act as a NAT router for email that routes traffic through a wireguard tunnel to the mail server on his home network. His mail server would act as if it was port forwarded using his home router, only it won’t be his home IP, it’ll be the VPS’s