Civil disobedience is illegal by definition. DDoS attacks are illegal. Marching down the middle of the street is illegal. But are these acts immoral?
Marching down a street and merely disrupting traffic is thus quite legal, however, if your marching causes dangerous disruptions to traffic (i.e., accidents), then it is not.