The invention relates to a method for defending against a Denial of Service attack, the method comprises: monitoring data traffic; detecting that at least one source computer is involved in a Denial of Service attack; in response to the detection generating at least one data frame by modifying at least one data frame obtained from the data traffic transmitted from the at least one source computer so that a plurality of data fields representing address information of the host server as a source of the at least one generated data frame are set to correspond to address information of the at least one source computer; transmitting the generated data frame to the source computer. The invention relates also to a network device and a computer program product.