Where do I find the comment IP address?
IP addresses are stored in the hostname field of the comment entity (which you'd usually find in the comment_field_data table).

This functionality is disabled by default, though (see Stop logging comment IP addresses by default). To enable it, it looks like you need to set the config manually, e.g.

 \Drupal::configFactory()-&gt;getEditable('comment.settings')
   -&gt;set('log_ip_addresses', TRUE)
   -&gt;save(TRUE);


After running that, IP addresses will start being logged in the hostname field.