As already mentioned, just putting a nut on the inside of leg bolt would make the bolt not removable without opening up the cabinet.
Especially if you used a nyloc nut, the threaded bracket in the cabinet would probably just get stripped out if someone went crazy with a wrench but the nyloc would just turn with the bolt and not come off.