Duct-tape, you'll notice in the first shot. But you basically have to make sure that any opening is smaller than the beak, the only part of its body that is solid.
Very, very nice. My fav LFS just got a really young specimen with a 1" mantle and arm lengths of 6". It lives in a hamster ball floating in their reef tank atm.
I have arrowed the mantle on an octo, for ease of viewing..The mantle is not exactly the head, per say, of the octopus, but rather what it uses to breathe, store body componants et cetera...
**To add, yes, they are very good escape artists...