The ip restricted issue can be solved by relaxing the ip restrictions for the CodeScan connected app in the org you are trying to scan.
To do this follow the below steps:
- Log in to the org you are trying to scan.
- Go to Setup and search for Connected Apps OAuth Usage.
- Install the app that is making the scan (CodeScan Cloud or CodeScan Quick Reports).
- Click Manage App Policies and then Edit Policies.
- Under IP Relaxation select Relax IP Restrictions.
- Re-Run the scan.