Make sure you have Bridged networking installed when installing VBox.
Then, select "Bridged adapter":
This will make sure VBox is able to attain it's own IP address in the current host machine's subnet (instead of being behind an emulated NAT).
Adjust the IPv4 config of the guest OS as desired (if you have a LAN with a DHCP server, no further config).
EDIT: this method allows both local and remote connections. Default config (NAT) allows connections to services in the VM on localhost, if I recall it right…