Installing Webmin and CSF on Debian Lenny
Firstly to administer the CSF firewall we will download and install Webmin for easier administration.
About CSF:
A Stateful Packet Inspection (SPI) firewall, Login/Intrusion Detection and Security application for Linux servers.
About Webmin:
Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely
1. Installation of Webmin and CSF
# mkdir security
# cd security
# wget http://prdownloads.sourceforge.net/webadmin/webmin_1.480_all.deb
# dpkg -i webmin_1.480_all.deb
If the dpkg installer throws out an error that it can not install Webmin because of dependacies just run:
# apt-get -f install
The required dependacie will be installed and you can access Webmin at https://127.0.0.1:10000 and login as root in it.
Next off installing the CSF:
# wget http://www.configserver.com/free/csf.tgz
# tar xzfv csf.tgz
# cd csf
# sh install.sh
And now you have CSF installed on your machine, currently it is running in test mode and you ned to configure it at first.
Let’s now add a Webmin module for CSF.
Got to : Webmin > Webmin Configuration > Webmin Modules
And enter the location of CSF Webmin module in the field “From local file”:
/etc/csf/csfwebmin.tgz And then just click Install. You can find CSF under System > ConfigServer Security & Firewall. 2. Configuration Now when you are logged in Webmin and in ConfigServer Security & Firewall click on Firewall Configuration and there check your settings – check your unblocked TCP and UDP incoming and outgoing open ports, add or remove the ones your need to have unblocked. Also don't forget to add the port 10000 to TCP Incoming and Outgoing list in Firewall Configuration, so you can still access Webmin. Also set TESTING flag to 0 remove CSF out of testing mode. If CSF is set to testing mode it flushes the rules every 5 minutes if you by accident lock yourself out of the machine you can log back in. And in the end just click Change and on the next screen click on the Restart csf + ld button. And there you have it, you have set up a firewall on your machine. Also you can click on Check server security on the CSF module index. It will display a list of possible problems on your machine. If you are running a server and you want to harden it you will probably mount your /tmp folder and secure it, change the SSH port for access and possibly allow only SSH key authentication instead of password authentication.
nice info..