1

My ex-system admin installed CSF on a server witout Admin panel. I can see CSF installed but I am not sure if its currently running or not. I dont want to try to start / stop it.

I realized there is no PID file concept in CSF and I am finding it hard to know if the server is currently running CSF or not.

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92
Sparsh Gupta
  • 1,117
  • 7
  • 20
  • 31

4 Answers4

2

Use "Firewall information" or "Check server security" in CSF.

Or run in shell(if firewall run output contain many rules)

sudo iptables -nv -L
ooshro
  • 10,874
  • 1
  • 31
  • 31
1

run

iptables-save

command and check out what output is.

Hrvoje Špoljar
  • 5,162
  • 25
  • 42
0
root@vps ~/ # csf -l
csf and lfd have been disabled, use 'csf -e' to enable
root@vps ~/ # csf -e |head
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  tcp dpt:67
DROP  udp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  udp dpt:67
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  tcp dpt:68
DROP  udp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  udp dpt:68
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  tcp dpt:111
DROP  udp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  udp dpt:111
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  tcp dpt:113
DROP  udp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  udp dpt:113
DROP  tcp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  tcp dpts:135:139
DROP  udp opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0  udp dpts:135:139

I'm using "head" because I have VERBOSE enabled

 258 # Enable verbose output of iptables commands
 259 VERBOSE = "1"

If you change it to 0, you will get:

root@vps ~/ # csf -e
Starting lfd:[  OK  ]
csf and lfd have been enabled
root@vps ~/ #
user319660
  • 211
  • 2
  • 3
0

If CSF and LFD are already enabled, then running the following command

sudo csf -e

will output

csf and lfd are not disabled!

In addition you can try the following:

sudo service csf status