Skip to main content

How to modify csf.conf file?

Comments

11 comments

  • ejsolutions
    This is scary! :eek: To see: less /etc/csf/csf.conf There's a button called, guess what? Firewall Configuration. ((Goes off to hide..))
    1
  • cPRex Jurassic Moderator
    When CSF is installed, you get the plug which allows you to make most changes directly in the WHM interface. You can always use your favorite text editor to edit the /etc/csf/csf.conf file directly on the command line if you want, but you would need to restart the CSF service after making any changes.
    0
  • toplisek
    /etc/csf/csf.conf will push Permission denied
    0
  • cPRex Jurassic Moderator
    That isn't enough information to determine what the problem may be. Can you let us know exactly what you entered on the command line?
    0
  • toplisek
    I need to place code in raw file (not scary...). As I understand Firewall Configuration is just visual interface to modify this file with a new setting. As I execute a command as root like /etc/csf/csf.conf it will be an error: Permission denied. This is the reason and question about raw file.
    0
  • cPRex Jurassic Moderator
    That's because the csf.conf file is not an executable file. It is just a plain text file that is human-readable. You'll need to open it with a text editor.
    0
  • toplisek
    nano /etc/csf/csf.conf It works to read and edit. is it possible to read all content as nano ... Is it supported within cPanel all content within CSF.conf?
    0
  • ejsolutions
    Still scary! (If you needed to ask, then you shouldn't be doing what you intend to do - a little knowledge is a dangerous thing.) Use ConfigServer Explorer, then you can open in a GUI, if you must. Real Men use vi. :cool:
    0
  • quietFinn
    If you really need to edit the file /etc/csf/csf.conf make a backup of it 1st. cd /etc/csf cp csf.conf csf.conf.BAK
    Real Men use vi. :cool:

    Yes and real programmers build their own compiler :rolleyes:
    0
  • toplisek
    I have solved.
    0
  • ejsolutions
    I have solved.

    Good. Illuminating. :-p
    0

Please sign in to leave a comment.