diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install
index 38958aa..a919e23 100644
--- a/core/modules/comment/comment.install
+++ b/core/modules/comment/comment.install
@@ -194,5 +194,15 @@ function comment_update_8300() {
 }
 
 /**
+ * Add new comment settings.
+ */
+function comment_update_8301() {
+  $config_factory = \Drupal::configFactory();
+  $rest_settings = $config_factory->getEditable('comment.settings');
+  $rest_settings->set('log_ip_addresses', TRUE)
+    ->save(TRUE);
+}
+
+/**
  * @} End of "addtogroup updates-8.3.x".
  */
diff --git a/core/modules/comment/config/install/comment.settings.yml b/core/modules/comment/config/install/comment.settings.yml
new file mode 100644
index 0000000..b4824a8
--- /dev/null
+++ b/core/modules/comment/config/install/comment.settings.yml
@@ -0,0 +1 @@
+log_ip_addresses: false
diff --git a/core/modules/comment/config/schema/comment.schema.yml b/core/modules/comment/config/schema/comment.schema.yml
index a55488a..c885a2a 100644
--- a/core/modules/comment/config/schema/comment.schema.yml
+++ b/core/modules/comment/config/schema/comment.schema.yml
@@ -1,4 +1,11 @@
 # Schema for the configuration files of the Comment module.
+comment.settings:
+  type: config_object
+  label: 'Comment settings'
+  mapping:
+    log_ip_addresses:
+      type: boolean
+      label: 'Whether to log IP addresses with comments or not.'
 
 field.formatter.settings.comment_default:
   type: mapping
