Newport County's first FA Cup third-round appearance as a reformed club will be at home to Championship side Blackburn Rovers.
Monday's third-round draw also pitted Swansea City away to current League Two leaders Oxford United, while Cardiff will host either Grimsby or Shrewsbury.
The ties will be played between 8-11 January 2016.
Cardiff are Wales' most successful FA Cup side, winning the 1927 competition and reaching the 1925 and 2008 finals.
Swansea lost 3-1 at Newport's opponents Blackburn in the fourth round last season.
The Exiles, who last appeared at this stage of the competition in the 1985-86 season, earned their home tie against Rovers with a 1-0 win at Barnet on Saturday.