The domain is easy to forward, the port is not. In my mind the only thing I can think of is to just leave both ports open. On your firewall in front of the SC server port forward 8040 external to 80 internal on your server.
Please do note that 8040 is not really the port that the unattended clients use, they will use 8041 with the default install.