Can a user request the deletion of their IP address that is stored for moderation purposes?
<ul>
<li>An Internet forum logs their users' IP addresses for moderation purposes (fighting abusive sockpuppetry, temporary banning a dynamic IP address range in case of a spam attack, permanently banning static IP addresses in case of persistent toxic behaviors, etc)</li>
<li>An abusive user request the deletion of their IP address from the logs under GDPR</li>
<li>This seems to be in an effort to prevent the moderators from exercising the aforementioned tools, so that the user can abuse the forum undisturbed</li>
<li>Do I need to comply?</li>
</ul>

<p>No. <a href="https://gdpr-info.eu/art-17-gdpr/" rel="nofollow noreferrer">Art. 17(1) GDPR</a> lists conditions when erasure can be requested. None of the listed grounds would apply in this case.</p>

<p>However, you might have to explain why you process the data (for moderation purposes as you explained above), and why that is lawfully. In particular <a href="https://gdpr-info.eu/art-5-gdpr/" rel="nofollow noreferrer">Art. 5</a> and <a href="https://gdpr-info.eu/art-6-gdpr/" rel="nofollow noreferrer">Art. 6</a> need to be taken into account. In your case, processing will be based on Art. 6(1)(f):</p>

<blockquote>
  <p>(f) processing is necessary for the purposes of the legitimate interests pursued by the controller or by a third party, except where such interests are overridden by the interests or fundamental rights and freedoms of the data subject which require protection of personal data, in particular where the data subject is a child.</p>
</blockquote>

<p>Even if the data subject would be a 9 year old child, the legitimate interests of you and other forum users outweigh the objection of the data subject.</p>

<p>Based on <a href="https://gdpr-info.eu/art-5-gdpr/" rel="nofollow noreferrer">Art. 5</a>, there will be a moment when the data has to be deleted. For example 1 year after the last login attempt.</p>

internet gdpr