get IPs from db