If you are travelling with a paper Eurail or Interrail Pass, the square barcode that opens the gates is on the back of the ticket cover. When travelling with a mobile Eurail or Interrail Pass, the barcode can be found on the pass in the Eurail Railplanner App.