Mash the bananas in a bowl until smooth.
Stir in the oats, honey, melted coconut oil, vanilla, cinnamon, salt, and baking soda. Mix well.
Fold in walnuts if using.
Lay a 12x18-inch sheet of heavy-duty foil on a flat surface. Lightly grease the center.
Spoon the batter onto the foil and shape into a 6-inch log. Fold the foil tightly into a sealed packet, leaving a little room for expansion.
Place the packet on a grate over low campfire coals (or on a camp stove at the lowest heat). Cook for 18-22 minutes, rotating every 5 minutes.
Carefully open the packet (steam will escape). The bread should be firm and golden. Let cool for 5 minutes before slicing.
Slice and serve warm, or wrap back in foil for a trail snack.