THE RAILWAYS ACT, 1989 – Chapter XV – Section 156
156. Travelling on Roof, Step or Engine of a Train
If any passenger or any other person, after being warned by a railway servant to desist, persists in travelling on the roof, step or foot board of any carriage or on an engine, or in any other part of a train not intended for the use of passengers, he shall be punishable with imprisonment for a term which may extend to three months, or with fine which may extend to five hundred rupees, or with both and may be removed from the railway by any railway servant.
Forward reference⇒ Section 157