Since the US invasion of Iraq in 2003, Dohuk is one of the few places that remains safe for foreign visitors. Iraqi Kurdistan, except Mosul and Kirkuk, is safe to go to. As a foreigner, you can walk the streets safely. Although some may stare, their stares are those of confusion as Iraq is the last place most tourists go and as the Kurdish north was isolated for so long, there never was any history of tourism.
Westerners can walk and talk freely although it is possible the police or military may question you and ask for identification. Unlike other countries, this isn't a scam and they don't want money. Given the violence in the rest of the country, all non-Kurds are distrusted and checked. Don't take it personally. The stares are from the past, people of Dahuk are well used to foreigners so don't worry about it; in fact there are some westerners who live there like retired Americans or those who work for goverment.If you are male you will almost certainly be asked if you are a member of the Coalition forces.