Hosting or Servers Logo
How to Enable CSF Web Interface

Although CSF can be run entirely from the command line it has a convenient easy-to-operate web user interface built-in. All you have to do is set up some security options and turn it on. We will proceed as if you have already successfully followed our previous article that shows you how to install CSF.

Open your terminal window and use your favorite command line editor to open csf.conf which can be found in the /etc/csf directory. The following command will use vim to open the CSF config file. You should substitute the name of your editor for vim in the command line.

sudo vim /etc/csf/csf.conf

Now move down to line 2000 which should be the Integrated User Interface section.

Image of csf.conf line 2000 Integrated User Interface section.

At line 2015 there is the entry UI="0" . We will ignore this for now and set up the security options first. Move down to line 2037.

At line 2037 you should enter a username in UI_USER = " " Make sure it is easy enough to remember but not something common like admin or webmaster.

At line 2044 enter a strong password in UI_PASS = " " Do not use something common like password as a password.

Move back up in the file to line 2022 where you will find UI_PORT = "6666" We suggest changing this port to something else such as 1025 or something that is not in use on your server. It is often a good idea to change a default port if just to confuse attackers looking to exploit default ports.

Now the username, password and port are set you can go back to line 2015 UI = "0" and change it to UI = "1" This will enable the CSF UI after you restart the firewall. Move back to line 139 near the beginning of the file and add the port you choose to the allowed incoming and outgoing TCP ports. Save and close the csf.conf file.

Use the following command or your editor to open ui.allow which is in the directory /etc/csf/ui Add the ip address of where you will access the CSF user interface from. e.g., home or work When finished save and close the file.

sudo vim /etc/csf/ui/ui.allow

Use the following commands to restart CSF and then LFD

systemctl restart csf

systemctl restart lfd

Open your browser and access the CSF UI by using your website address and whatever port you choose. e.g. domain.com:1025 If you were successful, you should be prompted for a username and password. Now you will have easy access to configure CSF and LFD.

You Are Leaving Us

This link is being provided as a convenience and for informational purposes only it is not an endorsement or an approval of any of the products, services or opinions of the corporation or organization or individual.

Hostingorservers.com bears no responsibility for the accuracy, legality or content of the external site or for that of subsequent links.