https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292556
Bug ID: 292556
Summary: ipfw: Adding record failed: Inappropriate ioctl for
device
Product: Base System
Version: 15.0-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
I don't know if this is a duplicate, the message seems to appear quite often.
What I do (for many years already, the message just showed up with FBSD 15) is
to load a List from AbuseIPDB, build a shell skript from the content and start
it.
This works well when started from a real shell manually, but if run from cron,
it creates the error message for every line of the script.
(Note, the entries are still added, the message is just annoying)
+ ipfw table 2 flush
+ ipfw table 2 add 18.211.148.239
ipfw: Adding record failed: Inappropriate ioctl for device
added: 18.211.148.239/32 0
+ ipfw table 2 add 192.3.179.41
ipfw: Adding record failed: Inappropriate ioctl for device
added: 192.3.179.41/32 0
+ ipfw table 2 add 193.24.211.200
ipfw: Adding record failed: Inappropriate ioctl for device
added: 193.24.211.200/32 0
+ ipfw table 2 add 115.133.68.171
ipfw: Adding record failed: Inappropriate ioctl for device
...
(the remaing 1000+ lines are the same, so no need to list them here too)
The script (head) is really simple:
#!/bin/sh
ipfw table 2 flush
ipfw table 2 add 18.211.148.239
ipfw table 2 add 192.3.179.41
ipfw table 2 add 193.24.211.200
ipfw table 2 add 115.133.68.171
ipfw table 2 add 160.22.123.78
it is executed from a python script with a line like:
subprocess.run('/bin/sh -x /tmp/ipfwtable2.sh', shell=True)
(of course, the "-x" is just for debugging now, it is usually "+x"))
Of course I could tell cron to throw away the output, but I want to be noted
about possible errors that can result from wront entries in the list. So this
is not a good option.
--
You are receiving this mail because:
You are the assignee for the bug.