Added code for getting private and public IPs