CyberPanel Community

ClosedConfigservercsf (CSF) not found after upgrading cyberpanel

VP
Varun Patel #1

After updating my CyberPanel, I am getting an error message on the CSF config page.

"https://myip:8090:/configservercsf/
"# Not Found
The requested resource was not found on this server."

Can anyone suggest an issue?

18 replies
jo
josephgodwinke #3

Try run this

perl /usr/local/csf/bin/csftest.pl

Post screenshot here or copy and paste the output

VP
Varun Patel #4
  1. server os version e.g. Ubuntu 22.04
  2. CP version - Current Version: 2.3 Build:4 Current Commit:
    6f2db2c8a6a754fb93ef01f4c97b87f4de0f818e
    Here is the output.

This server has installed CyberPanel.
Visit  https://www.cyberpanel.net
Forum  https://forums.cyberpanel.net
Log in https://xxxxxxxx:8090

Current Server time : 2023-07-07 11:09:29.
Current Load average: 0.00, 0.00, 0.00
Current CPU usage   : 0.68157%.
Current RAM usage   : 570/3814MB (14.94%).
Current Disk usage  : 13/38GB (36%).
System uptime       : 4 days, 2 hours, 54 minutes.

Enjoy your accelerated Internet by CyberPanel.

xx@xxx:~# perl /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
jo
josephgodwinke #5

Run

nano /etc/csf/csf.conf

Look for the line UI using CTRL+W if you are using nano post everything below that line including that line here

VP
Varun Patel #6

Do you mean this?

# This options restricts the ability to modify settings within this file from
# the csf UI. Should the parent control panel be compromised, these restricted
# options could be used to further compromise the server. For this reason we
# recommend leaving this option set to at least "1" and if any of the
# restricted items need to be changed, they are done so from the root shell
#
# 0 = Unrestricted UI
# 1 = Restricted UI
# 2 = Disabled UI
RESTRICT_UI = "1"
jo
josephgodwinke #7

I meant something like

#Enable Web UI
UI = "2"
jo
josephgodwinke #8

Anyway go to nano /etc/csf/ui/ui.allow and check if your server ipv4 is listed there

VP
Varun Patel #9

No, my IP is not listed. It is a blank file. my Ip- 49.12.104.16

jo
josephgodwinke #10

Add your server ip in that list and run csf -r

VP
Varun Patel #11

Is there any formate, or just add my IP? I added IP but still same error.

jo
josephgodwinke #12

Restart csf service

Also look up the listening ui port on the config file and check if its running

VP
Varun Patel #13

I think i found correct location of UI

###############################################################################
# SECTION:Integrated User Interface
###############################################################################
# Integrated User Interface. This feature provides a HTML UI to csf and lfd,
# without requiring a control panel or web server. The UI runs as a sub process
# to the lfd daemon
#
# As it runs under the root account and successful login provides root access
# to the server, great care should be taken when configuring and using this
# feature. There are additional restrictions to enhance secure access to the UI
#
# See readme.txt for more information about using this feature BEFORE enabling
# it for security and access reasons
#
# 1 to enable, 0 to disable
UI = "0"

# Set this to the port that want to bind this service to. You should configure
# this port to be >1023 and different from any other port already being used
#
# Do NOT enable access to this port in TCP_IN, instead only allow trusted IP's
# to the port using Advanced Allow Filters (see readme.txt)
UI_PORT = "6666"

# Optionally set the IP address to bind to. Normally this should be left blank
# to bind to all IP addresses on the server.
# Optionally set the IP address to bind to. Normally this should be left blank
# to bind to all IP addresses on the server.
#
# If the server is configured for IPv6 but the IP to bind to is IPv4, then the
# IP address MUST use the IPv6 representation. For example 1.2.3.4 must use
# ::ffff:1.2.3.4
#
# Leave blank to bind to all IP addresses on the server
UI_IP = ""

# This should be a secure, hard to guess username
#
# This must be changed from the default
UI_USER = "username"
# Optionally set the IP address to bind to. Normally this should be left blank
# to bind to all IP addresses on the server.
#
# If the server is configured for IPv6 but the IP to bind to is IPv4, then the
# IP address MUST use the IPv6 representation. For example 1.2.3.4 must use
# ::ffff:1.2.3.4
#
# Leave blank to bind to all IP addresses on the server
UI_IP = ""

# This should be a secure, hard to guess username
#
# This must be changed from the default
UI_USER = "username"
# If enabled, this option will add the connecting IP address to the file
# /etc/csf/ui/ui.ban after UI_RETRY login failures. The IP address will not be
# able to login to the UI while it is listed in this file. The UI_BAN setting
# does not refer to any of the csf/lfd allow or ignore files, e.g. csf.allow,
# csf.ignore, etc.
#
# For security reasons, you should always enable this option
UI_BAN = "1"

# If enabled, only IPs (or CIDR's) listed in the file /etc/csf/ui/ui.allow will
# be allowed to login to the UI. The UI_ALLOW setting does not refer to any of
# the csf/lfd allow or ignore files, e.g. csf.allow, csf.ignore, etc.
#
# For security reasons, you should always enable this option and use ui.allow
UI_ALLOW = "1"

# If enabled, this option will trigger an iptables block through csf after
# UI_RETRY login failures
#
# 0 = no block;1 = perm block;nn=temp block for nn secs
UI_BLOCK = "1"
# If enabled, this option will add the connecting IP address to the file
# /etc/csf/ui/ui.ban after UI_RETRY login failures. The IP address will not be
# able to login to the UI while it is listed in this file. The UI_BAN setting
# does not refer to any of the csf/lfd allow or ignore files, e.g. csf.allow,
# csf.ignore, etc.
#
# For security reasons, you should always enable this option
UI_BAN = "1"

# If enabled, only IPs (or CIDR's) listed in the file /etc/csf/ui/ui.allow will
# be allowed to login to the UI. The UI_ALLOW setting does not refer to any of
# the csf/lfd allow or ignore files, e.g. csf.allow, csf.ignore, etc.
#
# For security reasons, you should always enable this option and use ui.allow
UI_ALLOW = "1"

# If enabled, this option will trigger an iptables block through csf after
# UI_RETRY login failures
#
# 0 = no block;1 = perm block;nn=temp block for nn secs
UI_BLOCK = "1"
VP
Varun Patel #14
# This controls what email alerts are sent with regards to logins to the UI. It
# uses the uialert.txt template
#
# 4 = login success + login failure/ban/block + login attempts
# 3 = login success + login failure/ban/block
# 2 = login failure/ban/block
# 1 = login ban/block
# 0 = disabled
UI_ALERT = "4"

# This is the SSL cipher list that the Integrated UI will negotiate from
UI_CIPHER = "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP:!kEDH"

# This is the SSL protocol version used. See IO::Socket::SSL if you wish to
# change this and to understand the implications of changing it
UI_SSL_VERSION = "SSLv23:!SSLv3:!SSLv2"

# If cxs is installed then enabling this option will provide a dropdown box to
# switch between applications
UI_CXS = "0"

# There is a modified installation of ConfigServer Explorer (cse) provided with
# the csf distribution. If this option is enabled it will provide a dropdown
# box to switch between applications
UI_CSE = "0"
jo
josephgodwinke #15

Now use any of the commands that dump socket statistics to see if anything is listening to port 6666

VP
Varun Patel #16

6666 is not in the socket statistic list.

jo
josephgodwinke #17

Ideally this would be changed

# 1 to enable, 0 to disable
UI = "1"
# any open port here - Do NOT enable access to this port in TCP_IN
UI_PORT = "6666"
# This should be a secure, hard to guess username
# This must be changed from the default
UI_USER = "username"
# Leave blank to bind to all IP addresses on the server
UI_IP = "::ffff:127.0.0.1"

But before you do that show me /var/log/lfd.log there must be errors here

mt
mtech #19

hey, what did you do to resolve this? currently having this issue also

Sign in to reply