IPv6 / pipe delimiter
Posted: 12 Aug 2010, 19:48
I understand the need to move away from colons (:) as a separator for denying and allowing rules due to upcoming IPv6. Just wondering why pipe (|) was chosen as the alternative? I believe this was introduced in version 5.04.
Reason being, to add a rule to the csf.deny file via the command line you can use the:
But to remove this rule you have to use:
to remove a rule you have to escape the pipe's. I'm not sure if this was intentional or an oversight. Or perhaps I am doing something wrong.
At any rate, with the colon separator you don't even have to enter the rule in quotes
I'm just wondering if using a different separator, perhaps "+" or "%" would be better
Using pipes definitely looks better, I won't argue with that. I just thought from a usability standpoint using a delimiter that does not have to be escaped out might be better.
Perhaps this could be better resolved if the command-line removal did not require the pipe characters to be escaped.
Reason being, to add a rule to the csf.deny file via the command line you can use the:
Code: Select all
csf -d "tcp|in|d=80|s=xx.xx.xx.xx" Some Comments
Code: Select all
csf -dr "tcp\|in\|d=80\|s=xx.xx.xx.xx"
At any rate, with the colon separator you don't even have to enter the rule in quotes
Code: Select all
csf -d tcp:in:d=80:s=xx.xx.xx.xx
Code: Select all
csf -d tcp%in%d=80%s=xx.xx.xx.xx
Code: Select all
csf -d tcp+in+d=80+s=xx.xx.xx.xx
Perhaps this could be better resolved if the command-line removal did not require the pipe characters to be escaped.