-p tcp -j REJECT --reject-with tcp-reset -p udp -j REJECT --reject-with icmp-port-unreachable
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
The purpose of these is to make a client that tries to connect to these ports realize immediately that the server isn't running, and report the error to the user, rather than keep retrying until it times out.
RST is a flag sent by a machine when there's no server process listening on a particular TCP port, and
ICMP Port Unreachable is the analogous response for UDP ports.