Admin Books

DOWNLOAD Free e-Books for Linux Admin Servers :

SSD server with 2GB of RAM and 50GB of storage for $3.40 per month (€2.99)

Online.net’s Scaleway is an interesting beast in the cloud hosting world. Instead of building a virtual cloud hosting infrastructure that competes directly with Amazon Web Services, DigitalOcean and other VPS providers, the company designed its own ARM-based servers.

And that’s why the company can drive the prices down so much. You can now get a BareMetal SSD server with 2GB of RAM and 50GB of storage for $3.40 per month (€2.99) — that’s 70 percent cheaper than Scaleway’s previous pricing of €9.99 per month.

The company has stated on Twitter that the new pricing applies to existing users as well. As a reminder, as ARM v7 chipsets were first designed for smartphones, it’s very easy to run many of them with very little power, cooling and space. Scaleway managed to squeeze 912 separate computers in a single server rack.

The company also kept the best of both worlds — dedicated servers with the flexibility of virtualization as you get 4 dedicated ARM cores, a dedicated IP and 200Mbit/s of unmetered bandwidth. Contrarily to many popular VPS providers, you won’t share your CPU raw power with other users.

Bash using Perl to Search and Replace words, recursively in the directory


To replace all instances of a string in a directory (subdirectories included) do:
Code:
perl -e "s/FIND/REPLACE/g;" -pi.save $(find path/to/DIRECTORY -type f)


The above will make a backup temp file of your original
If you do not want a temp file with the .save extension then do:

Code:
perl -e "s/FIND/REPLACE/g;" -pi $(find path/to/DIRECTORY -type f)


--------------------
Example:
You want to replace all instances of the word "design" with "dezine" in the directory /public_html/company/info

you can execute the command from document root as
Code:
perl -e "s/design/dezine/g;" -pi.save $(find public_html/company/info -type f)


or you can execute the command from public_html/company/ (a directory above) as:
Code:
perl -e "s/design/dezine/g;" -pi.save $(find info -type f)


------------------------------

The above commands will search all files (.gif, .jpg, .htm, .html, .txt) so you might see some error messages "Can't open *.gif", etc)

Simplified

To search just files of type, .htm without a backup file in the current directory only (no subdirectories) you could use:

Code:
perl -pi -e 's/design/dezine/g' *.htm




-------------

perl -pi -w -e 's/search/replace/g;' *.c


-p loop
-i means edit in-place
-w write warnings
-e means execute the following line of code.


Referensi : http://forums.devshed.com/unix-help-35/unix-find-and-replace-text-within-all-files-within-a-146179.html


Enable Iptables Modules for a VPS


Enable Iptables Modules for a VPS

Below was the typical error while trying to install CSF in one of the OpenVz containers:
----------------------------------error--------------------------------
[root@abc ~]# perl /etc/csf/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...FAILED [ 4294967295] - Required for csf to function
Testing ipt_multiport/xt_multiport...FAILED [FATAL Error: iptables: Unknown error 4294967295] - Required for csf to function
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...FAILED [FATAL Error: iptables: Unknown error 4294967295] - Required for csf to function
Testing ipt_limit/xt_limit...FAILED [FATAL Error: iptables: Unknown error 4294967295] - Required for csf to function
Testing ipt_recent...FAILED [Error: iptables: Unknown error 4294967295] - Required for PORTFLOOD and PORTKNOCKING features
Testing xt_connlimit...FAILED [Error: iptables: Unknown error 4294967295] - Required for CONNLIMIT feature
Testing ipt_owner/xt_owner...FAILED [Error: iptables: Unknown error 4294967295] - Required for SMTP_BLOCK and UID/GID blocking features
Testing iptable_nat/ipt_REDIRECT...FAILED [Error: iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)] - Required for MESSENGER feature
Testing iptable_nat/ipt_DNAT...FAILED [Error: iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)] - Required for csf.redirect feature
---------------------------------------------------------------

Enable Iptables Modules for a VPS:-


1 . Before enabling the modules to a VPS , make sure that its enabled in the root node of the VPS. You can check it using the command :
lsmod | grep -i module_name

2. If its not enabled, then it can enable by using the modprobe command :-

modprobe iptables_module
modprobe ipt_helper
modprobe ipt_REDIRECT
modprobe ipt_TCPMSS
modprobe ipt_LOG
modprobe ipt_TOS
modprobe iptable_nat
modprobe ipt_length
modprobe ipt_tcpmss
modprobe iptable_mangle
modprobe ipt_tos
modprobe iptable_filter
modprobe ipt_helper
modprobe ipt_tos
modprobe ipt_ttl
modprobe ipt_SAME
modprobe ipt_REJECT
modprobe ipt_helper
modprobe ipt_owner
modprobe ip_tables
modprobe ipt_MASQUERADE
modprobe ipt_multiport/xt_multiport
modprobe ipt_state/xt_state
modprobe ipt_limit/xt_limit
modprobe ipt_recent
modprobe xt_connlimit
modprobe ipt_owner/xt_owner
modprobe iptable_nat/ipt_DNAT
modprobe iptable_nat/ipt_REDIRECT

3. Stop the container which one you want to enable the module :
# vzctl stop 101

4 . Executing the following command:-

a) By Command:
Execute following command to enable all the modules for the VPS

# vzctl set 101 --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save
or

b) Adding Rules manually:
Open the VPS configuration file which exists at /etc/vz/conf/veid.conf and paste following in the last line of the file.

IPTABLES="iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ip_conntrack_irc ipt_conntrack ipt_state ipt_helper iptable_nat ip_nat_ftp ip_nat_irc"

5. Restart the container.
# vzctl restart 101

syslogd appears to be running, but not klogd which logs kernel firewall messages to syslog. You should ensure that klogd is running


When you run a CSF firewall to check your server's security, sometimes you get below mentioned warning, especially on a VPS running OpenVZ

syslogd appears to be running, but not klogd which logs kernel firewall messages to syslog. You should ensure that klogd is running



Typically, VPS servers have this disabled and you should check and edit /etc/init.d/syslog and make sure that any klogd lines are not commented out.

Do the following steps to resolve the issue.
If VPS edit /etc/init.d/syslog,


1. Root login to the server via WinSCP or if  in ssh you can use nano -c /etc/init.d/syslog


2. Edit /etc/init.d/syslog


3. Search the line below, (nearly at line # 42)
passed klogd skipped #daemon klogd $KLOGD_OPTIONS

4. Change it to be lines below,
passed klogd skipped
daemon klogd $KLOGD_OPTIONS


5. Now search 'status klogd' and then un-comment it.

6. Now search '#killproc klogd' and chnage it to be 'killproc klogd'


7. Restart syslog via /etc/init.d/syslog restart

This should fix the issue.

To checks, try this command :
more /etc/init.d/syslog|grep klogd


It now should return output like below :



# syslog        Starts syslogd/klogd.
[ -x /sbin/klogd ] || exit 5
passed klogd skipped
daemon klogd $KLOGD_OPTIONS
passed klogd skipped
killproc klogd
status klogd
    echo -n "Reloading klogd..."
    klog=`cat /var/run/klogd.pid 2>/dev/null`






If you change the file, remember to restart syslog via /etc/init.d/syslog restart



Misleading Tips When You Choose VPS As Your Web Hosting Model


Recent years have seen hacking become a prime concern for the e-commerce industry. Websites of renowned financial and government organizations have even not been spared of hacking in the recent past. That is not it, in the previous year, the official website of the White House, was out for nearly seven days due to hacking attacks. Just imagine the same when that happens to your business website! What if your e-commerce website developed with your precious and valued funding gets hacked? Thankfully, choosing a high security website hosting platform like Linux VPS hosting, will lessen your e-commerce website's chances of being hacked by at least 60- 70%.

There are a lot of companies offering secure web hosting services. However, if you want the highest level of security, opting for a reputed Linux VPS hosting service provider is a wise decision. And now let’s discuss some of the advantages that your linux hosting service can offer.

1. Robust Security: It is known in the world over that Linux has high standards for its security features. So, using a Linux platform for hosting your e-commerce website, it is natural that your website would remain secure against any form of unauthorized intrusions. So, you can keep your e-commerce website protected from malware and phishing attacks as well as keep it safe against hacking.

2. You can have control over the hosting server: Windows platform is more comfortable to work on, but when it comes to working on Linux, more configuration options are available in comparison to Windows. So the scope of customization in Linux platform as compared to Windows operating system, which will enable you to configure your website's visibility for many types of visitors. For example, with Linux hosting, you can impose restrictions on anonymous visitors to sections of your website, which are low in priority.

3. The access is quick access and operation is faster: Experts opine that, since Linux OS consumes fewer CPU clock cycles than Windows operating system, hosting your website on Linux platform would help your e-commerce website to run faster than in a Windows environment. So when opting for a dedicated or Linux VPS service you can speed up your website and the online transactions could be done much faster than in a windows hosting.

Eventually if you're planning to launch an e-commerce website for yourself, make sure to opt for a renowned Linux VPS hosting service provider. There is no dearth of companies around that offer virtual private server hosting services. Always make sure that you do a background research about the service provider before selecting one that suits your requirements.

Secure Security /tmp Directory

One area on a Linux dedicated server that is particularly vulnerable to attacks is the /tmp directory. It is designed to hold temporary files used by applications, but attackers may use an unprotected /tmp directory to launch scripts or bots. What follows are a few measures you can take to ensure your /tmp directory cannot be easily targeted.


1. /tmp as a separate partition. By default, the /tmp directory has read, write, and execute permissions, making it very vulnerable. By moving it to a separate partition from the root / partition, you can make it less likely that someone who gains access to /tmp will have access to your system files. For an example on CentOS, see this article.


2. Make /tmp non-executable. In /etc/fstab, make /tmp noexec. When finished it will look something like this: /tmp ext3 loop,noexec,nosuid,rw 0 0 Consult your distribution’s documentation for the best settings. [Note: before you make any changes to fstab, be sure to create a backup copy]


3. Install ModSecurity. This application firewall that we have previously highlighted will help prevent exploitation of web scripts, which is the main method hackers will use to gain access to /tmp


4. Avoid using /tmp for web scripts. If possible, use separate, more secure temporary directories for applications that are exposed to the web, and set the bare minimum permissions for that directory.


With any of these changes, you should make sure they will not adversely affect any applications you are running. Control panels like cPanel in particular, may not work well with some of these changes. Some dedicated hosts may even help you with your configuration. Consult the documentation and work carefully, backing up any files you change.

Cheapest VPS Offers RAM >= 512 MB

I am trying to record some VPS Server which affordable at least has 512 MB RAM in their offered VPS package.


http://flipperhost.com/openvz_vps.php :
(I use them for one of my "cheap but enough" rdiff-backup server)
Disk Space : 70 GB
RAM : 768 MB / 1 GB
Traffic : 0.65 TB/Month
Price : $7.99/Month

FlipperHost Promo1 VPS :
Disk Space : 45 GB
Bandwidth : 1.5 TB
Guaranteed RAM : 512 MB
Bursted Ram : 768 MB
Price : $4,99 Per month ---> Order Now


https://www.evolucix.com/clients/cart.php?a=confproduct&i=0 :
Virtual Servers Package Special - Evo1024-LEB
Disk Space: 20 GB
Guaranteed RAM: 1 GB / 1.5 GB
Traffic: 500 GB / month
Price : $6.95/ month




http://123systems.net/vps.html :
Virtual Servers Package Special - Lin-512MB Dallas,TX
Guaranteed RAM: 512 MB/ 1 GB
Disk Space: 20 GB
Traffic: 1TB / month
Price : $6.00/ month


https://hostigation.com/?page=OpenVZ :
Package OVZ-512
RAM : 512/1024 MB
Disk Space : 50 GB
Traffic :1000 GB/month
Price :$6/mo
Order Data Center Location : CLT | LAX
3 letter code denotes airport code for the city VPS will be provided in
Paying a full year makes you eligible for a two month discount.



http://buyvm.net/ or https://my.frantech.ca/cart.php?a=add&pid=47
Virtual Servers Package Special
Guaranteed RAM: 512 MB/ 1 GB
Disk Space: 50 GB
Traffic: 2 TB / month
Price : $5.95/ month
I will consider their $3.5 /month package to be my next backup server of my VPS Server.




https://billing.eoreality.net/cart.php?a=add&pid=216
End Of Reality – $5.75/Month, 1024MB OpenVZ VPS in Chicago, IL
LEB Offer: OpenVZ Professional VPS
RAM : 1 GB RAM
Disk Space : 25GB
Traffic : 1 GB
$5.75/Month
(Promo Code: lowendbox1)
(This, I took this one, after my DirectServer.Net VPS got 2 times data lost and one mass hacking makes me mad)



Disclaimer : No, I do not endorsed by any of them. This Cheapest VPS with at least 512 MB RAM list is strictly just for my note.

Finding Cheap VPS Backup Server Solution

If your website or Internet service depends on a Virtual Private Server (VPS), you need to know how to back up and restore your data in a simple and reliable way.

Have you lost your VPS data before?
    Never... and I like it that way
    Once... it still hurts
    Several times... how did you know?
Those are all related question that every linux admin server get while managing their VPS/DEDICATED Servers.

If you invest a little time into reading and testing this resource you’ll not only do a much better job of backing up your VPS, but save yourself a lot of time and effort in the process — not to mention, you’ll avoid the costly traps that most newbie webmasters-turned-admins fall into.
Could this happen to you? Even if you are a home user, almost one third of you have lost all of your files due to circumstances beyond your control, like a hard disk drive crash. If you then tried to get a quote from a data recovery service, you likely gasped at the price. There are more severe consequences for businesses – according to a Price Waterhouse Coopers survey a single incident of data loss costs businesses an average of $10,000. You can say I put that to test myself – last time I lost my e-mails, it was dearer than $10,000 to get everything back on track.
99% of VPS owners don’t have a reliable backup strategy for their server. Interestingly, 99% of hosting companies don’t mention this – they are too interested in getting you boarded and unloading any responsibility for your data.
Server backup is not really that difficult. It just takes a little bit of effort, a little bit of thought, and a fair amount of resources. It is crucial to understand that online backup is a form of long-term insurance to protect your data against loss. It can take weeks or months to design a successful website or Internet service and to get into the search engines, and years to develop a strong customer/visitor base. On the other hand, it takes one poorly managed hardware upgrade, or server migration, or transition to another provider, to waste it all and start painstakingly from bits and pieces scattered on your developers’ hard drives or sent over public e-mail addresses. But don’t be overwhelmed by the potential consequences of such a disaster. Having a lot to lose is a sign of wealth and prosperity and by taking your time to visit this site you are making big steps towards protecting this lot.
    If you are posting it on the Internet, make sure you’re hosting it right. The Internet is great for meeting many people, but this is a two-way road. By all means, test the 3USD/mo shared hosting offers from the likes of Hostgator, Bluehost or Lunar Pages. They have their benefits. But when your needs grow, get a virtual private server or dedicated hardware behind your website. Nothing turns people away more than a slow and panting webserver, with the potential bonus of seeing your account suspended for consuming too many CPU cycles, bandwidth or disk space while on a so-called UNLIMITED hosting plan.
    Understand that hosting companies lose data every day. We all wish that were not true, yet we know these companies rely on hardware, software and people just like everybody else. The hidden ingredient is luck – some got away with it when losing data – backups worked or their customers did not complain.
    Be responsible for your business. You are just a customer to your service provider. Sometimes it is simply not worth to them to help you recover data or restore your server. Have a backup plan and triggers in place to know when it’s time to look for a new host.
    Keep your backup solution in working order. A disaster can happen any time, be it during the night, weekend or the few days far from civilisation you call holiday. Backups that stalled for months are like expired milk. You get sick opening them.
    Automate your website. There is no excuse for doing certain tasks manually. Put a price on your time and start acting as your own employer. Is your manual backup procedure (done timely and thoroughly, remember), worth 30min/day every day?
    Consider paying for getting good backup. We can all design plans and solutions. Doing it right is a different story.
    Document your configuration and backup solution. Backups tend to be protected with almost unbreakable algorithms. Trying to restore without the password to your data is an expensive way of testing that privacy claim.
    Think about implementing your own remote backup solution. There is a growing market for offsite backup. You can leverage on your experience to partner with a service provider like vps-backup.com or start your own venture.
    Don’t be too shy to discuss your concerns. If you can imagine a scary scenario, it might happen. Besides figuring out what to do yourself, try talking to others and pooling resources together.
    Read the rest of this page. Assuming I haven’t completely turned your brain to mush with all of the above verbiage, read on. The rest of this page explains in more detail what the site does, and how it does it.


What is the difference between online and traditional backup?

Traditionally, you backup your server to a disk or tape attached to it, then you ship that copy away (offsite). Since a virtual or dedicated server is hosted in someone’s data centre, most of them try to backup locally for their peace of mind and yours. Sometimes you can download those backups to your home computer and have sort of a DIY offsite backup solution. I give you space on my own backup server and the tools to take backups and upload them on it automatically. In the end, you get the best of two worlds.

How VPS backup works

In the event of a disaster (failed updates, hacked server or data lost in a hardware incident), you can safely restore the files back to a previous state. Alternatively, if you took a backup before changing your hosting company, you can restore the files to the “new” server and have your website back online with minimal downtime and effort.

Case when we need VPS Backup server :

    Our filesharing service relies on a VPS to keep track of users and files distributed over several servers in different locations. As a start-up, we are on a tight operation and backup costs were a constant source of concern before..

    When I moved my online store from eBay to a Linux VPS with Zencart, I never had time to think about backups. After two days of downtime following a hardware crash of our host server, a common friend recommended Garrett for a chat about backups. Next time we will be prepared!

    Our server had been deleted in an attack on our hosting provider. It took them days to recover from backups, while our SMS billing service was back online in less than 10 hours on a new server. On a single event we avoided a loss worth hundreds of times the cost of the backup service.

Is offsite backup better than onsite backup?

Some experts will say that onsite solutions are faster, especially on restoring large files or disaster recovery (restoring the server data completely). This is partially true due to the high transfer speeds achievable over the LAN or with direct connected technologies (iSCSI, SAS or FC), on the condition that LARGE amounts of data need to be restored. Since most VPS have rather small disks by modern standards (10GB to 100GB), and given the high compression of data used by vps-backup.com, offsite backups can deliver perfectly comparable results and retain better granularity and control over the restoration process.
My rule of thumb is, if I want to avoid keeping all the eggs in the same basket, or better, in the same building, I choose offsite backups. Running and monitoring your backups is not fail proof. My servers have respectable uptime, and I took the common collection of steps to instill some redundancy to the service (RAID1, multiple connections, replication server etc). Yet I am still exposed to black swans and perfect storms and any other acronym used by Service Providers to explain their downtime. This service does not come with an SLA, but with a lot of goodwill and my own business at stake along with yours. Enough said – if anything fails, do your best to let me know and I will do the same for you. This is a lot better than what banks are offering you, by the way – and how many of us manage to avoid banks these days?
Where to find a good offer unmanage VPS( less than $4 at least 40GB). You will need the VPS for a remote back-up of your existing client's website. So no cpanel or directadmin needed. Webmin - even without Virtualmin is enough for this task. It just a backup server, right?
If you purchase a VPS does it include the basic linux installations(like php,mysql,web server,FTP server). Since its unmanaged, is it vulnerable to some attacks even if only the FTP server is started? Yes, even if you're simply running an FTPd, you are susceptible to exploits.
Your budget makes you vulnerable to problems like low quality of support, slow connection speed due to overselling, occasionally data loss etc. I would suggest that if you really need to get your data intact you ought to raise a little and go for a good company
Well, you can always try http://www.lowendbox.com/ to find some cheap VPS, but a $4 VPS for 40gb of space is not something I'd rely on as your only "Backup" solution. It's definitely feasible for VPS used as backup server. Just be sure to do your research. Usually an unmanaged VPS is not safe you need to secure it. You will need to ask a company to secure it for you otherwise sooner or later you will get into trouble. Instead of having the backup server as your fall back just use the server as a backup solution. Depending on what you are running use rsync or ftp backup methods to just backup your files and data to your spare $4 VPS. Or just spend a little more on the main VPS you have an go with a host that makes backups daily. I have had good success with Hostigation as a backup VPS. It is < $4/mo, has good uptime, and has been relatively reliable.
They are unmanaged, which really means self-managed. That is, YOU are responsible for everything inside your container.
In my opinion, if you do backups from your live server frequent enough, you can live with occasional data loss. What is the probability of your backup VPS and your live VPS going out at exactly the same time? Also, if you're using it purely as a backup server, what support do you need?
Speed is the only factor you mentioned that could be important. If you do get a live server failure and need to restore from a backup, you want to do it as fast as possible. So I agree, this is an important factor. Having said that, I'd still advocate Hostigation. I've gotten good speeds and reliable uptime from them.
If the backup VPS is going to be used ONLY for your client's backup of his website, you can save quite a bit by going with a low memory VPS designed for this purpose. I have a different plan at Hostigation.com, but check out their backup VPS plans ... generous disk space with low RAM, and low cost. I agree with the others here who have said this is a good option. If you want to do more with the box, then a $5.95 VPS from Burst.net would work; but you can't come whining back here complaining that they didn't help you set up BeJeweled on it. These inexpensive VPS are absolutely un managed (or self-managed). There are $10 a month backup services like BQBackup that do it for you. That might be a way to get it done without having to worry about securing and maintaining the VPS. I am checking http://virpus.com/?vps-backup-cheap, not sure if they are good company, but they have a daily back-up. I rsync my reseller host to VPS. Or VPS to VPS only. My method of doing this requires root access to each server to set up SSH keys, which you couldn't do with your reseller host. But *I think* you could set up cPanel/WHM backups using remote FTP to your VPS. Security is really an issue, for now if you are at low budget. But you will need to have my own back up too, better be safe. Since you are the one dealing with your clients.
First off, I highly recommend a managed VPS since if you were new to VPS's. Unmanaged is more tuned for experienced users . Usually unmanaged linux VPS do not come with the installations you mentioned. I agree that a bit of knowledge is required to properly secure your server. Unbelievebly however, still one of the most popular reasons for a VPS to be compromised is a weak password - Always make sure this is changed (to a good one) as soon as you first log in to any unmanaged VPS.
You usually get your choice of OS (CentOS, Debian, etc). Usually, you don't have PHP, MySQL or a webserver such as Apache installed, and the host won't help you install these. Expect to spend from 10 to 30 hours learning how to set things up and secure them, with several "OS reinstalls" from the VPS control panel (at least, that was my experience with my first self-managed VPS). And there's on-going maintenance as well. For my own hosting accounts I use a managed VPS from a good provider and pay the extra. I use self-managed VPS for some special projects and my DNS cluster. I could save some money by using a self managed VPS for my hosting accounts, but the time savings and reduced hassle factor makes a managed VPS a much better solution for me.
I don't know if you've looked at backup services like VPS-Backup.com , or BQBackup (http://www.bqbackup.com/) or WebbyCart (http://www.webbycart.com/backup.htm). For $5 to $10 a month you can get automated, hassle free backup services without the time investment of setting up your own VPS. I think WebbyCart is ok, you only need a pure ftpd for back-up from your current host. Also you can use WHMEasyBackup to automatically back-up all accounts. They are also using Rsync technology

Update us later and let us know how it works for you. It's a less complicated solution that still provides the benefits of having a separate backup in a separate geographical location.

Virtualmin/Webmin + CentOS Installing Config Server Firewall (CSF/LFD)


Virtualmin/Webmin + CentOS Installing Config Server Firewall (CSF/LFD)



These are the simple instructions on how to install CSF. You will want to make sure you’ve also installed the perl prerequisites with the following command:

yum  install perl-libwww-perl

You can do this with the following commands:



cd /tmp

wget -c http://www.configserver.com/free/csf.tgz

tar xzf csf.tgz

cd csf

sh install.sh


This will install CSF, but by default, CSF is in “testing” mode, which means that it doesn’t really protect you from anything as it normally would. There are some settings that must be changed before you will want to disable testing mode. Open the file /etc/csf/csf.conf like this:

nano /etc/csf/csf.conf

Find the TCP_IN variable and set it to:

TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,3000:3050,10000"

This will enable all of the default ports that are used on a web server. Now, we will need to find the UDP_IN variable and change it to read:

UDP_OUT = "20,21,53,113,123,33434:33523"

This will allow the use of the “Traceroute” command, without the “33434:33523″, traceroute will not work.

Before you go ahead and change the TESTING variable to 0, I highly recommend reading the entire CSF readme located here: http://configserver.com/free/csf/readme.txt

Like I mentioned, to disable TESTING change the TESTING variable to:

TESTING = "0"

Now you can save the file. Now you’re ready to restart the csf daemon:

service csf restart

To make sure CSF starts on reboot:

chkconfig --level 235 csf on

You’ve successfully configured CSF!

Next, test whether you have the required iptables modules:

perl /etc/csf/csftest.pl
In webmin, follow this route:

Webmin > Webmin Configuration > Webmin Modules >
  From local file >
/etc/csf/csfwebmin.tgz > Install Module
 
  If you've installed the Webmin CSF module - then you can manage your CSF firewall in your browser (via Webmin >> System >> ConfigServer Security & Firewall).

Other than that, the only option I know of is to use the command line.

Add Custom Link To Virtualmin/Webmin Menu

I want to have links on the left side of webmin/virtualmin default theme.
The links I want are link to File Manager and to PHPMyadmin.
File Manager was located in the original webmin menu.
PHPMyadmin , I installed it in the http://vps.mydomain.com/phpmyadmin/.
Also available in secured pages  https://vps.mydomain.com/phpmyadmin/
So I hack the template in /usr/libexec/webmin/virtual-server-theme/left.cgi.

Here is dirtty hack of  How to Add Custom Link To Virtualmin/Webmin Menu :

Edit /usr/libexec/webmin/virtual-server-theme/left.cgi.
Find code block like this :

     # Show list of all systems
    print "<div class='linkwithicon'><img src='images/vm2-small.png' alt=''><b><div class='aftericon'><a href='server-manager/index.cgi' target=right>$text{'left_vm2'}</a></b></div></div>\n";
    }




Right below that block, add several lines of code like this :

#START OF MY CUSTOM LINKS
#added by roy :


print "<div class='linkwithicon'><img src='images/vm2-small.png' alt=''>\n";
print "<div class='aftericon'><a target=right href='/file/'>File Manager</a></div></div>\n";

print "<div class='linkwithicon'><img src='images/vm2-small.png' alt=''>\n";
print "<div class='aftericon'><a target=_blank href='http://";
print "$ENV{'SERVER_NAME'}";
print "/phpmyadmin/'>PHPMyadmin</a> ";

print "<a target=_blank href='https://";
print "$ENV{'SERVER_NAME'}";
print "/
phpmyadmin/'>(https)</a>";

print "</div></div>\n";

#END OF MY CUSTOM LINKS


Then save the left.cgi and refresh webmin/virtualmin page. Customize your code if you want to add other links. Make sure you edit the right theme. Mine , I use default installation  theme called virtual-server-theme.