configure_authentication - logic change for writing resolv.conf
configure_authentication - changed port checking.

Port checking is now done with nc.