I do not know what commands you are putting there, or what their purpose is, but to disable all IP connections, first I would change the default sshd server port to any other unused port, then I would remove the default access permission from that port of the file '/etc/csf/csf.conf', the TCP_IN directive, and TCP6_IN.
And only then, if it was a fixed IP address, would it put the IP address permission on '/etc/csf/csf.allow'.
If it were a dynamic address, it would just portknocking on that port.
This solution would not suit you .. ??
Regards,
Netino