Police arrest man with illegal gun