Re: Issue on 7.3.1.1 on APU2 shorewall and ACCOUNT

"KP.Kirchdoerfer" <[email protected]> Mon, 30 Sep 2024 16:50:16 +0200
Newsgroups gmane.linux.leaf.user
Message-ID <9392722.rMLUfLXkoz@stalker>
Am Sonntag, 29. September 2024, 16:35:00 CEST schrieb [email protected]:
> Actually my build environnement was not clean (I had a libxt_ACCOUNT.so
> coming from an earlier version in
> staging/x86_64-unknown-linux-uclibc/lib/xtables/).
> 
> For reason I don't understand build of >=3.25 does not generate
> libxt_ACCOUNT.so, while <=3.24 generate this libxt_ACCOUNT.so. Only
> diffference between ACCOUNT dir of both releases are makefiles.
> 
> As a summary
> xtables-addons-3.24 build just fine a produce the libxt_ACCOUNT.so
> xtables-addons-3.25 (and 3.26) must be patched to have libxt_ACCOUNT.so
> 
> Basically you need to use versions of 3.24 of the following files :
> 	/extensions/ACCOUNT/Makefile.am
> 	/extensions/ACCOUNT/Makefile.in
> to have the libxt_ACCOUNT.so generated.
> 
> Nota : same issue on libxt_pknock.so which requires former makefiles to
> be built.
> 
> Attached is the patch file sucessfully applied + buildtool files
> adapted accordingly.
>

Unforunately there was no patch attached, maybe the mailing list doesn't allow 
attachments...?

Anyway this explains why I still couldn't buil libxt_ACCOUNT.so (and the same 
for pknock).

I found a solution to revert this upstream change:

https://codeberg.org/jengelh/xtables-addons/commit/
08a16d90ceaee66206b038b844873438d1fe3cf4#diff-9621ccb817d06b69d9733bbce52cc08b912237ea

Committed the changes to git master branch yesterday.

If your's is better pls send me off-list and I'll have a look at it.
In either case gibt maint-7.3.1 will be get a commit as well.

And a lot of thanks for your help!

kp

> Regards
> 
> ===========================================================
> 
> 
> Date: Thu, 26 Sep 2024 13:21:09 +0200
> From: <[email protected]>
> To: [email protected]
> Subject: Re: [leaf-user] Issue on 7.3.1.1 on APU2 shorewall and ACCOUNT
> 
> 
> I built the 3.25 version, without any patch or anything unless adding
> the 5 lines in buildtool.cfg
> 
> Please note that then remove/clean macro is NOT working (i don't now
> how to fix it)
> 
> Nota : Toolchain=x86_64-unknown-linux-uclibc
> 
> 
> Date: Tue, 24 Sep 2024 17:31:53 +0200
> From: "KP.Kirchdoerfer" <[email protected]>
> To: [email protected]
> Subject: Re: [leaf-user] Issue on 7.3.1.1 on APU2 shorewall and ACCOUNT
> 
> 
> Hi;
> 
> Am Sonntag, 22. September 2024, 15:48:19 CEST schrieb [email protected]:
> > Hello,
> > 
> > I suceeded to fix the problem by adding the following lines in
> > buildtool.cfg of xtables-addons (in contents section of ipacct) &
> > rebuilding the package.
> > 
> > <File>
> > 
> > 	Filename = lib/xtables/libxt_ACCOUNT.so
> > 	Source = lib/xtables/libxt_ACCOUNT.so
> > 	Type = binary
> > 
> > </File>
> 
> Great you found a solution for yourself.
> 
> Anyway, the module libxt_ACCOUNT.so doesn't even build in my
> environment and therfor I removed libxt_ACCOUNT.so from the package in
> the false assumption it won't be neded any longer.
> This is obviously wrong.
> 
> So the error here is somewhere else.
> 
> May I ask you what version of xtables_addons you are compiling?
> 
> kp
> 
> > ===========================================================
> > 
> > 
> > Date: Fri, 20 Sep 2024 16:12:21 +0200
> > From: <[email protected]>
> > To: [email protected]
> > Subject: [leaf-user] Issue on 7.3.1.1 on APU2 shorewall and ACCOUNT
> > 
> > 
> > Hello,
> > 
> > I have an issue on 7.3.1.1 (on APU2) : Shorewall fails to launch if
> > accounting is used.
> > 
> > Error message in shorewall-init.log
> > Sep 20 15:22:59 Compiling /etc/shorewall/accounting...
> > Sep 20 15:23:00    ERROR: ACCOUNT Rules require ACCOUNT Target in your
> > kernel and iptables /etc/shorewall/accounting (line 11)
> > 
> > but actually xt_ACCOUNT module is loaded :
> > firewall# lsmod | grep xt_ACCOUNT
> > xt_ACCOUNT 20480 0 - Live 0xffffffffc04d1000 (O)
> > x_tables 32768 42
> > xt_statistic,xt_connlimit,xt_helper,xt_realm,xt_NFQUEUE,xt_hashlimit,xt_tc
> > pm
> > ss,xt_CHECKSUM,ipt_rpfilter,xt_DSCP,xt_dscp,xt_TPROXY,xt_CLASSIFY,xt_TCPM
> > SS,
> > xt_length,xt_connmark,xt_owner,xt_iprange,xt_physdev,xt_policy,xt_NETMAP,
> > xt_
> > ACCOUNT,xt_nat,xt_REDIRECT,xt_MASQUERADE,xt_recent,xt_time,xt_comment,ipt
> > _RE
> > JECT,xt_addrtype,iptable_nat,xt_mark,iptable_mangle,xt_tcpudp,xt_CT,iptab
> > le_
> > raw,xt_multiport,xt_conntrack,xt_NFLOG,xt_LOG,iptable_filter,ip_tables,
> > Live 0xffffffffc04c3000
> > 
> > and iptaccount is also available :
> > 
> > firewall# iptaccount -a
> > 
> > libxt_ACCOUNT_cl userspace accounting tool v1.3
> > 
> > Finished.
> > 
> > 
> > Nota : strictly same config was working well on 7.2.3 (kernel 5).
> > 
> > 
> > Thanks a lot for your help or idea to fix the point.
> > 
> > 
> > ------------------------------------------------------------------------
> > leaf-user mailing list: [email protected]
> > https://lists.sourceforge.net/lists/listinfo/leaf-user
> > Support Request -- http://leaf-project.org/
> > 
> > 





------------------------------------------------------------------------
leaf-user mailing list: [email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/