Why don't you add a condition inside java, will be more easy, also your conditions for XML you should found them inside java too. A search inside will always help you, make a search for an already known condition
Only external on both sides should be your external ip and thats mean your " no-ip " for internal put 127.0.0.1, ports keep default
in l2.ini put your no-ip
If you know to create a db scrip then, you have to be sure your computer with database have port 3306 allowed in firewall for outside connection then in your db conection script you have to enter ip of computer user / pass...