The setting is a generally nondescript mid-medieval vaguely European society. No magic is present, except what is explicitly discussed in this question.
Twenty kingdoms, connected by trade routes but distant enough to have mostly segregated politics, are functioning as normal one day. The next, a giant tower explodes through the ground in the dead center each of their largest cities, killing civilians and destroying buildings.
The towers are met with (obvious) concern, but eventually several kingdoms discover that each tower has a doorway (wide and tall enough that two trade wagons abreast can comfortably, and easily pass through), and in fact each tower has exactly one doorway, with no other openings whatsoever. Some brave (or foolish) explorers determined that, by magic, through a series of large empty rooms these doorways connect with the other kingdoms' towers.
The towers appear to be perfectly indestructible. If the doors are barred from the outside they are impossible to open from the inside (although just like normal doors or gates, they cannot be instantly closed). There is nothing to be found in the towers' rooms, just empty slate floors, marble walls and ceilings, and great openings interconnecting them.
Traveling from one doorway to another is a matter of hours, instead of the weeks or months of travel required to travel between the kingdoms previously.
They've just discovered a means to drastically, drastically reduce the time to move trade, people, and potentially armies.
Assume most of the kingdoms aren't stopped by superstition.
Specifically dealing with trade and defense against invasion, what would an intelligent, sensible policy for a kingdom to adopt in this situation? What is the best policy to balance the advantage of trade with defense of the kingdom with this new opening (effectively forcing twenty of the largest cities under different kings to share borders)?