You are not logged in.
I'm creating my firewall rules on FirewallBuilder and I noticed it has an "anti spoofing rule" it creates as RULE_0. I'm copying the compiled rules and trying to create a rules file but that rule_0 is not being accepted.
iptables -A INPUT -i enp0s7 -s $i_enp0s7 -j In_RULE_0
iptables -A In_RULE_0 -j LOG --log-level info --log-prefix "RULE 0 -- DENY "
iptables -A In_RULE_0 -j DROP
The output is
Bad argument `In_RULE_0'
Try `iptables -h' or 'iptables --help' for more information.
The compiled version with all other commands:
# ================ Table 'filter', rule set Policy
#
# Rule 0 (enp0s7)
#
echo "Rule 0 (enp0s7)"
#
# anti spoofing rule
$IPTABLES -N In_RULE_0
for i_enp0s7 in $i_enp0s7_list
do
test -n "$i_enp0s7" && $IPTABLES -A INPUT -i enp0s7 -s $i_enp0s7 -j In_RULE_0
done
for i_enp0s7 in $i_enp0s7_list
do
test -n "$i_enp0s7" && $IPTABLES -A FORWARD -i enp0s7 -s $i_enp0s7 -j In_RULE_0
done
$IPTABLES -A In_RULE_0 -j LOG --log-level info --log-prefix "RULE 0 -- DENY "
$IPTABLES -A In_RULE_0 -j DROP
Some have suggested I put my IP address in there, but that would required extra work considering my IP changes many times a day.
Last edited by Amanda S (2014-10-12 04:00:50)
If it ain't broke, you haven't tweaked it enough...
Offline
That probably means the chain has not been created yet. Create the chain prior to referencing it with:
iptables -N In_RULE_0
You can see if the chain exists with
iptables-save | grep In_RULE_0
Offline
Solved. Instead of using
-s $i_enp0s7
use
-s my-hostname
so
iptables -A INPUT -i enp0s7 -s junior -j In_RULE_0
Last edited by Amanda S (2014-10-12 04:00:30)
If it ain't broke, you haven't tweaked it enough...
Offline
That probably means the chain has not been created yet
I was created already. Thanks.
If it ain't broke, you haven't tweaked it enough...
Offline