You can do this one of 2 ways. You can switch off the site entirely to guests, so they have to log in. To do that, go to the guest group and edit, then switch off "can access site".
Alternatively you can change the permissions on your forums to remove guest access
https://invisioncommunity.com/4guides/how-to-use-ips-community-suite/managing-members/member-permissions-r305/