The difference between Linux Firewall reject and drop __linux

Source: Internet
Author: User

The policy action within the Linux firewall has reject and drop two, the difference is as follows:

1. The Reject action will return a reject (termination) packet (TCP fin or udp-icmp-port-unreachable), explicitly rejecting the other's connection action.

The connection is disconnected immediately, and the client considers that the host being accessed does not exist.

Reject there are some return parameters in the Iptables, as follows: ICMP port-unreachable, ICMP echo-reply, or tcp-reset (this packet would require the other person to turn off online), and after this processing action, will no longer compare to other rules, directly interrupt the filter program.

2, the drop action is simply to discard the data directly, does not feedback any response. The client waits for the timeout, and the client finds itself blocked by the firewall.

As for the use of drop or reject more appropriate has been inconclusive, because it is true that both have a suitable occasion:

1, reject is a more consistent with the standard of processing, and in a manageable network environment, more easily diagnose and debug network/firewall problems;

2, DROP provides a higher firewall security and a slight increase in efficiency, but because drop is not very standard (not very good with the TCP connection specification), it may
cause some unpredictable or difficult problems with your network. Because drop, although it unilaterally interrupts the connection, does not return any rejection information, the connection client waits passively for the TCP session timeout to determine whether the connection was successful, so there are problems in the early enterprise internal network, such as some client programs or applications that require Ident protocol support ( TCP Port 113, RFC 1413, if the
Firewall has not been notified that the drop rule is applied, all of the same connections will fail, and due to timeout, it will be difficult to tell whether the problem is caused by a firewalls or network device/line failure.

Note: When deploying a firewall, it is best to use a more gentlemanly reject
method for networks that are internal to the enterprise (or partially trusted), as is the case for a network that requires frequent changes or debugging rules, and for dangerous internet/extranet firewalls ,
It is necessary to use a more brutal but secure DROP method, to some extent delaying the progress (and difficulty of the hacker attack, at least, drop
can allow them to tcp-connect the port scan longer).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.