Date: Sat, 11 Oct 2025 21:04:58 +0200 (CEST) From: Ronald Klop <ronald-lists@klop.ws> To: A FreeBSD User <freebsd@walstatt-de.de> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: ipfw: ipfw: Adding record failed: Inappropriate ioctl for device Message-ID: <1720635174.15495.1760209498568@localhost> In-Reply-To: <20251011155130.47db5448@thor.sb211.local>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_15494_1894220882.1760209498563 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Are you sure the /sbin/ipfw binary is also from 15-STABLE? Regards, Ronald Van: A FreeBSD User <freebsd@walstatt-de.de> Datum: 11 oktober 2025 15:52 Aan: FreeBSD CURRENT <freebsd-current@freebsd.org> Onderwerp: ipfw: ipfw: Adding record failed: Inappropriate ioctl for device > > > > Hello, > > running a small home brewn firewall appliance based upon FreeBSD 14-STABLE and IPFW, I > switched the base to 15-STABLE (FreeBSD 15.0-STABLE #5 n280665-6eb4708a84d7: Sat Oct 11 > 09:08:00 CEST 2025 amd64). > > Now I face a serious issue with formerly flawless running skripts filling ipfw tables and the > readynes of the system after a reboot. > > tables: > creating some named tables. > Having a list of IPv4 and IPv6 addresses that needed to be blocked, like VoIP Blacklist with > over 35k lines. Each line (IPv4) is > > X.X.X.X/CIDR > > Shell is /bin/sh. > > Reading the file and filling the table like shown below; > tbl_block=foo > > #/usr/bin/env sh > ipfw table $tbl_block create type addr or-flush > while read -r line > do ipfw table $tbl_block atomic add $line > done < /some/path/to/block_file.txt > > The block_file.txt looks like > > [...] > 45.143.220.228/32 > 68.64.211.117/32 > 113.141.70.204/32 > 77.247.110.245/32 > 103.211.36.18/32 > 156.96.63.238/32 > 185.53.88.2/32 > 185.53.88.14/32 > 52.8.201.128/32 > 113.141.70.184/32 > 115.236.54.2/32 > 50.17.48.216/32 > 77.247.108.138/32 > 77.247.110.216/32 > 171.76.62.142/32 > 77.247.110.227/32 > 62.4.15.163/32 > 158.69.242.200/32 > 185.53.88.129/32 > 102.165.39.82/32 > 103.231.139.130/32 > 69.142.172.14/32 > 148.76.71.148/32 > 82.70.244.121/32 > 77.247.109.72/32 > 52.41.52.34/32 > [...] > > While running the skript, each time an address is picked up and inserted to the table, I see > this on the console: > > [...] > added(reverted): 45.143.220.228/32 0 > ipfw: Adding record failed: Inappropriate ioctl for device > added(reverted): 68.64.211.117/32 0 > ipfw: Adding record failed: Inappropriate ioctl for device > added(reverted): 113.141.70.204/32 0 > ipfw: Adding record failed: Inappropriate ioctl for device > added(reverted): 77.247.110.245/32 0 > ipfw: Adding record failed: Inappropriate ioctl for device > > I never saw this happen on 14-STABLE with the very same scripts. What is the cause of this > ioctl issue? > > Thanks and kind regards, > > Oliver > > > > > > > -- > > A FreeBSD user > > > > > > > ------=_Part_15494_1894220882.1760209498563 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <html><head></head><body>Hi,<div><br></div><div>Are you sure the /sbin/ipfw binary is also from 15-STABLE?<div><br></div><div>Regards,</div><div>Ronald</div><div><br></div><div><br><p><small><strong>Van:</strong> A FreeBSD User <freebsd@walstatt-de.de><br><strong>Datum:</strong> 11 oktober 2025 15:52<br><strong>Aan:</strong> FreeBSD CURRENT <freebsd-current@freebsd.org><br><strong>Onderwerp:</strong> ipfw: ipfw: Adding record failed: Inappropriate ioctl for device<br></small></p><blockquote style="margin-left: 5px; border-left: 3px solid #ccc; margin-right: 0px; padding-left: 5px;"><div class="MessageRFC822Viewer" id="P"><!-- P --> <!-- processMimeMessage --><div class="MultipartMixedViewer"><!-- P.P --> <div class="TextPlainViewer" id="P.P.P1"><!-- P.P.P1 -->Hello,<br> <br> running a small home brewn firewall appliance based upon FreeBSD 14-STABLE and IPFW, I<br> switched the base to 15-STABLE (FreeBSD 15.0-STABLE #5 n280665-6eb4708a84d7: Sat Oct 11<br> 09:08:00 CEST 2025 amd64).<br> <br> Now I face a serious issue with formerly flawless running skripts filling ipfw tables and the<br> readynes of the system after a reboot.<br> <br> tables:<br> creating some named tables.<br> Having a list of IPv4 and IPv6 addresses that needed to be blocked, like VoIP Blacklist with<br> over 35k lines. Each line (IPv4) is <br> <br> X.X.X.X/CIDR<br> <br> Shell is /bin/sh.<br> <br> Reading the file and filling the table like shown below;<br> tbl_block=foo<br> <br> #/usr/bin/env sh<br> ipfw table $tbl_block create type addr or-flush<br> while read -r line<br> do ipfw table $tbl_block atomic add $line<br> done < /some/path/to/block_file.txt<br> <br> The block_file.txt looks like<br> <br> [...]<br> 45.143.220.228/32<br> 68.64.211.117/32<br> 113.141.70.204/32<br> 77.247.110.245/32<br> 103.211.36.18/32<br> 156.96.63.238/32<br> 185.53.88.2/32<br> 185.53.88.14/32<br> 52.8.201.128/32<br> 113.141.70.184/32<br> 115.236.54.2/32<br> 50.17.48.216/32<br> 77.247.108.138/32<br> 77.247.110.216/32<br> 171.76.62.142/32<br> 77.247.110.227/32<br> 62.4.15.163/32<br> 158.69.242.200/32<br> 185.53.88.129/32<br> 102.165.39.82/32<br> 103.231.139.130/32<br> 69.142.172.14/32<br> 148.76.71.148/32<br> 82.70.244.121/32<br> 77.247.109.72/32<br> 52.41.52.34/32<br> [...]<br> <br> While running the skript, each time an address is picked up and inserted to the table, I see<br> this on the console:<br> <br> [...]<br> added(reverted): 45.143.220.228/32 0<br> ipfw: Adding record failed: Inappropriate ioctl for device<br> added(reverted): 68.64.211.117/32 0<br> ipfw: Adding record failed: Inappropriate ioctl for device<br> added(reverted): 113.141.70.204/32 0<br> ipfw: Adding record failed: Inappropriate ioctl for device<br> added(reverted): 77.247.110.245/32 0<br> ipfw: Adding record failed: Inappropriate ioctl for device<br> <br> I never saw this happen on 14-STABLE with the very same scripts. What is the cause of this<br> ioctl issue?<br> <br> Thanks and kind regards,<br> <br> Oliver<br> <br> <br> <br> <br> <br> <br> -- <br> <br> A FreeBSD user<br> </div><!-- TextPlainViewer --> <hr> <div class="DefaultViewer"><!-- P.P.P2 --> </div><!-- DefaultViewer --> </div><!-- MultipartMixedViewer --> </div><!-- MessageRFC822Viewer --> </blockquote><br><br><br></div></div></body></html> ------=_Part_15494_1894220882.1760209498563--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1720635174.15495.1760209498568>