so in latest part of my self hosting adventures, i’ve decided to run a mailserver.
after reading around It seemed an enterprise ip with good rep was necessary so I got a vps with a good ip and decided to use that as my public ip.
so my current setup is
mailcow(local) >> OPNsense(local) >> VPN (wg, ovpn and zt) >> VPS (running ubuntu server - iptables)
what my plan is for opnsense to forward everything from mailcow’s ports to the vps to then go out via my public ip
AND
for the vps to forward all incoming packets from mail releted ports back to mailcow.
I have looked around and there are some guides out there but I wasn’t having much success with my setup.
my main question is what should happen to a packet’s ip header in transition between networks ?
also do note I run a local Haproxy reverse proxy on my opnsense box (to be able to resolve mail.domain.com locally, there is an override set inside local unbound that forwards local mail.domain.com to HAproxy)