Ally McCoist's men will be favourites to progress, since their opponents are currently pointless in League 2, the bottom division of the SPFL.
The full draw was:
Morton v Alloa Athletic
Stranraer v Falkirk
East Fife v Rangers
Peterhead v Livingston
Mark Hateley, the former Rangers striker, said: "I think it could have been a harder draw. Rangers are playing against a young side at East Fife with Gary Naismith starting out on his managerial career so I would say Ally will be happy enough.
"If Rangers turn up on the day and perform as they did against Clyde then it will be a difficult game for East Fife but obviously they've got the home advantage which is a big plus when you're playing against Rangers.
"I think history tells you that Rangers haven't travelled well over the past few seasons so East Fife will have that going for them but I think both sides will be looking forward to it."
Gary Naysmith said: "I'm looking forward to it, regardless of who we got it was going to be a difficult tie.
"We've played Rangers twice since I became manager, they were both close games so it's going to be hard but I think it's one we should look forward to rather than fear."
Alex McLeish, the draw ambassador, added: "It's a great occasion for East Fife but also a pretty tricky game for Rangers.
"It's a cup tie and I know that Ally McCoist wants to win every competition that he's in - he's a real competitor.
"Rangers lost out early in one of the cups last year but I'm sure Ally McCoist will want to win the Petrofac Training Cup this time around.
"I think Rangers will have learned some lessons from last year and there will be pressure on them to win - it's there for the smaller teams to do a giant killing but I do fancy Rangers this year.
"I think the game against Clyde will have given them a lot of confidence."