Posh will host League One rivals Southend United in the last 32 of the Checkatrade Trophy.
The tie will take place week beginning December 4.
Posh drew 1-1 at Southend in a League One match last month. Southend won 4-1 at Posh in a League One match last season.
Posh have met Southend five times in knockout competitions and lead the series 3-2.
Full draw: South: Group C winner v Forest Green, Gillingham v Oxford, Group D winner v AFC Wimbledon, Portsmouth v Northampton, MK Dons v Group D runner up, POSH v Southend, Luton v Group C runner up, Swansea Under 21s v Charlton.
North: Port Vale v Shrewsbury, Rochdale v Doncaster, Fleetwood v Group F runner-up; Blackpool v Mansfield, Walsall v Bury, Lincoln v Accrington Stanley, Scunthorpe v Leicester City U21s, Group F winner v Oldham.