Upvote:1
InterRail implies that you are an EU or EEA citizen, as only Europeans of countries that are within the system can buy the rail pass, as well as citizens of some Western European mini countries. If so, you can use your passport to the last day of its validity and in some cases you can travel home on an expired passport.
As Relaxed mentions in the comments, there are people who can buy the pass and are not EU/EEA citizens. If you are one of them, you will have to check out which rules apply to you.
When you want to go to countries that are not in the EU-EEA area, you will have to check which countries require longer periods of validity. This page shows the InterRail countries, this one the EU and EEA countries.
But some countries allow you to renew your passport early giving you the time left as extra time on your passport. You might feel better if you do that before you travel.
Upvote:2
If you are an EU citizen and travelling within the EU, your soon-to-expire passport will be enough. If you are not an EU/EEA/Swiss citizen and travelling to the Schengen area, you do in fact need a passport whose validity extends at least three months after the end of your trip and your current passport is not enough.
Those two simples rules cover about 30 countries and many InterRail users but the rules might be different if you are in another situation, e.g.
If that's your case, then you need to provide more details on your plans and situations to get a more specific answer.