We have rules file (/etc/rules):
In FreeBSD 10.x run:
All ok, and run
returns:
All work fine
In FreeBSD 11.0-RELEASE-p3
returns:
And
returns:
Ok. Change the file for FreeBSD 11 (/etc/rules):
returns:
And
returns:
Returns empty table
ipfw(8)
In FreeBSD 11 -q key does not work?
Code:
table 1 delete 1.1.1.1
table 1 delete 2.2.2.2
table 1 add 3.3.3.3
In FreeBSD 10.x run:
ipfw -q /etc/rules
All ok, and run
ipfw table 1 list
returns:
Code:
3.3.3.3/32 0
In FreeBSD 11.0-RELEASE-p3
ipfw -q /etc/rules
returns:
Code:
notfound: 1.1.1.1/32 0
Line 1: Deleting record failed: record not found
ipfw table 1 list
returns:
Code:
ipfw: failed to request table info: No such process
Ok. Change the file for FreeBSD 11 (/etc/rules):
Code:
table 1 create
table 1 delete 1.1.1.1
table 1 delete 2.2.2.2
table 1 add 3.3.3.3
ipfw -q /etc/rules
returns:
Code:
notfound: 1.1.1.1/32 0
Line 2: Deleting record failed: record not found
ipfw table 1 list
returns:
Code:
ipfw table 1 list
--- table(1), set(0) ---
Returns empty table
ipfw(8)
Code:
-q Be quiet when executing the add, nat, zero, resetlog or flush
commands; (implies -f). This is useful when updating rulesets by
executing multiple ipfw commands in a script (e.g.,
`sh /etc/rc.firewall'), or by processing a file with many ipfw
rules across a remote login session. It also stops a table add
or delete from failing if the entry already exists or is not
present.
The reason why this option may be important is that for some of
these actions, ipfw may print a message; if the action results in
blocking the traffic to the remote client, the remote login
session will be closed and the rest of the ruleset will not be
processed. Access to the console would then be required to
recover.
In FreeBSD 11 -q key does not work?