Dirt is a natural part of an infantryman’s life. He is coated with it, spends a lot of time rolling around in it, gets it in his hair, all over his skin, in his nostrils and every other orifice. It is the bane of his existence. It is also his best friend.
Dirt does an amazing job of stopping bullets. I spent a fair percentage of my time in the field digging holes with just that property in mind. What your Grandpa called a foxhole, we now call a “fighting position”.
And if you can’t dig a hole, because, say, you are in a city, you can fill sandbags with it.
Sandbags are surprisingly good at stopping bullets. A single properly filled sandbag will stop a 7.62mm round from point-blank range. It takes an enormous number of sandbags to defend a position, however. If you have a fairly large area that needs protection, you can use a Hesco barrier. This is a modern take on sandbagging. Basically, it is a series of open bins that you can fill. It works pretty well, and you can use a front end loader to fill them, making it very quick to set up.
In addition to stopping bullets, sandbags and hescos stop RPG rounds, and shell fragments. They also will stop a carbomb by acting as a vehicle barrier, and deflecting most of the blast.