MickS is right, if there are foxes in the area then there is no real way to keep your rabbit safe if you leave it alone in the garden. Keeping it under close supervision may help ensure its safety, but if the foxes have little or no fear of humans (very likely if they're around the garden) then they may still try to attack it. Rabbits are natural prey for foxes, and they certainly don't differentiate between pets and wild animals. If your rabbit needs some time out of protected areas where you control what goes in and out, consider training it to a harness and leash. Not all rabbits will go for it, but it makes it much safer to take your rabbit for a walk, and much easier to keep it close and easily pick it up if a fox, dog, or other animal threatens it.