3

I know how REJECT and DROP chain works. But, as I read here REJECT vs DROP when using iptables, user Dagelf said that the server still replies with TCP SYN/ACK.

Does the scanner knows that a packet is dropped when the firewall is using DROP?

1 Answer 1

5

If you reject the packet, you reply to the incoming SYN with a RST packet, so the scanner knows the port is closed (via reject, or because no service is running on that port).

If you drop the packets, the scanner waits, and after some time (timeout), it assumes the packets have been dropped (although, they may be lost in transit, or the machine on the far end could be down, or anything else could happen, that would trigger a no-reply scenario).

6
  • Basically, if there is no open port, the scanner would not make a difference between a server that is offline and a server that is using DROP on all ports? Apr 16, 2014 at 11:33
  • Exactly (if all ports were "closed" by DROPping the packets). That's why some scanners (eg. nmap), first do a ping test (if not disabled with -P0)
    – mulaz
    Apr 16, 2014 at 11:34
  • this is inconsistent with serverfault.com/a/564774/87556
    – andresp
    Feb 12, 2015 at 13:12
  • and this: unix.stackexchange.com/a/109462
    – andresp
    Feb 12, 2015 at 13:14
  • @andresp it is consistent.
    – sjas
    Jul 24, 2015 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.