Excluded owned IP's inside Matomo

I try to exclude IP’s inside Matomo. Which procedure is the correct one (inside Matomo admin or Javascript)?