cutting a small hole in lid and bottom and then running a chain thru that way and around a tree would be MY suggestion on HOW to secure it
and then cutting a smaller hole in one side to add bait would be my suggestion too
just think about size of hole, don;t want a cub to get stuck inside, yet also don't want too large a bear can pull everything out too easy!
also make sure the barrel didn;t used to hold any chemicals or harmful things, you can poison animals that eat out of it, a well, as the odors can scare away possible animals too!
food grade drums are out there if you look!