Scotland will host Austria while Wales will host Bosnia-Herzegovina in the World Cup play-offs.
Wales and Scotland have to win their one-legged matches to get to the finals.
If Wales wins, they will face Switzerland in the play-off finals.
Scotland will play the Republic of Ireland in the final.
The winner of the play-offs will get to play in the World Cup, while the loser will play in an inter-Confederation play-off.
Wales will play in the World Cup finals for the first time after securing second place in their group.
Scotland finished second to Spain in the group.
The Faroe Islands were thrashed by six goals in their final qualification match.
There are seven other teams in the European play-offs.
The play-off finals for the best three teams will be held on 11 October.
The winner of the Portugal and Belgium semi-finals will play in the final.
The two best-ranked final winners will head to the World Cup, with the other two going into the inter-Confederation play-offs in New Zealand.
Three World Cup spots will be up for grabs in the play-offs.
The winner of the European play-off will face one of the other teams in a one-off final.
Scotland missed out on the European Championship after finishing third in their group in the World Cup.
Belgium are 19th in the world rankings and are the weakest team in the European play-offs.
Switzerland and Austria are ranked 21st and 20th respectively. The Republic of Ireland is ranked 26th, with Portugal 27th and Wales 30th.