Get you a couple of 5 gal buckets from Lowes, the tops are waterproof therefore airtight. Drop a good sized chunk of dry ice or 2 in the bottom of a trash bag along with a few O2 absorbers and moisture absorbers (overkill with those). Put the bag in bucket, pour in rice, tie bag closed with a small hole in it (or it will pop), place lid on bucket with a small section not sealed for air to escape. Let stand overnight and DO NOT TOUCH IT the CO2 is heavier than the O2 and will displace the O2. The next morning seal the lid down. Now your rice is packed in CO2 environment at appx 9095% CO2. and the residual O2 will be absorbed along with any moisture. This will keep any of the bug eggs in the rice from hatching, kill any bugs that could be in it and prevent fungal growth. The rice then should be good for at least 5 years. The same thing can be done with beans or other dry grains. Mice or whatever aren't going to eat through the bucket and bugs can't get in.
I use an old painter's trick. First I freeze the rice, then I put it in 16 oz plastic drink bottles, tight, then I blow CO2 into the bottle and seal. Painter's exhale into paint cans before sealing them. The CO2 in the breath keeps a skim from forming across the paint.