The seven men then abandoned their vehicle and fled into an agricultural area in Tuban, in East Java.
Police arrested one member of the group alive.
Police claim the attackers were part of the of IS-linked Jamaah Ansharut Daulah (JAD) network, which has been blamed for a series of recent attacks in Indonesia including one in Jakarta last January.
Numerous recent IS-linked plots in Indonesia have been botched or foiled, with analysts saying that many of the country’s militants lack the capacity to launch serious attacks.
A sustained crackdown weakened the most dangerous networks but the emergence of IS has proved a potent new rallying cry for radicals.