The real-life basis for the "Fore and Aft" Regiment might be a nickname of the Gloucestershire Regiment, which has a cap badge on the front and back of its headdress. This is a battle honour earned when the regiment faced off two forces of enemy French troops at the Battle of the Nile by standing its companies back-to-back. Kipling was probably playing cute by using a real regiment's nickname to provide realism but giving it a cover name to prevent embarrassing the real regiment.