I solved!
The problem was the JBoss -b option. The out of the box build.xml starts JBoss with the option -b localhost but to access JBoss of this remote machine I have to use -b 0.0.0.0 as specified in https://community.jboss.org/wiki/JBossRunParameters