Lighter than air ships have been used since the late 19th century in warfare: being slow and easily spotted how did they defend against infantry and artillery fire?
Short answer is they did. One Zeppelin, I don't recall the number, was shot down by Russian artillery during the Battle of Tannenberg. LZ48 (I believe, going from memory) was shot down over the Thames estuary by British AA fire from the ground.
The Zepellin's main advantage was altitude. This is at a time before radar, so hitting a long but skinny target 10,000+ feet in the air was harder than it would seem. Infantry weapons couldn't possibly reach that high, so the only solution was for dedicated AA artillery on the ground to aim as best they could and fire away en masse. Plus, they often operated at night, making hitting them from the ground even more difficult.
Also, I don't recall any Zepellins shot down in flames by ground fire. Hits by AA artillery wasn't necessarily fatal because the rounds were not incendiary, and would usually cause a leak at best. It was only when this leak was too much to deal with that the Zeppelin would go down, often gently. What really eliminated the Zeppelin threat was the advent aircraft with more powerful engines, that could climb to their altitude and engage them with rockets and incendiary bullets, both of which involved a great deal of fire to ignite hydrogen.
Read The Zeppelin in Combat by Douglas Robinson if you're interested in the topic.
This program will explain it.
http://www.pbs.org/wgbh/nova/military/zeppelin-terror-attack.html
The short answer is that it was surprisingly difficult to effectively down a Zeppelin. Normal bullets just went through it and didn't do enough damage (didn't light it or put big enough holes in it). The Brits had to invent a special way where 2 different kind of bullets were used alternating as u/CptBigglesworth explains below.
It would be really hard to get an accurate trajectory with a heavy ground unit. Bullets like you mentioned from Infantry would 1. Not have the range, and 2. Not be able to do anything if they did hit at all.
When the British first started their anti-zeppelin measures they found that the upward facing lewis machine guns had almost no effect, as there was so much gas that simply puncturing the gas bags, (which were made of cow intestines, the more you know).
They eventually invented a incindiary round which used a phosphor core which burned when a solder plug melted in the muzzle. However it did nothing to the zeppelins as well due to the low presence of oxygen in the bags.
Eventually they devised a really clever explosive round design which, combined with the incindiary round would, when concentrated allow the proper oxygen mixture and cause ignition. This really marked the end of effective Zeppelin bombings.
http://www.pbs.org/wgbh/nova/military/zeppelin-terror-attack.html