I currently have my OUTPUT chain set to DROP. I'd like to change it to REJECT, so that I have a clue that it's my firewall stopping me from getting somewhere rather than a problem with whatever service I'm attempting to access (immediate reject instead of timing out). However, iptables doesn't seem to care for this. If I manually edit my saved rules file and try to restore it, I get
iptables-restore v1.4.15: Can't set policy 'REJECT' on 'OUTPUT' line 22: Bad policy name and it refuses to load the rules. If I attempt to set this manually (
iptables -P OUTPUT REJECT), I get
iptables: Bad policy name. Run 'dmesg' for more information. but there's no output in dmesg.
I've confirmed the appropriate rule is compiled into the kernel and I've rebooted to ensure it's loaded:
# CONFIG_IP_NF_MATCH_TTL is not set CONFIG_IP_NF_FILTER=y *** CONFIG_IP_NF_TARGET_REJECT=y *** CONFIG_IP_NF_TARGET_LOG=y CONFIG_IP_NF_TARGET_ULOG=y
(Asterisks added to highlight applicable rule)
Everything I can find states that REJECT is a valid policy/target (in general), but I can't find anything that says it's not valid for the INPUT, FORWARD, or OUTPUT chains. My Google-fu isn't helping. I'm on Gentoo, if that makes any difference. Anyone here have any insight?