Use the «Stores» → «Configuration» → «Developer» → «Developer Client Restrictions» → «Allowed IPs (comma separated)» backend configuration option:
If you have a multistore Magento 2 installation then you can set up the whitelist per a store individually.