By default there is a cookie consent iin DNN : Site settings - Site behavior - Privacy.
The exact functionality has been improved in several versions. I'd recommend to upgrade DNN as a first step. If there are still issues, you can log them in Github.
Having said that: I doubt that you are required to track IP as that is one of the parameters that should be anonimized. For example Google analytics als has the option to not log the IP. But I am no lawyer :-)