Yes, having one static public IP (licensed by DA) is mandatory for DA to run J This thing cannot be changes no matter how hard you try...
Yes, router does NAT, port forwarding etc to the private non-routable IP...
Forwarding port 2222 will not do the job as most of conf files in DA are set to use IP-based configuration, so a public IP is needed on the server as well, otherwise, major changes are needed (like proftpd.conf, httpd.conf - virtualhost etc...) . My plan for the future is to setup DA in cluster environment with load balancers controlling the traffic, and that involves more configuration files changes...
What I did (and before I start, I know it’s against TCP/IP specification) but as long as you control your routing in a way I does not cause any issues in the network, for testing purpose is fine.
1. Server IP 192.168.1.50 (this allows you to install DA as long as you public IP is licensed)
2. NAT / DMZ / port forwarding on the ADSL router (whatever you prefer)
3. Added public IP on the server as well on second interface. This is the point at issue, as you should not use same IP on 2 different devices in the same network...but...in this scenario this is a different segment, and as long as you set the routing in a way there is no loop and packets are not confused, this will work with no issues
4. As the router is forwarding traffic to the private IP, I added iptables rule on the server so all packets are routed to the second interface with public IP (this is for standard DA IP-based virtuals configuration to work). But before that, make sure default routing for public IP from the server, stays on the server!
5. Last thing to do is swap private IP to public IP in configuration files, as during installation, DA setup.sh set it to 192.168.1.50
This was the easiest and quickest solution for me, without getting into DA configuration too much. I will definitely revise it and try to modify DA to run based on domain names, but before that need find out how DA works in the background.
I find DA a really go package, but the only missing thing for me is not to be able to run DA in cluster mode (straight off the shelf)....but this where IT knowledge comes handy and what we (IT people) are for
