Yes, you probably have to change server settings.
And yes, you may have to open a port.
On your Ubuntu Server, you need to look at how you are starting the Derby Network Server. In particular, you need to look at the '-h' argument to the Network Server. By default, the Network Server will listen on "localhost", which means that you can't connect from any other machine.
http://db.apache.org/derby/docs/10.10/adminguide/tadmincbdjhhfd.html
Note that this is done for security reasons, so if you change the Derby Network Server to allow connections from other machines, you need to ensure that you have an appropriate security configuration to make this safe.
For example, if you have a firewall protecting your Ubuntu Server, you indeed will have to open port 1527 to allow connections to reach the Network Server.
Here are some notes on security settings for the Network Server:
http://db.apache.org/derby/docs/10.10/adminguide/cadminnetservsecurity.html