Importance sampling (IS) is a variance reduction method for simulating rare events. A recent paper by Dupuis, Wang and Sezer [Paul Dupuis, Ali Devin Sezer, Hui Wang, Dynamic importance sampling for queueing networks, Annals of Applied Probability 17 (4) (2007) 1306-1346] exploits connections between IS and stochastic games and optimal control problems to show how to design and analyze simple and efficient IS algorithms for various overflow events of tandem Jackson Networks. The present paper carries out a program parallel to the paper by Dupuis et al. for a two node tandem network whose arrival and service rates are modulated by in exogenous finite state Markov process. The overflow event we study is the following: the number of customers in the system reaches n without the system ever becoming empty, given that initially the system is empty. (C) 2008 Elsevier B.V. All rights reserved.