Are wildcards supported in csf.redirect?

Post Reply
scr1ptk1tt13
Junior Member
Posts: 1
Joined: 20 Nov 2021, 08:48

Are wildcards supported in csf.redirect?

Post by scr1ptk1tt13 »

Hi all! :)

I just wanted to confirm whether wildcards are supported in csf.redirect or not. The documentation seems to suggest that they are, but I get this:

Code: Select all

Error: csf: Invalid csf.redirect format [*|2087|170.XXX.XXX.XX|2222|tcp], at line 3249
With this:

Code: Select all

[root@host1 ~]# /usr/local/csf/bin/csftest.pl 
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server
[root@host1 ~]# 

Code: Select all

[root@host1 ~]# cat /proc/sys/net/ipv4/ip_forward
1
[root@host1 ~]# 

If I specify the complete actual IPs with no wildcards, it works as expected. Eg:

Code: Select all

170.XXX.XXX.XX|2087|170.XXX.XXX.XX|2222|tcp
Per csf.redirect file, the examples contain wildcards. I'm using the latest:

Code: Select all

[root@host1 ~]# csf -u
csf is already at the latest version: v14.12

Thanks!
Post Reply