I am creating my own Cryptonote coin for a specific, business need. Can I only allow certain IPs to mine on it?
A typical blockchain does not include this kind of access control. This includes Cryptonote. However, you can easily add something similar.
Now, daemons could be made to sync only from the set of IPs you specify. If all the allowed IPs are set to only connect to other IPs in the set (for example using --add-exclusive-node), and set to disallow connections from other IPs, then you will achieve this, absent an attacker.
However, this is fairly brittle, as a single peer managing to connect to one of these allowed IPs will open the floodgates to a new blockchain. Moreover, you might want external IPs to have a "read only" view of the blockchain, so you might well want yourself to have your allowed IPs connect to external IPs for blockchain distribution.
A better way is to allow not by IP, but by public key cryptography. The high level steps are:
- create a key pair
- give all allowed miners the secret key, which they should keep secret
- give any node asks the public key (ie, include it in the source code)
- when mining, add a signature of something (say, nonce plus block height) in the coinbase tx's extra field
- add a consensus rule that checks this signature is valid
Then mining is limited to those who have the secret key.