I'm currently working through the Linux Firewalls book and
have a set of rules setup which dictate rules to follow around every STATE
except for NEW
and I prefer being explicit when I'm writing code/config/whatever.
The rules in question:
26 $IPTABLES -A INPUT -m state --state INVALID -j LOG --log-prefix "DROP INVALID " --log-ip-options --log-tcp-options
27 $IPTABLES -A INPUT -m state --state INVALID -j DROP
28 $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Now I'd like to just specify the NEW
state rules as well, to be clean.
In particular I'd like to just DROP
NEW
connections, at this stage I get why we'd ACCEPT
ESTABLISHED
and RELATED
connections. But I'm unsure if I'm causing a headache by doing a DROP
or REJECT
on NEW
. My thought process is that I won't have an issue, because I don't want random stuff trying to start connections with me, and I would imagine that because I have an intro rule of:
$IPTABLES -A INPUT DROP
That I'm already doing the DROP
on NEW
.
Can someone confirm if my thought process is correct here?