Recent communication networks are commonly protected against random failures, i.e. being the results of forces of nature, human errors, or hardware faults. In simulation experiments, network topologies are often assumed to be more or less regular. Known mechanisms typically refer to the case of unicast traffic protection. However, owing to the observed convergence of technologies/services, the importance of other transmission techniques (e.g. anycast, or multicast) has been increasing. Moreover, it turns out that neither failures of network elements are only the results of random faults, nor topologies of real networks are purely regular.In this paper we introduce a novel technique, called RA (the abbreviation for "resistant-to-attacks") of protecting the anycast and unicast flows against attacks on irregular networks. In particular, we propose a new metric of link costs to be used in working path computations with the objective to avoid traversing the nodes of high degree (i.e. vulnerable to attacks). The extent of losses after attacks is further decreased by locating the anycast replica servers at low-degree nodes.The ILP model for joint optimization of anycast and unicast flows has been formulated and followed by the time-efficient heuristic algorithm. Path protection scheme for the case of protection against a single node failure is assumed. For each anycast demand, working and backup Simulation results confirm that our approach provides a remarkable decrease (up to 7.47 times) in terms of the total number of connections broken due to attacks, compared to the results for the common case of locating the replica servers at high-degree nodes, and utilizing the metric of distance to find both working and backup paths.