22 illegal foreigners and four locals were nabbed in four separate raids at two gambling dens and two message parlours in Kepong, Pandan Jaya and Pandan Indah.