Yes, that will work because you are on the same local network. To connect from the outside network, you have to use the public ip address.