<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>#echo &#34;yusufhadiwinata.com&#34; &#62;  /etc/hostname</title>
	<atom:link href="http://yusufhadiwinata.com/~bin_pwd/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://yusufhadiwinata.com/~bin_pwd</link>
	<description>echo &#34;{cat /etc/myname}&#34; &#62;&#62; Namaku; id  uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)  &#62;&#62; Namaku                                                                           #echo &#039;y*s*f:h&#38;diwin&#38;t&#38;~-nd+l-n*x:c+m&#039; &#124; sed -e &#039;s/~/@/&#039; -e &#039;s/-/i/g&#039; -e &#039;s/:/./g&#039; -e &#039;s/*/u/g&#039; -e &#039;s/+/o/g&#039; -e &#039;s/&#38;/a/g&#039; &#62; my-email</description>
	<lastBuildDate>Thu, 02 Sep 2010 03:38:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux Kernel Hacking and Optimize</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=153</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=153#comments</comments>
		<pubDate>Thu, 02 Sep 2010 03:38:16 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[RedHat - System]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=153</guid>
		<description><![CDATA[#swapnpiness makin kecil makin di matiin swap
vm.swappiness=50
vm.overcommit_memory=2
vm.overcommit_ratio=80


## rh default ## vm.dirty_background_ratio = 10
## ubu default ## vm.dirty_background_ratio = 5
vm.dirty_background_ratio=2
# 10
## rh default ## vm.dirty_ratio = 40
## ubu default ## vm.dirty_ratio = 10
vm.dirty_ratio=8
# 40

#---------------------------- semaphore limitasi
#    * SEMMSL - the maximum number of semaphores per semaphore set.
#    * SEMMNS - [...]]]></description>
			<content:encoded><![CDATA[<pre>#swapnpiness makin kecil makin di matiin swap
vm.swappiness=50
vm.overcommit_memory=2
vm.overcommit_ratio=80
<span id="more-153"></span>

## rh default ## vm.dirty_background_ratio = 10
## ubu default ## vm.dirty_background_ratio = 5
vm.dirty_background_ratio=2
# 10
## rh default ## vm.dirty_ratio = 40
## ubu default ## vm.dirty_ratio = 10
vm.dirty_ratio=8
# 40

#---------------------------- semaphore limitasi
#    * SEMMSL - the maximum number of semaphores per semaphore set.
#    * SEMMNS - a system-wide limit on the number of semaphores in all semaphore sets.
#    * SEMOPM - the maximum number of operations that may be specified in a semop(2) call.
#    * SEMMNI - a system-wide limit on the maximum number of semaphore identifiers.
#            SEMMSL SEMMNS SEMMNS  SEMMNI
kernel.sem = 250 32000 100 128

#This file contains the system-wide limit on the total number of pages of System V IPC shared memory. The default value is 2097152.
kernel.shmall = 2097152

# default nya 32 mb , dibawah ini di set 2048
#This file can be used to query and set the run time limit on the maximum System V IPC shared memory segment size that can be created. Shared memory segments up to 1GB are now supported in the kernel. This value defaults to 33554432 (32MB).
kernel.shmmax = 2147483648

#This file specifies the system-wide maximum number of System V IPC shared memory segments that can be created. The default value is 4096.
kernel.shmmni = 4096
# 10 % dari total physical memorynya
fs.file-max = 409600
vm.vfs_cache_pressure = 50

#The default setting of the socket receive buffer in bytes.
# 16 mb
net.core.rmem_default = 16777216

#The maximum receive socket buffer size in bytes. The default value is 131072 bytes.
# 16 mb
net.core.rmem_max = 16777216

# The default setting of the socket send buffer in bytes.
# 16 mb
net.core.wmem_default = 16777216

# The maximum send socket buffer size in bytes. The default value is 131072 bytes.
net.core.wmem_max = 16777216

#Vector of 3 integers: min, default, max.
#   * min - minimal size of receive buffer used by TCP sockets. It is guaranteed to each TCP socket, even under moderate memory pressure. The default value is 4096 bytes.
#    * default - default size of receive buffer used by TCP sockets. This value overrides rmem_default used by other protocols. The default value is 87380 bytes. This value results in window of 65535 with default setting of tcp_adv_win_scale and tcp_app_win is 0, and a bit less for default tcp_app_win.
#    * max - maximal size of receive buffer allowed for automatically selected receiver buffers for TCP socket. This value does not override rmem_max, "static" selection via SO_RCVBUF does not use this. The default value is 4194304 bytes.
#                    min    default  max
net.ipv4.tcp_rmem = 10240 87380 16777216
net.ipv4.tcp_wmem = 10240 87380 16777216

# Normally, TCP will remember some characteristics about the last connection in the flow cache. If tcp_no_metrics_save is set, then it doesn't. Useful for benchmarks or other tests.
net.ipv4.tcp_no_metrics_save = 1

# Enable window scaling as defined in RFC1323. Enabled (1) by default.
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1

# Maximum number of packets, queued on the input side, when the interface receives packets faster than kernel can process them. Applies to non-NAPI devices only. The default value is 1000.
net.core.netdev_max_backlog = 5000
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=153</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>securelevel openbsd</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=148</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=148#comments</comments>
		<pubDate>Fri, 21 May 2010 04:08:57 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[ls /usr/ports/security]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=148</guid>
		<description><![CDATA[
securelevel -1 : There&#8217;s no additional kernel security and many of the normal security features, such as permissions, are functional. Use this level for machines not in production use.
securelevel 0 : When OpenBSD first boots up securelevel 0 is used. If this level is set in your rc.securelevel file securelevel 1 will actually be used [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><strong>securelevel -1 :</strong> There&#8217;s no additional kernel security and many of the normal security features, such as permissions, are functional. Use this level for machines not in production use.</li>
<li><strong>securelevel 0 :</strong> When OpenBSD first boots up securelevel 0 is used. If this level is set in your rc.securelevel file securelevel 1 will actually be used when the boot process is finished. There are no added features of securelevel 0.<span id="more-148"></span></li>
<li><strong>securelevel 1 :</strong> OpenBSD&#8217;s default securelevel. Writing to /dev/mem and /dev/kmem won&#8217;t work. Raw disk devices are read-only. Schg and sappnd flags cannot be removed. Kernel modules cannot be loaded or unloaded &#8216;on the fly&#8217;.</li>
<li><strong>securelevel 2 :</strong> Includes all securelevel 1 features plus: Limited setting of the system clock. pfctl cannot change PF or NAT rules. DDB kernel debugger sysclt values cannot be changed.</li>
</ul>
<p>The end of the boot process will show what security level you are at.</p>
<p>Or at a prompt</p>
<div># sysctl kern.securelevel</div>
<p>To adjust to a higher security level at the command prompt</p>
<div># sysctl kern.securelevel=2</div>
<div>
<h1>Using Kernel Flags</h1>
<p>Setting kernel flags is like setting permissions but with an added twist. With the setting of some flags, not even root can make changes. Changes can only be made by booting into a lower securelevel or <a href="http://www.openbsd101.com/tipstricks.html#tt1">booting into single user mode</a>.</p>
<div>
<p>Common used flags</p>
<ul>
<li>sappnd : Can only be set or removed by root. Files set with this flag can be added to but not removed or edited. Good for log files. This flag cannot be removed with the system running in securelevel 1 or greater.</li>
<li>schg : Can only be set or removed by root. Files set with this flag cannot be changed, moved or replaced. This flag cannot be removed with the system running in securelevel 1 or greater.</li>
<li>uappnd : Can be set or removed by user or root. Files can be added to but not edited or removed by the average user (prevents accidental removal). The user or root may remove this flag at any time.</li>
</ul>
<p>Using kernel flags can become addicting. Just make sure you know the overall outcome of using flags and realize that improper use may cause some serious system problems.</p>
<p>Checking to see if a file has a flag set</p>
<div>
<pre># ls -lo /bsd
-rw-r--r--  1 root  wheel  schg 5358488 Mar 30 11:47 /bsd</pre>
</div>
<p>The schg text is the evidence of a flag being set.</p>
<p>Two popular flag settings</p>
<p>Disallowing changes to the kernel</p>
<div># chflags schg /bsd</div>
<p>Disallowing changes to the binaries</p>
<div># chflags -R schg /bin</div>
<p>You might want to set a sappnd flag to root&#8217;s history file. If there is a remote root compromise of the system then looking over the tamperproof history file will help in tracing the intruder&#8217;s movements.</p>
<p>Also, setting the sappnd flag to a user&#8217;s history file will also prevent the old script kiddie trick of covering their tracks by sending shell history output to /dev/null via a soft link.</p>
<p>Removing a flag</p>
<p>Removing a flag set to the kernel file</p>
<div># chflags noschg /bsd</div>
<p>You must be in securelevel 0 or -1 to remove this flag.</p>
<h1>Kernel Flags for the Paranoid</h1>
<p>What follows are some kernel flag suggestions for the paranoid. I recommend these changes only after you are done setting up your OBSD server.</p>
<p>Flag settings for the kernel and configuration files</p>
<div>
<pre># chflags schg /bsd
# chflags schg /etc/changelist
# chflags schg /etc/daily
# chflags schg /etc/inetd.conf
# chflags schg /etc/netstart
# chflags schg /etc/pf.conf
# chflags schg /etc/rc
# chflags schg /etc/rc.conf
# chflags schg /etc/rc.local
# chflags schg /etc/rc.securelevel
# chflags schg /etc/rc.shutdown
# chflags schg /etc/security
# chflags schg /etc/mtree/special</pre>
</div>
<p>Flag settings for system binaries</p>
<div>
<pre># chflags -R schg /bin
# chflags -R schg /sbin
# chflags -R schg /usr/bin
# chflags -R schg /usr/libexec
# chflags -R schg /usr/sbin
<h1>Encrypt the Swap Partition</h1>

Encrypting your swap partition is mainly done to prevent any local user from potentially abusing the system.

By default OpenBSD 4.7 will encrypt the swap partition. To turn this on for OpenBSD versions 3.7 and below:
<div>
<ul>
<li>step 1 - Enable this feature without a reboot</li>
<li>step 2 - Edit the sysctl config file, so that after a reboot the swap partition will be encrypted</li>
</ul>

1. As root change the kernel state variable
<div># sysctl vm.swapencrypt.enable=1</div>

2. Edit /etc/sysctl.conf from
<div>#vm.swapencrypt.enable=1</div>

to:
<div>vm.swapencrypt.enable=1</div>

and to check if the kernel state is set:
<div># sysctl vm.swapencrypt.enable</div>
</div>
<h1>Disable Inetd</h1>

On a default install inetd is enabled. On my OpenBSD server at home I only run sshd, ntpd, syslogd, and httpd. None of which run off of inetd. But for the paranoid disabling inetd will usually cause no problems.

Disable inetd by editing the /etc/rc.conf file from
<div>inetd=YES</div>

to:
<div>inetd=NO</div>

and to stop inetd without a reboot:
<div># kill `cat /var/run/inetd.pid`</div>
<div><img src="http://www.openbsd101.com/images/note.png" alt="[take note]" /><strong>Note:</strong> It isn't inetd that has had past security problems but rather the services it controls.</div>
<h1>Ssh Over Telnet</h1>

Telnet will not be running on a default OpenBSD install. I'm not sure there are any good arguments to running the telnet service. As most know the telnet login process uses plain text authentication, which makes sniffing a practical attack to gaining illegal remote access to a system. Then next on the menu would be performing a local exploit.

Ssh not only encrypts the login (authentication) process but the entire ssh session is encrypted.

Almost all Linux distros and BSD flavors include the OpenSSH server and client. And for Windows, <a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html">Putty</a> would be the equivalent to a free client.

To disable telnet in OBSD 3.9 and below (4.7 does not have a telnet entry):

Edit the /etc/inetd.conf file from
<div>telnet</div>

to:
<div>#telnet</div>
<h1>SFTP over FTP</h1>

Sftp will be running on a default install. Sftp will prevent the problem of sniffing ftp passwords which are transmitted in plain text.

You might be surprised how easy it is to use sftp. Almost all Linux distros and BSD flavors come with a sftp client. And for Windows there is the freeware program <a href="http://winscp.net/eng/index.php">WinSCP</a>.
<div><img src="http://www.openbsd101.com/images/note.png" alt="[take note]" /> <strong>Note:</strong> There are performance issues when using sftp. You will notice transfer speeds to be slower than ftp speeds. This can be 'blamed' on the fact that sftp communication is encrypted thus adding to the transfer time.</div>
<h1>Mounting Partitions</h1>

The way partitions are mounted can greatly affect system security. How partitions are mounted at boot time is controlled by the fstab file. Two examples of a /etc/fstab file with security in mind:

1. The following layout shows an average paranoid setup
<div>
<pre>/dev/wd0a / ffs rw 1 1
/dev/wd0h /home ffs rw,nodev,nosuid 1 2
/dev/wd0d /tmp ffs rw,nodev,nosuid,noexec 1 2
/dev/wd0g /usr ffs ro,nodev 1 2
/dev/wd0e /var ffs rw,nodev,nosuid,noexec 1 2</pre>
</div>
<p>The difference between the two, the below has the root (/) partition set to read-only and the /home partition set to noexec.<br />
2. More paranoia added to the mix with a dash of less usability</p>
<div>
<pre>/dev/wd0a / ffs ro 1 1
/dev/wd0h /home ffs rw,nodev,nosuid,noexec 1 2
/dev/wd0d /tmp ffs rw,nodev,nosuid,noexec 1 2
/dev/wd0g /usr ffs ro,nodev 1 2
/dev/wd0e /var ffs rw,nodev,nosuid,noexec 1 2</pre>
</div>
<h1>Using rm with the -P Option</h1>
<p>Most of the Linux distros ship with a nice file wiping utility called shred. Using the command rm with the -P option will overwrite regular files 3 times before deleting them.<br />
Using rm with -P option</p>
<div># rm -P filename</div>
<p>Or add a command alias for BASH</p>
<div># echo "alias rm='rm -P' " &gt;&gt; .bash_profile</div>
<h1>Increase Minimum Password Length</h1>
<p>The default minimum length for OpenBSD login passwords is 6 characters. To increase this to 10 characters, simply edit the /etc/login.conf file.<br />
Edit the /etc/login.conf file</p>
<div>
<pre>default:\
    :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin:\
    :umask=022:\
    :datasize-max=512M:\
    :datasize-cur=512M:\
    :maxproc-max=128:\
    :maxproc-cur=64:\
    <img src='http://yusufhadiwinata.com/~bin_pwd/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> penfiles-cur=128:\
    :stacksize-cur=4M:\
    :localcipher=blowfish,6:\
    :ypcipher=old:\
    :tc=auth-defaults:\
    :minpasswordlen=10:\
    :tc=auth-ftp-defaults:
</pre>
</div>
<p>Adding the :minpasswordlen=10:\ line under the default class.</p>
<div><img src="http://www.openbsd101.com/images/note.png" alt="[take note]" /> <strong>Note:</strong> login.conf does not have to be converted (cap_mkdb) to a database file, unlike FreeBSD.</div>
<p>If you notice any errors, please <a href="http://www.openbsd101.com/contact/">let me know</a>.</pre>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating OBSD 4.7 ke versi Stable dengan Cvsup</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=142</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=142#comments</comments>
		<pubDate>Fri, 21 May 2010 02:59:50 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[ls /usr/ports/networking]]></category>
		<category><![CDATA[ls /usr/ports/security]]></category>
		<category><![CDATA[ls /usr/ports/www]]></category>
		<category><![CDATA[uname -o]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=142</guid>
		<description><![CDATA[Install CVSUP paketnya dl
# pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.7/packages/i386/cvsup-16.1hp2-no_x11.tgz


step 1. Membuat CVSUP Configuration File
step 2. Run cvsup with the configuration file
step 3. Rebuild and install your kernel
step 4. Rebuild and install your system

1. Gunakan  text editor favorit anda untuk create  file  cvsup-file-src dan isikan dengan di bawah ini

# Defaults that apply to all the collections
*default release=cvs
*default delete [...]]]></description>
			<content:encoded><![CDATA[<p>Install CVSUP paketnya dl</p>
<div># pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.7/packages/i386/cvsup-16.1hp2-no_x11.tgz</div>
<div>
<ul>
<li>step 1. Membuat CVSUP Configuration File</li>
<li>step 2. Run cvsup with the configuration file</li>
<li>step 3. Rebuild and install your kernel</li>
<li>step 4. Rebuild and install your system<span id="more-142"></span></li>
</ul>
<p>1. Gunakan  text editor favorit anda untuk create  file  cvsup-file-src dan isikan dengan di bawah ini</p>
<div>
<pre># Defaults that apply to all the collections
*default release=cvs
*default delete use-rel-suffix
*default umask=002
*default host=anoncvs3.usa.openbsd.org
*default base=/usr
*default prefix=/usr
*default tag=OPENBSD_4_7

# jika network anda adalah T1 / lebih cepat, berikan commnet line di bawah ini.
# *default compress

#OpenBSD-ports
#OpenBSD-all
OpenBSD-src
#OpenBSD-www
#OpenBSD-x11
#OpenBSD-xenocara

2. Updating source tree dengan cvsup-file-src file
<div># cvsup -g -L 2 cvsup-file-src

3. Compiling dan  installing  kernel
Backup kernel yang berjalan
<div># cp /bsd /bsd.old

configure kernel baru
# cd /usr/src/sys/arch/i386/conf/
<div>
<pre># config GENERIC
Don't forget to run "make depend"</pre>
</div>
<p>Finally compile dan install new kernel</p>
<div>
<pre># cd ../compile/GENERIC
# make clean &amp;&amp; make depend &amp;&amp; make &amp;&amp; make install</pre>
</div>
<p>Reboot server untuk mencoba kernel baru<br />
4. Rebuilding the system</p>
<p># rm -rf /usr/obj/*</p>
<div>
<pre># cd /usr/src
# make obj
# cd /usr/src/etc &amp;&amp; env DESTDIR=/ make distrib-dirs
# cd /usr/src
# make build</pre>
</div>
<p>DOne openbsd 4.7 anda sekarang sudah stable</p>
<p>tapi tunggu dl, port anda masih versi lama, saatnya mengupdate port</p>
<p>1. Gunakan  text editor favorit anda untuk create  file  cvsup-file-ports dan isikan dengan di bawah ini</p>
<div>
<pre># Defaults that apply to all the collections
*default release=cvs
*default delete use-rel-suffix
*default umask=002
*default host=anoncvs3.usa.openbsd.org
*default base=/usr
*default prefix=/usr
*default tag=OPENBSD_4_7

OpenBSD-ports
#OpenBSD-all
#OpenBSD-src
#OpenBSD-www
#OpenBSD-x11
#OpenBSD-xenocara</pre>
</div>
</div>
</div>
<p>2. Updating source tree dengan cvsup-file-ports file</p>
<div># cvsup -g -L 2 cvsup-file-ports</p>
<p>3. Checking ports kamu dengan script/command out-of-date</p>
<p>Output di bawah ini menjelaskan bahwa tidak membutuhkan update</p>
<div>
<pre># cd /usr/ports/infrastructure/build/
# ./out-of-date
Collecting installed packages
Collecting port versions: complete
Collecting port signatures: complete
Outdated ports:
#</pre>
</div>
<p>Output di bawah menjelaskan bahwa paket membutuhkan update</p>
<div>
<pre># cd /usr/ports/infrastructure/build/
# ./out-of-date
Collecting installed packages
Collecting port versions: complete
Collecting port signatures: complete
Outdated ports:
www/mozilla-firefox         # 3.0.6 -&gt; 3.0.7
#</pre>
</div>
<p>The only port needing upgrading in this example is Firefox.</p>
<p>4. Updating/Rebuilding your ports</p>
<p>Locate the Firefox port directory</p>
<div># find /usr/ports/ -name mozilla-firefox</div>
<p>Update the Firefox port to the latest release</p>
<div>
<pre># cd /usr/ports/www/mozilla-firefox/
# make update
</pre>
</div>
<p>3 of 3 - Updating and Building your Xenocara (X Window) System</p>
<ul>
<li>step 1. Create a cvsup configuration file for the Xenocara (X Window) system</li>
<li>step 2. Run cvsup with the configuration file</li>
<li>step 3. Rebuild the Xenocara (X Window) system</li>
</ul>
<p>1. Using your favorite text editor create a file called cvsup-file-xenocara</p>
<p># Defaults that apply to all the collections</p>
<div>
<pre>*default release=cvs
*default delete use-rel-suffix
*default umask=002
*default host=cvsup.no.openbsd.org
*default base=/usr
*default prefix=/usr
*default tag=OPENBSD_4_7

# If your network link is a T1 or faster, comment out the following line.
# *default compress

#OpenBSD-ports
#OpenBSD-all
#OpenBSD-src
#OpenBSD-www
#OpenBSD-x11
OpenBSD-xenocara</pre>
</div>
<p>Change cvsup.no.openbsd.org to a <a href="http://www.openbsd.org/cvsup.html#CVSROOT">server near you</a> and uncomment the OpenBSD-xenocara line.</p>
<p>2. Updating your ports tree with the cvsup-file-xenocara file</p>
<div># cvsup -g -L 2 cvsup-file-xenocara</div>
<p>The xenocara tree will be a 330 meg download the first time you run cvsup.</p>
<p>3. Rebuilding your Xenocara (X Window) system</p>
<div>
<pre># rm -rf /usr/xobj/*
# cd /usr/xenocara
# make bootstrap
# make obj
# make build
<h1>When Kernel Building Goes Bad</h1>

If the newly installed kernel will not boot then boot into a previous bootable kernel.

When you restart the system wait until you see something similar to the below
<div>
<pre>Using drive 0, partition 3.
Loading...
probing : pc0 com0 apm mem[634K 319M a20=on]
disk: fd0 hd0+
&gt;&gt; OpenBSD/i386 BOOT 3.01
boot&gt;</pre>
</div>
<p>at this point boot into a previous bootable kernel:</p>
<div>
<pre>Using drive 0, partition 3.
Loading...
probing : pc0 com0 apm mem[634K 319M a20=on]
disk: fd0 hd0+
&gt;&gt; OpenBSD/i386 BOOT 3.01
boot&gt; bsd.old</pre>
</div>
</pre>
</div>
</div>
</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=142</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Mendietkan&#8221; Kernel OBSD</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=139</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=139#comments</comments>
		<pubDate>Fri, 21 May 2010 02:52:02 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[uname -o]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=139</guid>
		<description><![CDATA[Kernel OBSD dan standar config kernel lainya cukup &#8220;gemuk&#8221; dan banyak makan resource jadi di butuhkan untuk mendietkan config kernel tersebut dan mengcompile ulang
berikut langkah2nya :
1. download kebutuhan file

Source code for the core system (128MB):  ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/src.tar.gz
Source code for the kernel (20MB):  ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/sys.tar.gz

When patching your port system or the Xenocara (X Window) system you will need [...]]]></description>
			<content:encoded><![CDATA[<p>Kernel OBSD dan standar config kernel lainya cukup &#8220;gemuk&#8221; dan banyak makan resource jadi di butuhkan untuk mendietkan config kernel tersebut dan mengcompile ulang</p>
<p>berikut langkah2nya :<span id="more-139"></span></p>
<p>1. download kebutuhan file</p>
<ul>
<li>Source code for the core system (128MB):  ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/src.tar.gz</li>
<li>Source code for the kernel (20MB):  ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/sys.tar.gz</li>
</ul>
<p>When patching your port system or the Xenocara (X Window) system you will need these sources:</p>
<ul>
<li>Source code for the port system (17MB):  ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/ports.tar.gz<a href="ftp://ftp.openbsd.org/pub/OpenBSD/4.7/ports.tar.gz"></a></li>
<li>Source code for the Xenocara (X Window) system (103MB):  ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/xenocara.tar.gz</li>
</ul>
<p>2. Extrack File2nya</p>
<p>extrack system source files</p>
<div>
<pre># mv src.tar.gz /usr/src
# cd /usr/src
# tar -xvzf src.tar.gz</pre>
</div>
<p>extrack  kernel source files</p>
<div>
<pre># mv sys.tar.gz /usr/src
# cd /usr/src
# tar -xvzf sys.tar.gz</pre>
</div>
<p>extrack  port system source files</p>
<div>
<pre># mv ports.tar.gz /usr
# cd /usr
# tar -xvzf ports.tar.gz</pre>
</div>
<p>extrack  Xenocara (X Window) system source files</p>
<div>
<pre># mv xenocara.tar.gz /usr
# cd /usr
# tar -xvzf xenocara.tar.gz

3. backup kernel lama
# cp /bsd /bsd.old

4. Lets Do it
<pre># cd /usr/src/sys/arch/i386/conf/
# cp GENERIC yusuf-kernel-config
# config yusuf-kernel-config
# cd ../compile/yusuf-kernel-config
# make clean &amp;&amp; make depend &amp;&amp; make &amp;&amp; make install
# reboot

stelah reboot kernel baru telah terinstall, cek dengan mengetik
# uname -a
OpenBSD
<pre>
<pre>yusuf-kernel-config.intranet.indolinux.com 4.6 yusuf-IDX#0 i386</pre>
</pre>
</pre>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=139</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mirror OpenBSD yang ada di Indonesia</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=136</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=136#comments</comments>
		<pubDate>Wed, 12 May 2010 04:59:57 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[ls /usr/ports/www]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=136</guid>
		<description><![CDATA[
openbsd.biz.net.id
Location: Jakarta, Indonesia - BizNetwork.Com
Maintained by Yudhi Prasetyo &#60;yudhi_prasetyo@biznetnetworks.com.&#62;
Mirror Type : FTP (can be access via http://openbsd.biz.net.id, updated daily)
Mirror Type : CVSUP (update every 15 minutes from cvsup.jp.OpenBSD.org)


ftp.openbsd.or.id
Location: Jakarta, Indonesia - Nusa.net.id (ISP)
Maintained by Muhammad Rully Sumbayak &#60;rullys@openbsd.or.id&#62;
Mirror Type : FTP (can be accessed via
ftp://ftp.openbsd.or.id/pub/OpenBSD, updated daily)

buntal.kebonbinatang.org
Location: Jakarta, Indonesia -
Maintained by Ozzie &#60;ozzienich@ozzie.web.id&#62;
Mirror Type : [...]]]></description>
			<content:encoded><![CDATA[<div>
<pre>openbsd.biz.net.id
Location: Jakarta, Indonesia - BizNetwork.Com
Maintained by Yudhi Prasetyo &lt;yudhi_prasetyo@biznetnetworks.com.&gt;
Mirror Type : FTP (can be access via http://openbsd.biz.net.id, updated daily)
Mirror Type : CVSUP (update every 15 minutes from cvsup.jp.OpenBSD.org)
</pre>
<pre><span id="more-136"></span>
ftp.openbsd.or.id
Location: Jakarta, Indonesia - Nusa.net.id (ISP)
Maintained by Muhammad Rully Sumbayak &lt;rullys@openbsd.or.id&gt;
Mirror Type : FTP (can be accessed via
ftp://ftp.openbsd.or.id/pub/OpenBSD, updated daily)
</pre>
<pre>buntal.kebonbinatang.org
Location: Jakarta, Indonesia -
Maintained by Ozzie &lt;ozzienich@ozzie.web.id&gt;
Mirror Type : CVSUP (update every 6 hours from cvsup.jp.OpenBSD.org)
</pre>
<pre>cvsup.scbd.net.id
Location: Jakarta, Indonesia - SCBDNet
Maintained by Hardani &lt;mas@hardani.com&gt;
Mirror Type : CVSUP
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=136</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing CPanel</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=131</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=131#comments</comments>
		<pubDate>Wed, 12 May 2010 02:44:30 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[RedHat - System]]></category>
		<category><![CDATA[ls /usr/ports/security]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=131</guid>
		<description><![CDATA[Berikut langkah &#8211; langkah yang dapat di gunakan untuk Mengamankan Server Cpanel dari RFI SQLI, Blind SQLI, Brute Froce, SYnc FLood, ICMP Flood, DDOS, XMAS Scanning, dll

1. Mod_security Digunakan untuk mencegah query dari sql injection dan blind sql injection pada applikasi web
aktifkan mod_security dengan default config yang telah di sediakan Main &#62; Plugin &#62; mod_security [...]]]></description>
			<content:encoded><![CDATA[<p>Berikut langkah &#8211; langkah yang dapat di gunakan untuk Mengamankan Server Cpanel dari RFI SQLI, Blind SQLI, Brute Froce, SYnc FLood, ICMP Flood, DDOS, XMAS Scanning, dll</p>
<p><span id="more-131"></span><br />
1. Mod_security Digunakan untuk mencegah query dari sql injection dan blind sql injection pada applikasi web</p>
<p>aktifkan mod_security dengan default config yang telah di sediakan Main &gt; Plugin &gt; mod_security klik edit dan klik default configuration untuk generate default configuration dan klik Save<br />
2. Apache Mod_userdir Protection mod_userdir apache yang memungkinkan pengguna untuk melihat situs mereka dengan memasukkan tilde (~) dan username mereka sebagai uri pada host tertentu. Misalnya <a title="http://test.cpanel.net/" rel="nofollow" href="http://test.cpanel.net/">http://test.cpanel.net/</a> ~ fred / akan memunculkan pengguna fred&#8217;s domain. Kerugian dari fitur ini adalah bahwa setiap penggunaan bandwidth yang digunakan oleh situs ini akan dimasukkan pada domain ini diakses bawah (dalam hal ini test.cpanel.net). perlindungan mod_userdir mencegah hal ini terjadi. Namun Anda mungkin ingin menonaktifkan pilihan ini virtual host tertentu (biasanya bersama host ssl.)</p>
<p>Main &gt;&gt; Security Center &gt;&gt; Apache mod_userdir Tweak Ceklist Enable mod_userdir Protection dan Save<br />
3. cPHulk Brute Force Protection Untuk mencegah Brute Force aktifkan featur ini</p>
<p>Main &gt;&gt; Security Center &gt;&gt; cPHulk Brute Force Protection set to Enable<br />
4. Host Access Control Pemberian batasan akses kepada service tertentu ke dalam file /etc/hosts atau TCP_wrapper</p>
<p>Main &gt;&gt; Security Center &gt;&gt; Host Access Control Sample Daemon  	Access List  	   	Action  	   	Comment sshd 	192.168.0.0/255.255.255.0 	  	allow 	  	Allow local SSH access sshd 	198.66.254.254 	  	allow 	  	Allow SSH from my specific IP sshd 	ALL 	  	deny 	  	Deny access from all other IPs<br />
5. PHP open_basedir Tweak PHP&#8217;s open_basedir protection prevents users from opening files outside of their home directory with php.</p>
<p>klik Enable php open_basedir Protection  dan save<br />
6. Disable Function pada php.ini Beberapa attacker sering menggunakan php shell yang banyak di gunakan di internet yang function dari phpnya terlalu standart sehingga kita bisa mendisablenya</p>
<p>hati2 dalam mendisable_function, bisa2 website anda yang menggunakan fungsi tersebut tidak akan berjalan</p>
<p>berikut configurasi php.ini pada server saya</p>
<p><code class="codecolorer bash blackboard"><span class="bash"><span style="color: #000000; font-weight: bold;">&lt;</span>pre<span style="color: #000000; font-weight: bold;">&gt;</span>disable_functions = join_indobacktrack_or_id,maintenance_by_yusuf_indobacktrack_team,<span style="color: #7a0874; font-weight: bold;">exec</span>,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime<br />
<br />
display_errors = Off<br />
html_errors = Off<br />
display_startup_errors = Off<br />
log_errors = On<br />
allow_url_fopen = Off</span></code></p>
<p>7. Editing SSH  &#8211; Gunakan SSH key untuk login ke ssh server dan disable password authentication &#8211; Edit sshd_config /etc/ssh/sshd_config Tambahakan AllowUsers yusuf admin1  admin2 PermitRootLogin no protocol 2 port 3333 dll </p>
<p>8. Install Config Security Firewall dan Login Failure Detection, pastikan semua ceklist di bawah ini OK</p>
<p><code class="codecolorer bash blackboard"><span class="bash"><span style="color: #000000; font-weight: bold;">&lt;</span>pre<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #666666; font-style: italic;">###############################################################################</span><br />
<span style="color: #666666; font-style: italic;"># Copyright 2006-2010, Way to the Web Limited</span><br />
<span style="color: #666666; font-style: italic;"># URL: http://www.configserver.com</span><br />
<span style="color: #666666; font-style: italic;"># Email: sales@waytotheweb.com</span><br />
<span style="color: #666666; font-style: italic;">###############################################################################</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Testing flag - enables a CRON job that clears iptables incase of</span><br />
<span style="color: #666666; font-style: italic;"># configuration problems when you start csf. This should be enabled until you</span><br />
<span style="color: #666666; font-style: italic;"># are sure that the firewall works - i.e. incase you get locked out of your</span><br />
<span style="color: #666666; font-style: italic;"># server! Then do remember to set it to 0 and restart csf when you're sure</span><br />
<span style="color: #666666; font-style: italic;"># everything is OK. Stopping csf will remove the line from /etc/crontab</span><br />
TESTING = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The interval for the crontab in minutes. Since this uses the system clock the</span><br />
<span style="color: #666666; font-style: italic;"># CRON job will run at the interval past the hour and not from when you issue</span><br />
<span style="color: #666666; font-style: italic;"># the start command. Therefore an interval of 5 minutes means the firewall</span><br />
<span style="color: #666666; font-style: italic;"># will be cleared in 0-5 minutes from the firewall start</span><br />
TESTING_INTERVAL = <span style="color: #ff0000;">&quot;5&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enabling auto updates creates a cron job called /etc/cron.d/csf_update which</span><br />
<span style="color: #666666; font-style: italic;"># runs once per day to see if there is an update to csf+lfd and upgrades if</span><br />
<span style="color: #666666; font-style: italic;"># available and restarts csf and lfd. Updates do not overwrite configuration</span><br />
<span style="color: #666666; font-style: italic;"># files or email templates. An email will be sent to the root account if an</span><br />
<span style="color: #666666; font-style: italic;"># update is performed</span><br />
AUTO_UPDATES = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># By default, csf will auto-configure iptables to filter all traffic except on</span><br />
<span style="color: #666666; font-style: italic;"># the loopback device. If you only want iptables rules applied to a specific</span><br />
<span style="color: #666666; font-style: italic;"># NIC, then list it here (e.g. eth1, or eth+)</span><br />
ETH_DEVICE = <span style="color: #ff0000;">&quot;eth0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you don't want iptables rules applied to specific NICs, then list them in</span><br />
<span style="color: #666666; font-style: italic;"># a comma separated list (e.g &quot;eth1,eth2&quot;)</span><br />
ETH_DEVICE_SKIP = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Lists of ports in the following comma separated lists can be added using a</span><br />
<span style="color: #666666; font-style: italic;"># colon (e.g. 30000:35000).</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow incoming TCP ports</span><br />
TCP_IN = <span style="color: #ff0000;">&quot;20,21,10022,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow outgoing TCP ports</span><br />
TCP_OUT = <span style="color: #ff0000;">&quot;20,21,10022,25,37,43,53,80,110,113,443,587,873,2087,2089,2703&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow incoming UDP ports</span><br />
UDP_IN = <span style="color: #ff0000;">&quot;20,21,53&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow outgoing UDP ports</span><br />
<span style="color: #666666; font-style: italic;"># To allow outgoing traceroute add 33434:33523 to this list</span><br />
UDP_OUT = <span style="color: #ff0000;">&quot;20,21,53,113,123,873,6277&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow incoming PING</span><br />
ICMP_IN = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the per IP address incoming ICMP packet rate</span><br />
<span style="color: #666666; font-style: italic;"># To disable rate limiting set to &quot;0&quot;</span><br />
ICMP_IN_RATE = <span style="color: #ff0000;">&quot;1/s&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Allow outgoing PING</span><br />
ICMP_OUT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the per IP address outgoing ICMP packet rate (hits per second allowed),</span><br />
<span style="color: #666666; font-style: italic;"># e.g. &quot;1/s&quot;</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Recommend disabling on cPanel servers as cPanel uses ping test to determine</span><br />
<span style="color: #666666; font-style: italic;"># fastest mirrors for various functions</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To disable rate limiting set to &quot;0&quot;</span><br />
ICMP_OUT_RATE = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Block outgoing SMTP except for root, exim and mailman (forces scripts/users</span><br />
<span style="color: #666666; font-style: italic;"># to use the exim/sendmail binary instead of sockets access). This replaces the</span><br />
<span style="color: #666666; font-style: italic;"># protection as WHM &gt; Tweak Settings &gt; SMTP Tweaks</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This option uses the iptables ipt_owner module and must be loaded for it to</span><br />
<span style="color: #666666; font-style: italic;"># work. It may not be available on some VPS platforms</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: Run /etc/csf/csftest.pl to check whether this option will function on</span><br />
<span style="color: #666666; font-style: italic;"># this server</span><br />
SMTP_BLOCK = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If SMTP_BLOCK is enabled but you want to allow local connections to port 25</span><br />
<span style="color: #666666; font-style: italic;"># on the server (e.g. for webmail or web scripts) then enable this option to</span><br />
<span style="color: #666666; font-style: italic;"># allow outgoing SMTP connections to the loopback device</span><br />
SMTP_ALLOWLOCAL = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This is a comma separated list of the ports to block. You should list all</span><br />
<span style="color: #666666; font-style: italic;"># ports that exim is configured to listen on</span><br />
SMTP_PORTS = <span style="color: #ff0000;">&quot;25&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Always allow the following comma separated users and groups to bypass</span><br />
<span style="color: #666666; font-style: italic;"># SMTP_BLOCK</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: root (UID:0) is always allowed</span><br />
SMTP_ALLOWUSER = <span style="color: #ff0000;">&quot;cpanel&quot;</span><br />
SMTP_ALLOWGROUP = <span style="color: #ff0000;">&quot;mail,mailman&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Drop target for iptables rules. This can be set to either DROP ot REJECT.</span><br />
<span style="color: #666666; font-style: italic;"># REJECT will send back an error packet, DROP will not respond at all. REJECT</span><br />
<span style="color: #666666; font-style: italic;"># is more polite, however it does provide extra information to a hacker and</span><br />
<span style="color: #666666; font-style: italic;"># lets them know that a firewall is blocking their attempts. DROP hangs their</span><br />
<span style="color: #666666; font-style: italic;"># connection, thereby frustrating attempts to port scan the server.</span><br />
DROP = <span style="color: #ff0000;">&quot;DROP&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable logging of dropped connections to blocked ports to syslog, usually</span><br />
<span style="color: #666666; font-style: italic;"># /var/log/messages. This option needs to be enabled to use Port Scan Tracking</span><br />
DROP_LOGGING = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable logging of dropped connections to blocked IP addresses in csf.deny or</span><br />
<span style="color: #666666; font-style: italic;"># by lfd with temporary connection tracking blocks</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This option will be disabled if you enable Port Scan Tracking (PS_INTERVAL)</span><br />
DROP_IP_LOGGING = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Only log reserved port dropped connections (0:1023). Useful since you're not</span><br />
<span style="color: #666666; font-style: italic;"># usually bothered about ephemeral port drops</span><br />
DROP_ONLYRES = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Commonly blocked ports that you do not want logging as they tend to just fill</span><br />
<span style="color: #666666; font-style: italic;"># up the log file. These ports are specifically blocked (applied to TCP and UDP</span><br />
<span style="color: #666666; font-style: italic;"># protocols) for incoming connections</span><br />
DROP_NOLOG = <span style="color: #ff0000;">&quot;67,68,111,113,135:139,445,513,520&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable packet filtering for unwanted or illegal packets</span><br />
PACKET_FILTER = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Log packets dropped by the packet filtering option PACKET_FILTER. This will</span><br />
<span style="color: #666666; font-style: italic;"># show packet drops that iptables has deemed INVALID (i.e. there is no</span><br />
<span style="color: #666666; font-style: italic;"># established TCP connection in the state table), or if the TCP flags in the</span><br />
<span style="color: #666666; font-style: italic;"># packet are out of sequence or illegal in the protocol exchange.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># If you see packets being dropped that you would rather allow then disable the</span><br />
<span style="color: #666666; font-style: italic;"># PACKET_FILTER option above by setting it to &quot;0&quot;</span><br />
DROP_PF_LOGGING = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Configure csf to watch IP addresses (with csf -w [ip]). This option will add</span><br />
<span style="color: #666666; font-style: italic;"># overhead to packet traversal through iptables and syslog logging, so should</span><br />
<span style="color: #666666; font-style: italic;"># only be enabled while actively watching IP addresses. See readme.txt for more</span><br />
<span style="color: #666666; font-style: italic;"># information on the use of this option</span><br />
WATCH_MODE = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable SYN Flood Protection. This option configures iptables to offer some</span><br />
<span style="color: #666666; font-style: italic;"># protection from tcp SYN packet DOS attempts. You should set the RATE so that</span><br />
<span style="color: #666666; font-style: italic;"># false-positives are kept to a minimum otherwise visitors may see connection</span><br />
<span style="color: #666666; font-style: italic;"># issues (check /var/log/messages for *SYNFLOOD Blocked*). See the iptables</span><br />
<span style="color: #666666; font-style: italic;"># man page for the correct --limit rate syntax</span><br />
SYNFLOOD = <span style="color: #ff0000;">&quot;1&quot;</span><br />
SYNFLOOD_RATE = <span style="color: #ff0000;">&quot;100/s&quot;</span><br />
SYNFLOOD_BURST = <span style="color: #ff0000;">&quot;150&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Port Flood Protection. This option configures iptables to offer protection</span><br />
<span style="color: #666666; font-style: italic;"># from DOS attacks against specific ports. This option limits the number of</span><br />
<span style="color: #666666; font-style: italic;"># connections per time interval that new connections can be made to specific</span><br />
<span style="color: #666666; font-style: italic;"># ports</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This feature does not work on servers that do not have the iptables module</span><br />
<span style="color: #666666; font-style: italic;"># ipt_recent loaded. Typically, this will be with MONOLITHIC kernels. VPS</span><br />
<span style="color: #666666; font-style: italic;"># server admins should check with their VPS host provider that the iptables</span><br />
<span style="color: #666666; font-style: italic;"># module is included</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># For further information and syntax refer to the Port Flood section of the csf</span><br />
<span style="color: #666666; font-style: italic;"># readme.txt</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: Run /etc/csf/csftest.pl to check whether this option will function on</span><br />
<span style="color: #666666; font-style: italic;"># this server</span><br />
PORTFLOOD = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable verbose output of iptables commands</span><br />
VERBOSE = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Log lfd messages to SYSLOG in addition to /var/log/lfd.log. You must have the</span><br />
<span style="color: #666666; font-style: italic;"># perl module Sys::Syslog installed to use this feature</span><br />
SYSLOG = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable this option if you wish to allow access from all IP's that have</span><br />
<span style="color: #666666; font-style: italic;"># authenticated using POP before SMTP (i.e. are valid clients). This option</span><br />
<span style="color: #666666; font-style: italic;"># checks for IP addresses in /etc/relayhosts, which last for 30 minutes in that</span><br />
<span style="color: #666666; font-style: italic;"># file after a successful POP authentication.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set the value to 0 to disable the feature</span><br />
RELAYHOSTS = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable this option if you want lfd to ignore (i.e. don't block) IP addresses</span><br />
<span style="color: #666666; font-style: italic;"># listed in csf.allow in addition to csf.ignore (the default). This option</span><br />
<span style="color: #666666; font-style: italic;"># should be used with caution as it would mean that IP's allowed through the</span><br />
<span style="color: #666666; font-style: italic;"># firewall from infected PC's could launch attacks on the server that lfd</span><br />
<span style="color: #666666; font-style: italic;"># would ignore</span><br />
IGNORE_ALLOW = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable the following option if you want to apply strict iptables rules to DNS</span><br />
<span style="color: #666666; font-style: italic;"># traffic (i.e. relying on iptables connection tracking). Enabling this option</span><br />
<span style="color: #666666; font-style: italic;"># could cause DNS resolution issues both to and from the server but could help</span><br />
<span style="color: #666666; font-style: italic;"># prevent abuse of the local DNS server</span><br />
DNS_STRICT = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Limit the number of IP's kept in the /etc/csf/csf.deny file. This can be</span><br />
<span style="color: #666666; font-style: italic;"># important as a large number of IP addresses create a large number of iptables</span><br />
<span style="color: #666666; font-style: italic;"># rules (4 times the number of IP's) which can cause problems on some systems</span><br />
<span style="color: #666666; font-style: italic;"># where either the the number of iptables entries has been limited (esp VPS's)</span><br />
<span style="color: #666666; font-style: italic;"># or where resources are limited. This can result in slow network performance,</span><br />
<span style="color: #666666; font-style: italic;"># or, in the case of iptables entry limits, can prevent your server from</span><br />
<span style="color: #666666; font-style: italic;"># booting as not all the required iptables chain settings will be correctly</span><br />
<span style="color: #666666; font-style: italic;"># configured. The value set here is the maximum number of IPs/CIDRs allowed</span><br />
<span style="color: #666666; font-style: italic;"># if the limit is reached, the entries will be rotated so that the oldest</span><br />
<span style="color: #666666; font-style: italic;"># entries (i.e. the ones at the top) will be removed and the latest is added.</span><br />
<span style="color: #666666; font-style: italic;"># The limit is only checked when using csf -d (which is what lfd also uses)</span><br />
<span style="color: #666666; font-style: italic;"># Set to 0 to disable limiting</span><br />
DENY_IP_LIMIT = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Limit the number of IP's kept in the temprary IP ban list. If the limit is</span><br />
<span style="color: #666666; font-style: italic;"># reached the oldest IP's in the ban list will be removed and allowed</span><br />
<span style="color: #666666; font-style: italic;"># regardless of the amount of time remaining for the block</span><br />
<span style="color: #666666; font-style: italic;"># Set to 0 to disable limiting</span><br />
DENY_TEMP_IP_LIMIT = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable login failure detection daemon (lfd). If set to 0 none of the</span><br />
<span style="color: #666666; font-style: italic;"># following settings will have any effect as the daemon won't start.</span><br />
LF_DAEMON = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># By default, lfd will send alert emails using the relevant alert template to</span><br />
<span style="color: #666666; font-style: italic;"># the To: address configured within that template. Setting the following</span><br />
<span style="color: #666666; font-style: italic;"># option will override the configured To: field in all lfd alert emails</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Leave this option empty to use the To: field setting in each alert template</span><br />
LF_ALERT_TO = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># By default, lfd will send alert emails using the relevant alert template from</span><br />
<span style="color: #666666; font-style: italic;"># the From: address configured within that template. Setting the following</span><br />
<span style="color: #666666; font-style: italic;"># option will override the configured From: field in all lfd alert emails</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Leave this option empty to use the From: field setting in each alert template</span><br />
LF_ALERT_FROM = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># In addition to the standard lfd email alerts, you can additionally enable the</span><br />
<span style="color: #666666; font-style: italic;"># sending of X-ARF reports (see http://www.x-arf.org/specification.html). Only</span><br />
<span style="color: #666666; font-style: italic;"># block alert messages will be sent.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># These reports are in a format accepted by many Netblock owners and should</span><br />
<span style="color: #666666; font-style: italic;"># help them investigate abuse. This option is not designed to automatically</span><br />
<span style="color: #666666; font-style: italic;"># forward these reports to the Netblock owners and should be checked for</span><br />
<span style="color: #666666; font-style: italic;"># false-positive blocks before reporting</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: The following block types are not reported through this feature:</span><br />
<span style="color: #666666; font-style: italic;"># &nbsp; &nbsp; &nbsp; LF_PERMBLOCK, LF_NETBLOCK, LF_DISTATTACK, LF_DISTFTP, RT_*_ALERT</span><br />
X_ARF = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># By default, lfd will send emails from the root forwarder. Setting the</span><br />
<span style="color: #666666; font-style: italic;"># following option will override this</span><br />
X_ARF_FROM = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># By default, lfd will send emails to the root forwarder. Setting the following</span><br />
<span style="color: #666666; font-style: italic;"># option will override this</span><br />
X_ARF_TO = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Block Reporting. lfd can run an external script when it performs and IP</span><br />
<span style="color: #666666; font-style: italic;"># address block following for example a login failure. The following setting</span><br />
<span style="color: #666666; font-style: italic;"># is to the full path of the external script which must be executable. See</span><br />
<span style="color: #666666; font-style: italic;"># readme.txt for format details</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Leave this setting blank to disable</span><br />
BLOCK_REPORT = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an alert if log file flooding is detected which causes lfd to skip log</span><br />
<span style="color: #666666; font-style: italic;"># lines to prevent lfd from looping. If this alert is sent you should check the</span><br />
<span style="color: #666666; font-style: italic;"># reported log file for the reason for the flooding</span><br />
LOGFLOOD_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Temporary to Permanent IP blocking. The following enables this feature to</span><br />
<span style="color: #666666; font-style: italic;"># permanently block IP addresses that have been temporarily blocked more than</span><br />
<span style="color: #666666; font-style: italic;"># LF_PERMBLOCK_COUNT times in the last LF_PERMBLOCK_INTERVAL seconds. Set</span><br />
<span style="color: #666666; font-style: italic;"># LF_PERMBLOCK &nbsp;to &quot;1&quot; to enable this feature</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Care needs to be taken when setting LF_PERMBLOCK_INTERVAL as it needs to be</span><br />
<span style="color: #666666; font-style: italic;"># at least LF_PERMBLOCK_COUNT multiplied by the longest temporary time setting</span><br />
<span style="color: #666666; font-style: italic;"># (TTL) for blocked IPs, to be effective</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set LF_PERMBLOCK to &quot;0&quot; to disable this feature</span><br />
LF_PERMBLOCK = <span style="color: #ff0000;">&quot;1&quot;</span><br />
LF_PERMBLOCK_INTERVAL = <span style="color: #ff0000;">&quot;172800&quot;</span><br />
LF_PERMBLOCK_COUNT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
LF_PERMBLOCK_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Permanently block IPs by network class. The following enables this feature</span><br />
<span style="color: #666666; font-style: italic;"># to permanently block classes of IP address where individual IP addresses</span><br />
<span style="color: #666666; font-style: italic;"># within the same class LF_NETBLOCK_CLASS have already been blocked more than</span><br />
<span style="color: #666666; font-style: italic;"># LF_NETBLOCK_COUNT times in the last LF_NETBLOCK_INTERVAL seconds. Set</span><br />
<span style="color: #666666; font-style: italic;"># LF_NETBLOCK &nbsp;to &quot;1&quot; to enable this feature</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This can be an affective way of blocking DDOS attacks launched from within</span><br />
<span style="color: #666666; font-style: italic;"># the same networ class</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Valid settings for LF_NETBLOCK_CLASS are &quot;A&quot;, &quot;B&quot; and &quot;C&quot;, care and</span><br />
<span style="color: #666666; font-style: italic;"># consideration is required when blocking network classes A or B</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set LF_NETBLOCK to &quot;0&quot; to disable this feature</span><br />
LF_NETBLOCK = <span style="color: #ff0000;">&quot;0&quot;</span><br />
LF_NETBLOCK_INTERVAL = <span style="color: #ff0000;">&quot;86400&quot;</span><br />
LF_NETBLOCK_COUNT = <span style="color: #ff0000;">&quot;4&quot;</span><br />
LF_NETBLOCK_CLASS = <span style="color: #ff0000;">&quot;C&quot;</span><br />
LF_NETBLOCK_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Safe Chain Update. If enabled, all dynamic update chains (GALLOW*, GDENY*,</span><br />
<span style="color: #666666; font-style: italic;"># SPAMHAUS, DSHIELD, BOGON, CC_ALLOW, CC_DENY, ALLOWDYN*) will create a new</span><br />
<span style="color: #666666; font-style: italic;"># chain when updating, and insert it into the relevant LOCALINPUT/LOCALOUTPUT</span><br />
<span style="color: #666666; font-style: italic;"># chain, then flush and delete the old dynamic chain and rename the new chain.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This prevents a small window of opportunity opening when an update occurs and</span><br />
<span style="color: #666666; font-style: italic;"># the dynamic chain is flushed for the new rules.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This option should not be enabled on servers with long dynamic chains (e.g.</span><br />
<span style="color: #666666; font-style: italic;"># CC_DENY/CC_ALLOW lists) and low memory. It should also not be enabled on</span><br />
<span style="color: #666666; font-style: italic;"># Virtuozzo VPS servers with a restricted numiptent value. This is because each</span><br />
<span style="color: #666666; font-style: italic;"># chain will effectively be duplicated while the update occurs, doubling the</span><br />
<span style="color: #666666; font-style: italic;"># number of iptables rules</span><br />
SAFECHAINUPDATE = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you wish to allow access from dynamic DNS records (for example if your IP</span><br />
<span style="color: #666666; font-style: italic;"># address changes whenever you connect to the internet but you have a dedicated</span><br />
<span style="color: #666666; font-style: italic;"># dynamic DNS record from the likes of dyndns.org) then you can list the FQDN</span><br />
<span style="color: #666666; font-style: italic;"># records in csf.dyndns and then set the following to the number of seconds to</span><br />
<span style="color: #666666; font-style: italic;"># poll for a change in the IP address. If the IP address has changed iptables</span><br />
<span style="color: #666666; font-style: italic;"># will be updated.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># A setting of 600 would check for IP updates every 10 minutes. Set the value</span><br />
<span style="color: #666666; font-style: italic;"># to 0 to disable the feature</span><br />
DYNDNS = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># To always ignore DYNDNS IP addresses in lfd blocking, set the following</span><br />
<span style="color: #666666; font-style: italic;"># option to 1</span><br />
DYNDNS_IGNORE = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The follow Global options allow you to specify a URL where csf can grab a</span><br />
<span style="color: #666666; font-style: italic;"># centralised copy of an IP allow or deny block list of your own. You need to</span><br />
<span style="color: #666666; font-style: italic;"># specify the full URL in the following options, i.e.:</span><br />
<span style="color: #666666; font-style: italic;"># http://www.somelocation.com/allow.txt</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># The actual retrieval of these IP's is controlled by lfd, so you need to set</span><br />
<span style="color: #666666; font-style: italic;"># LF_GLOBAL to the interval (in seconds) when you want lfd to retrieve. lfd</span><br />
<span style="color: #666666; font-style: italic;"># will perform the retrieval when it runs and then again at the specified</span><br />
<span style="color: #666666; font-style: italic;"># interval. A sensible interval would probably be every 3600 seconds (1 hour)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># You do not have to specify both an allow and a deny file</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># You can also configure a global ignore file for IP's that lfd should ignore</span><br />
LF_GLOBAL = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
GLOBAL_ALLOW = <span style="color: #ff0000;">&quot;&quot;</span><br />
GLOBAL_DENY = <span style="color: #ff0000;">&quot;&quot;</span><br />
GLOBAL_IGNORE = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Provides the same functionality as DYNDNS but with a GLOBAL URL file. Set</span><br />
<span style="color: #666666; font-style: italic;"># this to the URL of the file containing DYNDNS entries</span><br />
GLOBAL_DYNDNS = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the following to the number of seconds to poll for a change in the IP</span><br />
<span style="color: #666666; font-style: italic;"># address resoved from GLOBAL_DYNDNS</span><br />
GLOBAL_DYNDNS_INTERVAL = <span style="color: #ff0000;">&quot;600&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># To always ignore GLOBAL_DYNDNS IP addresses in lfd blocking, set the following</span><br />
<span style="color: #666666; font-style: italic;"># option to 1</span><br />
GLOBAL_DYNDNS_IGNORE = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Country Code to CIDR allow/deny. In the following two options you can allow</span><br />
<span style="color: #666666; font-style: italic;"># or deny whole country CIDR ranges. The CIDR blocks are generated from the</span><br />
<span style="color: #666666; font-style: italic;"># Maxmind GeoLite Country database http://www.maxmind.com/app/geolitecountry</span><br />
<span style="color: #666666; font-style: italic;"># and entirely relies on that service being available</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Specify the the two-letter ISO Country Code(s). The iptables rules are for</span><br />
<span style="color: #666666; font-style: italic;"># incoming connections only</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: These lists are never 100% accurate and some ISP's (e.g. AOL) use</span><br />
<span style="color: #666666; font-style: italic;"># non-geographic IP address designations for their clients</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: Some of the CIDR lists are huge and each one requires a rule within</span><br />
<span style="color: #666666; font-style: italic;"># the incoming iptables chain. This can result in significant performance</span><br />
<span style="color: #666666; font-style: italic;"># overheads and could render the server inaccessible in some circumstances. For</span><br />
<span style="color: #666666; font-style: italic;"># this reason (amongst others) we do not recommend using these options</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: Due to the resource constraints on VPS servers this feature should</span><br />
<span style="color: #666666; font-style: italic;"># not be used on such systems unless you choose very small CC zones</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: CC_ALLOW allows access through all ports in the firewall. For this</span><br />
<span style="color: #666666; font-style: italic;"># reason CC_ALLOW probably has very limited use</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># If you use this feature you should consider a donation to:</span><br />
<span style="color: #666666; font-style: italic;"># http://iplocationtools.com/donate.php</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Each option is a comma separated list of CC's, e.g. &quot;US,GB,DE&quot;</span><br />
CC_DENY = <span style="color: #ff0000;">&quot;&quot;</span><br />
CC_ALLOW = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># An alternative to CC_ALLOW is to only allow access from the following</span><br />
<span style="color: #666666; font-style: italic;"># countries but still filter based on the port and packets rules. All other</span><br />
<span style="color: #666666; font-style: italic;"># connections are dropped</span><br />
CC_ALLOW_FILTER = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option tells lfd how often to retrieve the Maxmind GeoLite Country</span><br />
<span style="color: #666666; font-style: italic;"># database for CC_ALLOW, CC_ALLOW_FILTER and CC_DENY (in days)</span><br />
CC_INTERVAL = <span style="color: #ff0000;">&quot;7&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable IP range blocking using the DShield Block List at</span><br />
<span style="color: #666666; font-style: italic;"># http://feeds.dshield.org/block.txt</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature, set the following to the interval in seconds that you</span><br />
<span style="color: #666666; font-style: italic;"># want the block list updated. The list is reasonably static during the length</span><br />
<span style="color: #666666; font-style: italic;"># of a day, so it would be appropriate to only update once every 24 hours, so</span><br />
<span style="color: #666666; font-style: italic;"># a value of &quot;86400&quot; is recommended</span><br />
LF_DSHIELD = <span style="color: #ff0000;">&quot;86400&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The DShield block list URL. If you change this to something else be sure it</span><br />
<span style="color: #666666; font-style: italic;"># is in the same format as the block list</span><br />
LF_DSHIELD_URL = <span style="color: #ff0000;">&quot;http://feeds.dshield.org/block.txt&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable IP range blocking using the Spamhaus DROP List at</span><br />
<span style="color: #666666; font-style: italic;"># http://www.spamhaus.org/drop/index.lasso</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature, set the following to the interval in seconds that you</span><br />
<span style="color: #666666; font-style: italic;"># want the block list updated. The list is reasonably static during the length</span><br />
<span style="color: #666666; font-style: italic;"># of a day, so it would be appropriate to only update once every 24 hours, so</span><br />
<span style="color: #666666; font-style: italic;"># a value of &quot;86400&quot; is recommended</span><br />
LF_SPAMHAUS = <span style="color: #ff0000;">&quot;86400&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The Spamhaus DROP List URL. If you change this to something else be sure it</span><br />
<span style="color: #666666; font-style: italic;"># is in the same format as the drop list</span><br />
LF_SPAMHAUS_URL = <span style="color: #ff0000;">&quot;http://www.spamhaus.org/drop/drop.lasso&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable IP range blocking using the BOGON List at</span><br />
<span style="color: #666666; font-style: italic;"># http://www.cymru.com/Bogons/</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature, set the following to the interval in seconds that you</span><br />
<span style="color: #666666; font-style: italic;"># want the block list updated. The list is reasonably static during the length</span><br />
<span style="color: #666666; font-style: italic;"># of a day, so it would be appropriate to only update once every 24 hours, so</span><br />
<span style="color: #666666; font-style: italic;"># a value of &quot;86400&quot; is recommended</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Do NOT use this option if your server uses IP's on the bogon list (e.g. this</span><br />
<span style="color: #666666; font-style: italic;"># is often the case with servers behind a NAT firewall using ip routing)</span><br />
LF_BOGON = <span style="color: #ff0000;">&quot;86400&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The BOGON List URL. If you change this to something else be sure it</span><br />
<span style="color: #666666; font-style: italic;"># is in the same format as the drop list</span><br />
LF_BOGON_URL = <span style="color: #ff0000;">&quot;http://www.cymru.com/Documents/bogon-bn-agg.txt&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The following[*] triggers are application specific. If you set LF_TRIGGER to</span><br />
<span style="color: #666666; font-style: italic;"># &quot;0&quot; the value of each trigger is the number of failures against that</span><br />
<span style="color: #666666; font-style: italic;"># application that will trigger lfd to block the IP address</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># If you set LF_TRIGGER to a value greater than &quot;0&quot; then the following[*]</span><br />
<span style="color: #666666; font-style: italic;"># application triggers are simply on or off (&quot;0&quot; or &quot;1&quot;) and the value of</span><br />
<span style="color: #666666; font-style: italic;"># LF_TRIGGER is the total cumulative number of failures that will trigger lfd</span><br />
<span style="color: #666666; font-style: italic;"># to block the IP address</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Setting the application trigger to &quot;0&quot; disables it</span><br />
LF_TRIGGER = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If LF_TRIGGER is &gt; 1 then the following can be set to &quot;1&quot; to permanently</span><br />
<span style="color: #666666; font-style: italic;"># block the IP address, or if set to a value greater than &quot;1&quot; then the IP</span><br />
<span style="color: #666666; font-style: italic;"># address will be blocked temporarily for the value in seconds. For example:</span><br />
<span style="color: #666666; font-style: italic;"># LF_TRIGGER_PERM = &quot;1&quot; =&gt; the IP is blocked permanently</span><br />
<span style="color: #666666; font-style: italic;"># LF_TRIGGER_PERM = &quot;3600&quot; =&gt; the IP is blocked temporarily for 1 hour</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># If LF_TRIGGER is 0, then the application LF_[application]_PERM value works in</span><br />
<span style="color: #666666; font-style: italic;"># the same way as above</span><br />
LF_TRIGGER_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># To only block access to the failed application instead of a complete block</span><br />
<span style="color: #666666; font-style: italic;"># for an ip address, you can set the following to &quot;1&quot;, but LF_TRIGGER must be</span><br />
<span style="color: #666666; font-style: italic;"># set to &quot;0&quot; with specific application[*] trigger levels also set</span><br />
LF_SELECT = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an email alert if an IP address is blocked by one of the [*] triggers</span><br />
LF_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of sshd connections</span><br />
LF_SSHD = <span style="color: #ff0000;">&quot;10&quot;</span><br />
LF_SSHD_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of pure-ftpd connections</span><br />
LF_FTPD = <span style="color: #ff0000;">&quot;20&quot;</span><br />
LF_FTPD_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of SMTP AUTH connections</span><br />
LF_SMTPAUTH = <span style="color: #ff0000;">&quot;20&quot;</span><br />
LF_SMTPAUTH_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of courier pop3 connections. This will not</span><br />
<span style="color: #666666; font-style: italic;"># trap the older cppop daemon</span><br />
LF_POP3D = <span style="color: #ff0000;">&quot;20&quot;</span><br />
LF_POP3D_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of courier imap connections. This will not</span><br />
<span style="color: #666666; font-style: italic;"># trap the older cpimap (uwimap) daemon</span><br />
LF_IMAPD = <span style="color: #ff0000;">&quot;20&quot;</span><br />
LF_IMAPD_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of Apache .htpasswd connections</span><br />
<span style="color: #666666; font-style: italic;"># Due to the often high logging rate in the Apache error log, you might want to</span><br />
<span style="color: #666666; font-style: italic;"># enable this option only if you know you are suffering from attacks against</span><br />
<span style="color: #666666; font-style: italic;"># password protected directories</span><br />
LF_HTACCESS = <span style="color: #ff0000;">&quot;10&quot;</span><br />
LF_HTACCESS_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable login failure detection of cpanel, webmail and whm connections</span><br />
LF_CPANEL = <span style="color: #ff0000;">&quot;5&quot;</span><br />
LF_CPANEL_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable failure detection of repeated Apache mod_security rule triggers</span><br />
<span style="color: #666666; font-style: italic;"># Due to the often high logging rate in the Apache error log, you might want to</span><br />
<span style="color: #666666; font-style: italic;"># enable this option only if you know you are suffering from attacks against</span><br />
<span style="color: #666666; font-style: italic;"># web scripts</span><br />
LF_MODSEC = <span style="color: #ff0000;">&quot;20&quot;</span><br />
LF_MODSEC_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable detection of repeated BIND denied requests</span><br />
<span style="color: #666666; font-style: italic;"># This option should be enabled with care as it will prevent blocked IPs from</span><br />
<span style="color: #666666; font-style: italic;"># resolving any domains on the server. You might want to set the trigger value</span><br />
<span style="color: #666666; font-style: italic;"># reasonably high to avoid this</span><br />
<span style="color: #666666; font-style: italic;"># Example: LF_BIND = &quot;100&quot;</span><br />
LF_BIND = <span style="color: #ff0000;">&quot;100&quot;</span><br />
LF_BIND_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># [*]Enable detection of repeated suhosin ALERTs</span><br />
<span style="color: #666666; font-style: italic;"># Example: LF_SUHOSIN = &quot;5&quot;</span><br />
LF_SUHOSIN = <span style="color: #ff0000;">&quot;0&quot;</span><br />
LF_SUHOSIN_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Distributed Account Attack. This option will keep track of login failures</span><br />
<span style="color: #666666; font-style: italic;"># from distributed IP addresses to a specific application account. If the</span><br />
<span style="color: #666666; font-style: italic;"># number of failures matches the trigger value above, ALL of the IP addresses</span><br />
<span style="color: #666666; font-style: italic;"># involved in the attack will be blocked according to the temp/perm rules above</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Tracking applies to LF_SSHD, LF_FTPD, LF_SMTPAUTH, LF_POP3D, LF_IMAPD,</span><br />
<span style="color: #666666; font-style: italic;"># LF_HTACCESS</span><br />
LF_DISTATTACK = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the following to the minimum number of unique IP addresses that trigger</span><br />
<span style="color: #666666; font-style: italic;"># LF_DISTATTACK</span><br />
LF_DISTATTACK_UNIQ = <span style="color: #ff0000;">&quot;2&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Distributed FTP Logins. This option will keep track of successful FTP logins.</span><br />
<span style="color: #666666; font-style: italic;"># If the number of successful logins to an individual account is at least</span><br />
<span style="color: #666666; font-style: italic;"># LF_DISTFTP in LF_INTERVAL from at least LF_DISTFTP_UNIQ IP addresses, then</span><br />
<span style="color: #666666; font-style: italic;"># all of the IP addresses will be blocked</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This option can help mitigate the common FTP account compromise attacks that</span><br />
<span style="color: #666666; font-style: italic;"># use a distributed network of zombies to deface websites</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># A sensible setting for this might be 5, depending on how many IP different</span><br />
<span style="color: #666666; font-style: italic;"># IP addresses you expect to an individual FTP account within LF_INTERVAL</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To disable set to &quot;0&quot;</span><br />
LF_DISTFTP = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the following to the minimum number of unique IP addresses that trigger</span><br />
<span style="color: #666666; font-style: italic;"># LF_DISTATTACK. LF_DISTFTP_UNIQ must be &lt;= LF_DISTFTP for this to work</span><br />
LF_DISTFTP_UNIQ = <span style="color: #ff0000;">&quot;3&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If this option is set to 1 the blocks will be permanent</span><br />
<span style="color: #666666; font-style: italic;"># If this option is &gt; 1, the blocks will be temporary for the specified number</span><br />
<span style="color: #666666; font-style: italic;"># of seconds</span><br />
LF_DISTFTP_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Check whether csf appears to have been stopped and restart if necessary,</span><br />
<span style="color: #666666; font-style: italic;"># unless TESTING is enabled above. The check is done every 300 seconds</span><br />
LF_CSF = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you enable this option then whenever a CLI request to restart csf is used</span><br />
<span style="color: #666666; font-style: italic;"># (i.e. -s, --start, -r, --restart, -q, --startq) then instead of csf</span><br />
<span style="color: #666666; font-style: italic;"># rebuilding the iptables rules, csf will indicate to lfd to rebuild them</span><br />
<span style="color: #666666; font-style: italic;"># instead, within LF_PARSE seconds</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This feature can be particularly helpful for (re)starting configurations with</span><br />
<span style="color: #666666; font-style: italic;"># a large number of rules, e.g. those using CC block/allow lists. It can also</span><br />
<span style="color: #666666; font-style: italic;"># speed up boot times by deferring csf startup to the lfd process rather than</span><br />
<span style="color: #666666; font-style: italic;"># the init process</span><br />
LF_QUICKSTART = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an email alert if anyone logs in successfully using SSH</span><br />
LF_SSH_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an email alert if anyone uses su to access another account. This will</span><br />
<span style="color: #666666; font-style: italic;"># send an email alert whether the attempt to use su was successful or not</span><br />
LF_SU_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an email alert if anyone accesses WHM via root. An IP address will be</span><br />
<span style="color: #666666; font-style: italic;"># reported again 1 hour after the last tracked access (or if lfd is restarted)</span><br />
LF_CPANEL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable scanning of the exim mainlog for repeated emails sent from scripts.</span><br />
<span style="color: #666666; font-style: italic;"># To use this feature you must add an extended email logging line to WHM &gt;</span><br />
<span style="color: #666666; font-style: italic;"># Exim Configuration Editor &gt; Switch to Advanced Mode &gt; in the first textbox</span><br />
<span style="color: #666666; font-style: italic;"># add the following line (without the preceding #):</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># log_selector = +arguments +subject +received_recipients</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># If you already use extended exim logging, then you need to either include</span><br />
<span style="color: #666666; font-style: italic;"># +arguments +received_recipients or use +all</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This setting will then send an alert email if more than LF_SCRIPT_LIMIT lines</span><br />
<span style="color: #666666; font-style: italic;"># appear with the same cwd= path in them within an hour. This can be useful in</span><br />
<span style="color: #666666; font-style: italic;"># identifying spamming scripts on a server, especially PHP scripts running</span><br />
<span style="color: #666666; font-style: italic;"># under the nobody account. The email that is sent includes the exim log lines</span><br />
<span style="color: #666666; font-style: italic;"># and also attempts to find scripts that send email in the path that may be the</span><br />
<span style="color: #666666; font-style: italic;"># culprit</span><br />
LF_SCRIPT_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The limit afterwhich the email alert for email scripts is sent. Care should</span><br />
<span style="color: #666666; font-style: italic;"># be taken with this value if you allow clients to use web scripts to maintain</span><br />
<span style="color: #666666; font-style: italic;"># pseudo-mailing lists which have large recipients</span><br />
LF_SCRIPT_LIMIT = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If this option is enabled, the directory identified by LF_SCRIPT_ALERT will</span><br />
<span style="color: #666666; font-style: italic;"># be chmod 0 and chattr +i to prevent it being accessed. Set the option to 1</span><br />
<span style="color: #666666; font-style: italic;"># to enable.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># WARNING: This option could cause serious system problems if the identified</span><br />
<span style="color: #666666; font-style: italic;"># directory is within the OS directory hierarchy. For this reason we do not</span><br />
<span style="color: #666666; font-style: italic;"># recommend enabling it unless absolutely necessary.</span><br />
LF_SCRIPT_PERM = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Checks the length of the exim queue and sends an alert email if the value of</span><br />
<span style="color: #666666; font-style: italic;"># settings is exceeded. If the ConfigServer MailScanner configuration is used</span><br />
<span style="color: #666666; font-style: italic;"># then both the pending and delivery queues will be checked.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: If there are problems sending out email, this alert may not be received</span><br />
<span style="color: #666666; font-style: italic;"># To disable set to &quot;0&quot;</span><br />
LF_QUEUE_ALERT = <span style="color: #ff0000;">&quot;2000&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The interval between mail queue checks in seconds. This should not be set too</span><br />
<span style="color: #666666; font-style: italic;"># low on servers that often have long queues as the exim binary can use</span><br />
<span style="color: #666666; font-style: italic;"># significant resources when checing its queue length</span><br />
LF_QUEUE_INTERVAL = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Enable Directory Watching. This enables lfd to check /tmp and /dev/shm</span><br />
<span style="color: #666666; font-style: italic;"># directories for suspicious files, i.e. script exploits. If a suspicious</span><br />
<span style="color: #666666; font-style: italic;"># file is found an email alert is sent. One alert per file per LF_FLUSH</span><br />
<span style="color: #666666; font-style: italic;"># interval is sent</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature set the following to the checking interval in seconds.</span><br />
<span style="color: #666666; font-style: italic;"># To disable set to &quot;0&quot;</span><br />
LF_DIRWATCH = <span style="color: #ff0000;">&quot;120&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># To remove any suspicious files found during directory watching, enable the</span><br />
<span style="color: #666666; font-style: italic;"># following. These files will be appended to a tarball in</span><br />
<span style="color: #666666; font-style: italic;"># /etc/csf/suspicious.tar</span><br />
LF_DIRWATCH_DISABLE = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option allows you to have lfd watch a particular file or directory for</span><br />
<span style="color: #666666; font-style: italic;"># changes and should they change and email alert using watchalert.txt is sent</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature set the following to the checking interval in seconds</span><br />
<span style="color: #666666; font-style: italic;"># (a value of 60 would seem sensible) and add your entries to csf.dirwatch</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set to disable set to &quot;0&quot;</span><br />
LF_DIRWATCH_FILE = <span style="color: #ff0000;">&quot;60 &quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This is the interval that is used to flush reports of usernames, files and</span><br />
<span style="color: #666666; font-style: italic;"># pids so that persistent problems continue to be reported, in seconds.</span><br />
<span style="color: #666666; font-style: italic;"># A value of 3600 seems sensible</span><br />
LF_FLUSH = <span style="color: #ff0000;">&quot;3600&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># System Integrity Checking. This enables lfd to compare md5sums of the</span><br />
<span style="color: #666666; font-style: italic;"># servers OS binary application files from the time when lfd starts. If the</span><br />
<span style="color: #666666; font-style: italic;"># md5sum of a monitored file changes an alert is sent. This option is intended</span><br />
<span style="color: #666666; font-style: italic;"># as an IDS (Intrusion Detection System) and is the last line of detection for</span><br />
<span style="color: #666666; font-style: italic;"># a possible root compromise.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># There will be constant false-positives as the servers OS is updated or</span><br />
<span style="color: #666666; font-style: italic;"># monitored application binaries are updated. However, unexpected changes</span><br />
<span style="color: #666666; font-style: italic;"># should be carefully inspected.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Modified files will only be reported via email once.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature set the following to the checking interval in seconds</span><br />
<span style="color: #666666; font-style: italic;"># (a value of 3600 would seem sensible). This option may increase server I/O</span><br />
<span style="color: #666666; font-style: italic;"># load onto the server as it checks system binaries.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To disable set to &quot;0&quot;</span><br />
LF_INTEGRITY = <span style="color: #ff0000;">&quot;3600&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># System Exploit Checking. This enables lfd to check for the Random JS Toolkit</span><br />
<span style="color: #666666; font-style: italic;"># and may check for others in the future:</span><br />
<span style="color: #666666; font-style: italic;"># http://www.cpanel.net/security/notes/random_js_toolkit.html</span><br />
<span style="color: #666666; font-style: italic;"># It compares md5sums of the binaries listed in the exploit above for changes</span><br />
<span style="color: #666666; font-style: italic;"># and also attempts to create and remove a number directory</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Modified files will only be reported via email once, though will be reset</span><br />
<span style="color: #666666; font-style: italic;"># after an hour</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To enable this feature set the following to the checking interval in seconds</span><br />
<span style="color: #666666; font-style: italic;"># (a value of 300 would seem sensible).</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To disable set to &quot;0&quot;</span><br />
LF_EXPLOIT = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This comma separated list allows you to (de)select which tests LF_EXPLOIT</span><br />
<span style="color: #666666; font-style: italic;"># performs</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># For the SUPERUSER check, you can list usernames in csf.suignore to have them</span><br />
<span style="color: #666666; font-style: italic;"># ignored for that test</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Valid tests are:</span><br />
<span style="color: #666666; font-style: italic;"># JS,SUPERUSER</span><br />
LF_EXPLOIT_CHECK = <span style="color: #ff0000;">&quot;JS,SUPERUSER&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the time interval to track login and other LF_ failures within (seconds),</span><br />
<span style="color: #666666; font-style: italic;"># i.e. LF_TRIGGER failures within the last LF_INTERVAL seconds</span><br />
LF_INTERVAL = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This is how long the lfd process sleeps (in seconds) before processing the</span><br />
<span style="color: #666666; font-style: italic;"># log file entries and checking whether other events need to be triggered</span><br />
LF_PARSE = <span style="color: #ff0000;">&quot;5&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an email alert if an account exceeds LT_POP3D/LT_IMAPD logins per hour</span><br />
<span style="color: #666666; font-style: italic;"># per IP</span><br />
LT_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Block POP3 logins if greater than LT_POP3D times per hour per account per IP</span><br />
<span style="color: #666666; font-style: italic;"># address (0=disabled)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This is a temporary block for the rest of the hour, afterwhich the IP is</span><br />
<span style="color: #666666; font-style: italic;"># unblocked</span><br />
LT_POP3D = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Block IMAP logins if greater than LT_IMAPD times per hour per account per IP</span><br />
<span style="color: #666666; font-style: italic;"># address (0=disabled) - not recommended for IMAP logins due to the ethos</span><br />
<span style="color: #666666; font-style: italic;"># within which IMAP works. If you want to use this, setting it quite high is</span><br />
<span style="color: #666666; font-style: italic;"># probably a good idea</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This is a temporary block for the rest of the hour, afterwhich the IP is</span><br />
<span style="color: #666666; font-style: italic;"># unblocked</span><br />
LT_IMAPD = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Relay Tracking. This allows you to track email that is relayed through the</span><br />
<span style="color: #666666; font-style: italic;"># server. There are also options to send alerts and block external IP addresses</span><br />
<span style="color: #666666; font-style: italic;"># if the number of emails relayed per hour exceeds configured limits. The</span><br />
<span style="color: #666666; font-style: italic;"># blocks can be either permanent or temporary.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># The following information applies to each of the following types of relay</span><br />
<span style="color: #666666; font-style: italic;"># check:</span><br />
<span style="color: #666666; font-style: italic;"># RT_[relay type]_ALERT: 0 = disable, 1 = enable</span><br />
<span style="color: #666666; font-style: italic;"># RT_[relay type]_LIMIT: the limit/hour afterwhich an email alert will be sent</span><br />
<span style="color: #666666; font-style: italic;"># RT_[relay type]_BLOCK: 0 = no block;1 = perm block;nn=temp block for nn secs</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option triggers for external email</span><br />
RT_RELAY_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
RT_RELAY_LIMIT = <span style="color: #ff0000;">&quot;100&quot;</span><br />
RT_RELAY_BLOCK = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option triggers for email authenticated by SMTP AUTH</span><br />
RT_AUTHRELAY_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
RT_AUTHRELAY_LIMIT = <span style="color: #ff0000;">&quot;100&quot;</span><br />
RT_AUTHRELAY_BLOCK = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option triggers for email authenticated by POP before SMTP</span><br />
RT_POPRELAY_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
RT_POPRELAY_LIMIT = <span style="color: #ff0000;">&quot;100&quot;</span><br />
RT_POPRELAY_BLOCK = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option triggers for email sent via /usr/sbin/sendmail or /usr/sbin/exim</span><br />
RT_LOCALRELAY_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
RT_LOCALRELAY_LIMIT = <span style="color: #ff0000;">&quot;100&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option triggers for email sent via a local IP addresses</span><br />
RT_LOCALHOSTRELAY_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
RT_LOCALHOSTRELAY_LIMIT = <span style="color: #ff0000;">&quot;100&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Connection Tracking. This option enables tracking of all connections from IP</span><br />
<span style="color: #666666; font-style: italic;"># addresses to the server. If the total number of connections is greater than</span><br />
<span style="color: #666666; font-style: italic;"># this value then the offending IP address is blocked. This can be used to help</span><br />
<span style="color: #666666; font-style: italic;"># prevent some types of DOS attack.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Care should be taken with this option. It's entirely possible that you will</span><br />
<span style="color: #666666; font-style: italic;"># see false-positives. Some protocols can be connection hungry, e.g. FTP, IMAPD</span><br />
<span style="color: #666666; font-style: italic;"># and HTTP so it could be quite easy to trigger, especially with a lot of</span><br />
<span style="color: #666666; font-style: italic;"># closed connections in TIME_WAIT. However, for a server that is prone to DOS</span><br />
<span style="color: #666666; font-style: italic;"># attacks this may be very useful. A reasonable setting for this option might</span><br />
<span style="color: #666666; font-style: italic;"># be arround 300.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To disable this feature, set this to 0</span><br />
CT_LIMIT = <span style="color: #ff0000;">&quot;300&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Connection Tracking interval. Set this to the the number of seconds between</span><br />
<span style="color: #666666; font-style: italic;"># connection tracking scans</span><br />
CT_INTERVAL = <span style="color: #ff0000;">&quot;30&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send an email alert if an IP address is blocked due to connection tracking</span><br />
CT_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you want to make IP blocks permanent then set this to 1, otherwise blocks</span><br />
<span style="color: #666666; font-style: italic;"># will be temporary and will be cleared after CT_BLOCK_TIME seconds</span><br />
CT_PERMANENT = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you opt for temporary IP blocks for CT, then the following is the interval</span><br />
<span style="color: #666666; font-style: italic;"># in seconds that the IP will remained blocked for (e.g. 1800 = 30 mins)</span><br />
CT_BLOCK_TIME = <span style="color: #ff0000;">&quot;1800&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you don't want to count the TIME_WAIT state against the connection count</span><br />
<span style="color: #666666; font-style: italic;"># then set the following to &quot;1&quot;</span><br />
CT_SKIP_TIME_WAIT = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you only want to count specific states (e.g. SYN_RECV) then add the states</span><br />
<span style="color: #666666; font-style: italic;"># to the following as a comma separated list. E.g. &quot;SYN_RECV,TIME_WAIT&quot;</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Leave this option empty to count all states against CT_LIMIT</span><br />
CT_STATES = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you only want to count specific ports (e.g. 80,443) then add the ports</span><br />
<span style="color: #666666; font-style: italic;"># to the following as a comma separated list. E.g. &quot;80,443&quot;</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Leave this option empty to count all ports against CT_LIMIT</span><br />
CT_PORTS = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Process Tracking. This option enables tracking of user and nobody processes</span><br />
<span style="color: #666666; font-style: italic;"># and examines them for suspicious executables or open network ports. Its</span><br />
<span style="color: #666666; font-style: italic;"># purpose is to identify potential exploit processes that are running on the</span><br />
<span style="color: #666666; font-style: italic;"># server, even if they are obfuscated to appear as system services. If a</span><br />
<span style="color: #666666; font-style: italic;"># suspicious process is found an alert email is sent with relevant information.</span><br />
<span style="color: #666666; font-style: italic;"># It is then the responsibility of the recipient to investigate the process</span><br />
<span style="color: #666666; font-style: italic;"># further as the script takes no further action</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># The following is the number of seconds a process has to be active before it</span><br />
<span style="color: #666666; font-style: italic;"># is inspected. If you set this time too low, then you will likely trigger</span><br />
<span style="color: #666666; font-style: italic;"># false-positives with CGI or PHP scripts.</span><br />
<span style="color: #666666; font-style: italic;"># Set the value to 0 to disable this feature</span><br />
PT_LIMIT = <span style="color: #ff0000;">&quot;60&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># How frequently processes are checked in seconds</span><br />
PT_INTERVAL = <span style="color: #ff0000;">&quot;60&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you want process tracking to highlight php or perl scripts that are run</span><br />
<span style="color: #666666; font-style: italic;"># through apache then disable the following,</span><br />
<span style="color: #666666; font-style: italic;"># i.e. set it to 0</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># While enabling this setting will reduce false-positives, having it set to 0</span><br />
<span style="color: #666666; font-style: italic;"># does provide better checking for exploits running on the server</span><br />
PT_SKIP_HTTP = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you want to track all linux accounts on a cPanel server, not just users</span><br />
<span style="color: #666666; font-style: italic;"># that are part of cPanel, then enable this option. This is recommended to</span><br />
<span style="color: #666666; font-style: italic;"># improve security from compromised accounts</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set to 0 to disable the feature, 1 to enable it</span><br />
PT_ALL_USERS = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># lfd will report processes, even if they're listed in csf.pignore, if they're</span><br />
<span style="color: #666666; font-style: italic;"># tagged as (deleted) by Linux. This information is provided in Linux under</span><br />
<span style="color: #666666; font-style: italic;"># /proc/PID/exe. A (deleted) process is one that is running a binary that has</span><br />
<span style="color: #666666; font-style: italic;"># the inode for the file removed from the file system directory. This usually</span><br />
<span style="color: #666666; font-style: italic;"># happens when the binary has been replaced due to an upgrade for it by the OS</span><br />
<span style="color: #666666; font-style: italic;"># vendor or another third party (e.g. cPanel). You need to investigate whether</span><br />
<span style="color: #666666; font-style: italic;"># this is indeed the case to be sure that the original binary has not been</span><br />
<span style="color: #666666; font-style: italic;"># replaced by a rootkit or is running an exploit.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># To stop lfd reporting such process you need to restart the daemon to which it</span><br />
<span style="color: #666666; font-style: italic;"># belongs and therefore run the process using the replacement binary (presuming</span><br />
<span style="color: #666666; font-style: italic;"># one exists). This will normally mean running the associated startup script in</span><br />
<span style="color: #666666; font-style: italic;"># /etc/init.d/</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># If you don't want lfd to report deleted binary processes, set to 0</span><br />
PT_DELETED = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># User Process Tracking. This option enables the tracking of the number of</span><br />
<span style="color: #666666; font-style: italic;"># process any given account is running at one time. If the number of processes</span><br />
<span style="color: #666666; font-style: italic;"># exceeds the value of the following setting an email alert is sent with</span><br />
<span style="color: #666666; font-style: italic;"># details of those processes. If you specify a user in csf.pignore it will be</span><br />
<span style="color: #666666; font-style: italic;"># ignored</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set to 0 to disable this feature</span><br />
PT_USERPROC = <span style="color: #ff0000;">&quot;10&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This User Process Tracking option sends an alert if any cPanel user process</span><br />
<span style="color: #666666; font-style: italic;"># exceeds the memory usage set (MB). To ignore specific processes or users use</span><br />
<span style="color: #666666; font-style: italic;"># csf.pignore</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set to 0 to disable this feature</span><br />
PT_USERMEM = <span style="color: #ff0000;">&quot;200&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This User Process Tracking option sends an alert if any cPanel user process</span><br />
<span style="color: #666666; font-style: italic;"># exceeds the time usage set (seconds). To ignore specific processes or users</span><br />
<span style="color: #666666; font-style: italic;"># use csf.pignore</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set to 0 to disable this feature</span><br />
PT_USERTIME = <span style="color: #ff0000;">&quot;3600&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If this option is set then processes detected by PT_USERMEM, PT_USERTIME or</span><br />
<span style="color: #666666; font-style: italic;"># PT_USERPROC are killed</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: We don't recommend enabling this option unless absolutely necessary</span><br />
<span style="color: #666666; font-style: italic;"># as it can cause unexpected problems when processes are suddenly terminated.</span><br />
<span style="color: #666666; font-style: italic;"># It can also lead to system processes being terminated which could cause</span><br />
<span style="color: #666666; font-style: italic;"># stability issues. It is much better to leave this option disabled and to</span><br />
<span style="color: #666666; font-style: italic;"># investigate each case as it is reported when the triggers above are breached</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: Processes that are running deleted excecutables (see PT_DELETED) will</span><br />
<span style="color: #666666; font-style: italic;"># not be killed by lfd</span><br />
PT_USERKILL = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you want to disable email alerts if PT_USERKILL is triggered, then set</span><br />
<span style="color: #666666; font-style: italic;"># this option to 0</span><br />
PT_USERKILL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Check the PT_LOAD_AVG minute Load Average (can be set to 1 5 or 15 and</span><br />
<span style="color: #666666; font-style: italic;"># defaults to 5 if set otherwise) on the server every PT_LOAD seconds. If the</span><br />
<span style="color: #666666; font-style: italic;"># load average is greater than or equal to PT_LOAD_LEVEL then an email alert is</span><br />
<span style="color: #666666; font-style: italic;"># sent. lfd then does not report subsequent high load until PT_LOAD_SKIP</span><br />
<span style="color: #666666; font-style: italic;"># seconds has passed to prevent email floods.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set PT_LOAD to &quot;0&quot; to disable this feature</span><br />
PT_LOAD = <span style="color: #ff0000;">&quot;30&quot;</span><br />
PT_LOAD_AVG = <span style="color: #ff0000;">&quot;5&quot;</span><br />
PT_LOAD_LEVEL = <span style="color: #ff0000;">&quot;6&quot;</span><br />
PT_LOAD_SKIP = <span style="color: #ff0000;">&quot;3600&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If a PT_LOAD event is triggered, then if the following contains the path to</span><br />
<span style="color: #666666; font-style: italic;"># a script, it will be run in a child process. For example, the script could</span><br />
<span style="color: #666666; font-style: italic;"># contain commands to terminate and restart httpd, php, exim, etc incase of</span><br />
<span style="color: #666666; font-style: italic;"># looping processes. The action script must have the execute bit an</span><br />
<span style="color: #666666; font-style: italic;"># interpreter (shebang) set</span><br />
PT_LOAD_ACTION = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Port Scan Tracking. This feature tracks port blocks logged by iptables to</span><br />
<span style="color: #666666; font-style: italic;"># syslog. If an IP address generates a port block that is logged more than</span><br />
<span style="color: #666666; font-style: italic;"># PS_LIMIT within PS_INTERVAL seconds, the IP address will be blocked.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This feature could, for example, be useful for blocking hackers attempting</span><br />
<span style="color: #666666; font-style: italic;"># to access the standard SSH port if you have moved it to a port other than 22</span><br />
<span style="color: #666666; font-style: italic;"># and have removed 22 from the TCP_IN list so that connection attempts to the</span><br />
<span style="color: #666666; font-style: italic;"># old port are being logged</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This feature blocks all iptables blocks from the iptables logs, including</span><br />
<span style="color: #666666; font-style: italic;"># repeated attempts to one port or SYN flood blocks, etc</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: This feature will only track iptables blocks from the log file set in</span><br />
<span style="color: #666666; font-style: italic;"># IPTABLES_LOG below and if you have DROP_LOGGING enabled. However, it will</span><br />
<span style="color: #666666; font-style: italic;"># cause redundant blocking with DROP_IP_LOGGING enabled</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: It's possible that an elaborate DDOS (i.e. from multiple IP's)</span><br />
<span style="color: #666666; font-style: italic;"># could very quickly fill the iptables rule chains and cause a DOS in itself.</span><br />
<span style="color: #666666; font-style: italic;"># The DENY_IP_LIMIT should help to mitigate such problems with permanent blocks</span><br />
<span style="color: #666666; font-style: italic;"># and the DENY_TEMP_IP_LIMIT with temporary blocks</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Set PS_INTERVAL to &quot;0&quot; to disable this feature. A value of between 60 and 300</span><br />
<span style="color: #666666; font-style: italic;"># would be sensible to enable this feature</span><br />
PS_INTERVAL = <span style="color: #ff0000;">&quot;300&quot;</span><br />
PS_LIMIT = <span style="color: #ff0000;">&quot;10&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># You can specify the ports and/or port ranges that should be tracked by the</span><br />
<span style="color: #666666; font-style: italic;"># Port Scan Tracking feature. The following setting is a comma separated list</span><br />
<span style="color: #666666; font-style: italic;"># of those ports and uses the same format as TCP_IN. The default setting of</span><br />
<span style="color: #666666; font-style: italic;"># 0:65535,ICMP covers all ports</span><br />
PS_PORTS = <span style="color: #ff0000;">&quot;0:65535,ICMP&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># You can select whether IP blocks for Port Scan Tracking should be temporary</span><br />
<span style="color: #666666; font-style: italic;"># or permanent. Set PS_PERMANENT to &quot;0&quot; for temporary and &quot;1&quot; for permanent</span><br />
<span style="color: #666666; font-style: italic;"># blocking. If set to &quot;0&quot; PS_BLOCK_TIME is the amount of time in seconds to</span><br />
<span style="color: #666666; font-style: italic;"># temporarily block the IP address for</span><br />
PS_PERMANENT = <span style="color: #ff0000;">&quot;0&quot;</span><br />
PS_BLOCK_TIME = <span style="color: #ff0000;">&quot;3600&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set the following to &quot;1&quot; to enable Port Scan Tracking email alerts, set to</span><br />
<span style="color: #666666; font-style: italic;"># &quot;0&quot; to disable them</span><br />
PS_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Account Tracking. The following options enable the tracking of modifications</span><br />
<span style="color: #666666; font-style: italic;"># to the accounts on a server. If any of the enabled options are triggered by</span><br />
<span style="color: #666666; font-style: italic;"># a modifications to an account, an alert email is sent. Only the modification</span><br />
<span style="color: #666666; font-style: italic;"># is reported. The cause of the modification will have to be investigated</span><br />
<span style="color: #666666; font-style: italic;"># manually</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># You can set AT_ALERT to the following:</span><br />
<span style="color: #666666; font-style: italic;"># 0 = disable this feature</span><br />
<span style="color: #666666; font-style: italic;"># 1 = enable this feature for all accounts</span><br />
<span style="color: #666666; font-style: italic;"># 2 = enable this feature only for accounts with uid 0 (e.g. root)</span><br />
AT_ALERT = <span style="color: #ff0000;">&quot;2&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This options is the interval between checks in seconds</span><br />
AT_INTERVAL = <span style="color: #ff0000;">&quot;60&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if a new account is created</span><br />
AT_NEW = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if an existing account is deleted</span><br />
AT_OLD = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if an account password has changed</span><br />
AT_PASSWD = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if an account uid has changed</span><br />
AT_UID = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if an account gid has changed</span><br />
AT_GID = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if an account login directory has changed</span><br />
AT_DIR = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Send alert if an account login shell has changed</span><br />
AT_SHELL = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Display Country Code and Country for reported IP addresses</span><br />
CC_LOOKUPS = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Messenger service. This feature allows the display of a message to a blocked</span><br />
<span style="color: #666666; font-style: italic;"># connecting IP address to inform the user that they are blocked in the</span><br />
<span style="color: #666666; font-style: italic;"># firewall. This can help when users get themselves blocked, e.g. due to</span><br />
<span style="color: #666666; font-style: italic;"># multiple login failures. The service is provided by two daemons running on</span><br />
<span style="color: #666666; font-style: italic;"># ports providing either an HTML or TEXT message.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This feature does not work on servers that do not have the iptables module</span><br />
<span style="color: #666666; font-style: italic;"># ipt_REDIRECT loaded. Typically, this will be with MONOLITHIC kernels. VPS</span><br />
<span style="color: #666666; font-style: italic;"># server admins should check with their VPS host provider that the iptables</span><br />
<span style="color: #666666; font-style: italic;"># module is included.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># For further information on features and limitations refer to the csf</span><br />
<span style="color: #666666; font-style: italic;"># readme.txt</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Note: Run /etc/csf/csftest.pl to check whether this option will function on</span><br />
<span style="color: #666666; font-style: italic;"># this server</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># 1 to enable, 0 to disable</span><br />
MESSENGER = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Provide this service to temporary IP address blocks</span><br />
MESSENGER_TEMP = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Provide this service to permanent IP address blocks</span><br />
MESSENGER_PERM = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># User account to run the service servers under. We recommend creating a</span><br />
<span style="color: #666666; font-style: italic;"># specific non-priv, non-shell account for this purpose</span><br />
MESSENGER_USER = <span style="color: #ff0000;">&quot;csf&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This is the maximum concurrent connections allowed to each service server</span><br />
MESSENGER_CHILDREN = <span style="color: #ff0000;">&quot;20&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set this to the port that will receive the HTML message. You should configure</span><br />
<span style="color: #666666; font-style: italic;"># this port to be &gt;1023 and different from the TEXT port. Do NOT enable access</span><br />
<span style="color: #666666; font-style: italic;"># to this port in TCP_IN</span><br />
MESSENGER_HTML = <span style="color: #ff0000;">&quot;8888&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This comma separated list are the HTML ports that will be redirected for the</span><br />
<span style="color: #666666; font-style: italic;"># blocked IP address. If you are using per application blocking (LF_TRIGGER)</span><br />
<span style="color: #666666; font-style: italic;"># then only the relevant block port will be redirected to the messenger port</span><br />
MESSENGER_HTML_IN = <span style="color: #ff0000;">&quot;80,2082,2095&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Set this to the port that will receive the TEXT message. You should configure</span><br />
<span style="color: #666666; font-style: italic;"># this port to be &gt;1023 and different from the HTML port. Do NOT enable access</span><br />
<span style="color: #666666; font-style: italic;"># to this port in TCP_IN</span><br />
MESSENGER_TEXT = <span style="color: #ff0000;">&quot;8889&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This comma separated list are the TEXT ports that will be redirected for the</span><br />
<span style="color: #666666; font-style: italic;"># blocked IP address. If you are using per application blocking (LF_TRIGGER)</span><br />
<span style="color: #666666; font-style: italic;"># then only the relevant block port will be redirected to the messenger port</span><br />
MESSENGER_TEXT_IN = <span style="color: #ff0000;">&quot;21&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># These settings limit the rate at which connections can be made to the</span><br />
<span style="color: #666666; font-style: italic;"># messenger service servers. Its intention is to provide protection from</span><br />
<span style="color: #666666; font-style: italic;"># attacks or excessive connections to the servers. If the rate is exceeded then</span><br />
<span style="color: #666666; font-style: italic;"># iptables will revert for the duration to the normal blocking actiity</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># See the iptables man page for the correct --limit rate syntax</span><br />
MESSENGER_RATE = <span style="color: #ff0000;">&quot;30/m&quot;</span><br />
MESSENGER_BURST = <span style="color: #ff0000;">&quot;5&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># lfd Clustering. This allows the configuration of an lfd cluster environment</span><br />
<span style="color: #666666; font-style: italic;"># where a group of servers can share blocks and configuration option changes.</span><br />
<span style="color: #666666; font-style: italic;"># Included are CLI and UI options to send requests to the cluster.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># See the readme.txt file for more information and details on setup and</span><br />
<span style="color: #666666; font-style: italic;"># security risks.</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Comma separated list of cluster member IP addresses to send requests to</span><br />
CLUSTER_SENDTO = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Comma separated list of cluster member IP addresses to receive requests from</span><br />
CLUSTER_RECVFROM = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If this is a NAT server, set this to the public IP address of this server</span><br />
CLUSTER_NAT = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If a cluster member should send requests on an IP other than the default IP,</span><br />
<span style="color: #666666; font-style: italic;"># set it here</span><br />
CLUSTER_LOCALADDR = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Cluster communication port (must be the same on all member servers). There</span><br />
<span style="color: #666666; font-style: italic;"># is no need to open this port in the firewall as csf will automatically add</span><br />
<span style="color: #666666; font-style: italic;"># in and out bound rules to allow communication between cluster members</span><br />
CLUSTER_PORT = <span style="color: #ff0000;">&quot;7777&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This is a secret key used to encrypt cluster communications using the</span><br />
<span style="color: #666666; font-style: italic;"># Blowfish algorithm. It should be between 8 and 56 characters long,</span><br />
<span style="color: #666666; font-style: italic;"># preferably &gt; 20 random characters</span><br />
<span style="color: #666666; font-style: italic;"># 56 chars: &nbsp; &nbsp;012345678901234567890123456789012345678901234567890123456</span><br />
CLUSTER_KEY = <span style="color: #ff0000;">&quot;&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option allows the enabling and disabling of the Cluster configuration</span><br />
<span style="color: #666666; font-style: italic;"># changing options --cconfig and --cconfigr for security reasons</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># For security reasons, we do not recommend leaving this option enabled</span><br />
CLUSTER_CONFIG = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Maximum number of child processes to listen on. High blocking rates or large</span><br />
<span style="color: #666666; font-style: italic;"># clusters may need to increase this</span><br />
CLUSTER_CHILDREN = <span style="color: #ff0000;">&quot;10&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Statistics</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This option enabled statistical data gathering</span><br />
ST_ENABLE = <span style="color: #ff0000;">&quot;1&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option determines how many iptables log lines to store for reports</span><br />
ST_IPTABLES = <span style="color: #ff0000;">&quot;100&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># This option indicates whether rDNS and CC lookups are performed at the time</span><br />
<span style="color: #666666; font-style: italic;"># the log line is recorded (this is not performed when viewing the reports)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Warning: If DROP_IP_LOGGING is enabled and there are frequent iptables hits,</span><br />
<span style="color: #666666; font-style: italic;"># then enabling this setting could cause serious performance problems</span><br />
ST_LOOKUP = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># If you find ever increasing numbers of zombie lfd processes you may need to</span><br />
<span style="color: #666666; font-style: italic;"># revert to the old child reaper code by enabling this option</span><br />
OLD_REAPER = <span style="color: #ff0000;">&quot;0&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># OS settings</span><br />
IPTABLES = <span style="color: #ff0000;">&quot;/sbin/iptables&quot;</span><br />
MODPROBE = <span style="color: #ff0000;">&quot;/sbin/modprobe&quot;</span><br />
IFCONFIG = <span style="color: #ff0000;">&quot;/sbin/ifconfig&quot;</span><br />
SENDMAIL = <span style="color: #ff0000;">&quot;/usr/sbin/sendmail&quot;</span><br />
PS = <span style="color: #ff0000;">&quot;/bin/ps&quot;</span><br />
VMSTAT = <span style="color: #ff0000;">&quot;/usr/bin/vmstat&quot;</span><br />
LS = <span style="color: #ff0000;">&quot;/bin/ls&quot;</span><br />
MD5SUM = <span style="color: #ff0000;">&quot;/usr/bin/md5sum&quot;</span><br />
TAR = <span style="color: #ff0000;">&quot;/bin/tar&quot;</span><br />
CHATTR = <span style="color: #ff0000;">&quot;/usr/bin/chattr&quot;</span><br />
UNZIP = <span style="color: #ff0000;">&quot;/usr/bin/unzip&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Log files</span><br />
HTACCESS_LOG = <span style="color: #ff0000;">&quot;# Messenger service. This feature allows the display of a message to a blocked # connecting IP address to inform the user that they are blocked in the # firewall. This can help when users get themselves blocked, e.g. due to # multiple login failures. The service is provided by two daemons running on # ports providing either an HTML or TEXT message. # # This feature does not work on servers that do not have the iptables module # ipt_REDIRECT loaded. Typically, this will be with MONOLITHIC kernels. VPS # server admins should check with their VPS host provider that the iptables # module is included. #&quot;</span><br />
MODSEC_LOG = <span style="color: #ff0000;">&quot;/usr/local/apache/logs/error_log&quot;</span><br />
SSHD_LOG = <span style="color: #ff0000;">&quot;/var/log/secure&quot;</span><br />
SU_LOG = <span style="color: #ff0000;">&quot;/var/log/secure&quot;</span><br />
FTPD_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
SMTPAUTH_LOG = <span style="color: #ff0000;">&quot;/var/log/exim_mainlog&quot;</span><br />
SMTPRELAY_LOG = <span style="color: #ff0000;">&quot;/var/log/exim_mainlog&quot;</span><br />
POP3D_LOG = <span style="color: #ff0000;">&quot;/var/log/maillog&quot;</span><br />
IMAPD_LOG = <span style="color: #ff0000;">&quot;/var/log/maillog&quot;</span><br />
CPANEL_LOG = <span style="color: #ff0000;">&quot;/usr/local/cpanel/logs/login_log&quot;</span><br />
CPANEL_ACCESSLOG = <span style="color: #ff0000;">&quot;/usr/local/cpanel/logs/access_log&quot;</span><br />
SCRIPT_LOG = <span style="color: #ff0000;">&quot;/var/log/exim_mainlog&quot;</span><br />
IPTABLES_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
SUHOSIN_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
BIND_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
<br />
CUSTOM1_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM2_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM3_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM4_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM5_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM6_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM7_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM8_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
CUSTOM9_LOG = <span style="color: #ff0000;">&quot;/var/log/messages&quot;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># For internal use only. You should not enable this option as it could cause</span><br />
<span style="color: #666666; font-style: italic;"># instability in csf and lfd</span><br />
DEBUG = <span style="color: #ff0000;">&quot;0&quot;</span></span></code><br />
<code class="codecolorer bash blackboard"><span class="bash">Firewall Check&nbsp; Status&nbsp; <br />
<br />
Check whether csf is enabled<br />
Check csf is running<br />
Check whether csf is <span style="color: #000000; font-weight: bold;">in</span> TESTING mode<br />
Check whether lfd is enabled<br />
Check incoming MySQL port<br />
Check csf SMTP_BLOCK option WARNING This option will <span style="color: #7a0874; font-weight: bold;">help</span> prevent the most common form of spam abuse on a server that bypasses exim and sends spam directly out through port <span style="color: #000000;">25</span>. Enabling this option will prevent any web script from sending out using socket connection, such scripts should use the exim or <span style="color: #c20cb9; font-weight: bold;">sendmail</span> binary instead<br />
Check csf LF_SCRIPT_ALERT option<br />
Check csf LF_SSHD option<br />
Check csf LF_FTPD option<br />
Check csf LF_SMTPAUTH option<br />
Check csf LF_POP3D option<br />
Check csf LF_IMAPD option<br />
Check csf LF_HTACCESS option<br />
Check csf LF_MODSEC option<br />
Check csf LF_CPANEL option<br />
Check csf LF_CPANEL_ALERT option<br />
Check csf LF_DIRWATCH option<br />
Check csf LF_INTEGRITY option<br />
Check csf PT_SKIP_HTTP option<br />
Check csf PT_ALL_USERS option<br />
Check csf SAFECHAINUPDATE option&nbsp; &nbsp; WARNING This option closes a window of opportunity that opens when dynamic chain updates occur<br />
<br />
Server Check<br />
<br />
Check <span style="color: #000000; font-weight: bold;">/</span>tmp permissions<br />
Check <span style="color: #000000; font-weight: bold;">/</span>tmp ownership<br />
Check <span style="color: #000000; font-weight: bold;">/</span>tmp is mounted <span style="color: #c20cb9; font-weight: bold;">as</span> a filesystem<br />
Check <span style="color: #000000; font-weight: bold;">/</span>tmp is mounted noexec,nosuid<br />
Check <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.daily<span style="color: #000000; font-weight: bold;">/</span>logrotate <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">/</span>tmp noexec workaround<br />
Check <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp permissions<br />
Check <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp ownership<br />
Check <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp is mounted <span style="color: #c20cb9; font-weight: bold;">as</span> a filesystem<br />
Check <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>tmp is mounted noexec,nosuid<br />
Check <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>tmp permissions<br />
Check <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>tmp ownership<br />
Check <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>tmp is mounted <span style="color: #c20cb9; font-weight: bold;">as</span> a filesystem or is a symlink to <span style="color: #000000; font-weight: bold;">/</span>tmp<br />
Check <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm is mounted noexec,nosuid WARNING <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm is not mounted with the noexec,nosuid options <span style="color: #7a0874; font-weight: bold;">&#40;</span>currently: none<span style="color: #7a0874; font-weight: bold;">&#41;</span>. You should modify the mountpoint <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>shm with those options and remount<br />
Check <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>named.conf <span style="color: #000000; font-weight: bold;">for</span> DNS recursion restrictions<br />
Check <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>named.conf <span style="color: #000000; font-weight: bold;">for</span> DNS random query <span style="color: #7a0874; font-weight: bold;">source</span> port<br />
Check server runlevel<br />
Check nobody cron<br />
Check Operating System support<br />
Check <span style="color: #c20cb9; font-weight: bold;">perl</span> version<br />
Check MySQL version<br />
Check MySQL LOAD DATA disallows LOCAL<br />
Check SUPERUSER accounts<br />
<br />
SSH<span style="color: #000000; font-weight: bold;">/</span>Telnet Check<br />
<br />
Check SSHv1 is disabled WARNING You should disable SSHv1 by editing <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config and setting: Protocol <span style="color: #000000;">2</span><br />
Check SSH on non-standard port<br />
Check SSH PasswordAuthentication&nbsp; &nbsp; WARNING For ultimate SSH security, you should consider disabling PasswordAuthentication and only allow access using PubkeyAuthentication<br />
Check SSH UseDNS&nbsp; &nbsp; WARNING You should disable UseDNS by editing <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config and setting: UseDNS no<br />
Otherwise, lfd will be unable to track SSHD <span style="color: #c20cb9; font-weight: bold;">login</span> failures successfully <span style="color: #c20cb9; font-weight: bold;">as</span> the log files will not report IP addresses<br />
Check telnet port <span style="color: #000000;">23</span> is not <span style="color: #000000; font-weight: bold;">in</span> use<br />
Check shell limits<br />
Check Background Process Killer<br />
<br />
Mail Check<br />
<br />
Check root forwarder<br />
Check exim <span style="color: #000000; font-weight: bold;">for</span> extended logging <span style="color: #7a0874; font-weight: bold;">&#40;</span>log_selector<span style="color: #7a0874; font-weight: bold;">&#41;</span>&nbsp; WARNING You should <span style="color: #7a0874; font-weight: bold;">enable</span> extended exim logging to <span style="color: #7a0874; font-weight: bold;">enable</span> easier tracking potential outgoing spam issues. Add: log_selector = +arguments +subject +received_recipients<br />
to the first textarea <span style="color: #000000; font-weight: bold;">in</span> the Advanced Mode Exim Configuration Editor<br />
Check exim weak SSL<span style="color: #000000; font-weight: bold;">/</span>TLS Ciphers <span style="color: #7a0874; font-weight: bold;">&#40;</span>tls_require_ciphers<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Check <span style="color: #000000; font-weight: bold;">for</span> maildir conversion<br />
Check Courier IMAP weak SSL<span style="color: #000000; font-weight: bold;">/</span>TLS Ciphers <span style="color: #7a0874; font-weight: bold;">&#40;</span>TLS_CIPHER_LIST<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Check Courier POP3D weak SSL<span style="color: #000000; font-weight: bold;">/</span>TLS Ciphers <span style="color: #7a0874; font-weight: bold;">&#40;</span>TLS_CIPHER_LIST<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Apache Check&nbsp; &nbsp; Status&nbsp; Comment<br />
<br />
Apache Check<br />
<br />
Check apache version<br />
Check suPHP<br />
Check Suexec<br />
Check apache <span style="color: #000000; font-weight: bold;">for</span> mod_security<br />
Check apache <span style="color: #000000; font-weight: bold;">for</span> FrontPage&nbsp; WARNING Microsoft Frontpage Extensions were EOL <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000;">2006</span> and there is no support <span style="color: #000000; font-weight: bold;">for</span> bugs or security issues. For this reason, it should be considered a security risk to <span style="color: #7a0874; font-weight: bold;">continue</span> using them. You should rebuild apache through easyapache and deselect the option to build them<br />
Check apache <span style="color: #000000; font-weight: bold;">for</span> RLimitCPU&nbsp; WARNING You should <span style="color: #000000; font-weight: bold;">set</span> a value RLimitCPU to prevent runaway scripts from consuming server resources - DOS exploits can typically <span style="color: #000000; font-weight: bold;">do</span> this. A quick way to <span style="color: #000000; font-weight: bold;">set</span> this is to use WHM <span style="color: #000000; font-weight: bold;">&gt;</span> Modify Apache Memory Usage<br />
Check apache <span style="color: #000000; font-weight: bold;">for</span> RLimitMEM&nbsp; WARNING You should <span style="color: #000000; font-weight: bold;">set</span> a value RLimitMEM to prevent runaway scripts from consuming server resources - DOS exploits can typically <span style="color: #000000; font-weight: bold;">do</span> this. A quick way to <span style="color: #000000; font-weight: bold;">set</span> this is to use WHM <span style="color: #000000; font-weight: bold;">&gt;</span> Modify Apache Memory Usage<br />
Check Apache weak SSL<span style="color: #000000; font-weight: bold;">/</span>TLS Ciphers <span style="color: #7a0874; font-weight: bold;">&#40;</span>SSLCipherSuite<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Check mod_userdir protection<br />
<br />
PHP Check<br />
Check php version <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #7a0874; font-weight: bold;">&#41;</span>&nbsp; WARNING Any version of PHP <span style="color: #7a0874; font-weight: bold;">&#40;</span>Current: v4.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> older that v5 is obsolete and should be considered a security threat. You should upgrade exclusively to PHP v5<br />
Check php <span style="color: #000000; font-weight: bold;">for</span> enable_dl or disabled dl<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Check php <span style="color: #000000; font-weight: bold;">for</span> disable_functions<br />
Check php <span style="color: #000000; font-weight: bold;">for</span> ini_set disabled&nbsp; WARNING You should consider adding ini_set to the disable_functions <span style="color: #000000; font-weight: bold;">in</span> the PHP configuration <span style="color: #c20cb9; font-weight: bold;">as</span> this setting allows PHP scripts to override global security and performance settings <span style="color: #000000; font-weight: bold;">for</span> PHP scripts. Adding ini_set can <span style="color: #7a0874; font-weight: bold;">break</span> PHP scripts and commenting out any use of ini_set <span style="color: #000000; font-weight: bold;">in</span> such scripts is advised<br />
Check php <span style="color: #000000; font-weight: bold;">for</span> register_globals<br />
Check php <span style="color: #000000; font-weight: bold;">for</span> Suhosin<br />
Check php open_basedir protection<br />
<br />
WHM Settings Check&nbsp; Status<br />
Check cPanel version<br />
Check cPanel <span style="color: #c20cb9; font-weight: bold;">login</span> is SSL only<br />
Check boxtrapper is disabled<br />
Check max emails per hour is <span style="color: #000000; font-weight: bold;">set</span><br />
Check whether <span style="color: #c20cb9; font-weight: bold;">users</span> can reset passwords via email<br />
Check whether native cPanel SSL is enabled<br />
Check compilers<br />
Check Anonymous FTP Logins<br />
Check Anonymous FTP Uploads<br />
Check pure-ftpd weak SSL<span style="color: #000000; font-weight: bold;">/</span>TLS Ciphers <span style="color: #7a0874; font-weight: bold;">&#40;</span>TLSCipherSuite<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
Check FTP Logins with Root Password<br />
Check allow remote domains<br />
Check block common domains<br />
Check allow park domains<br />
Check cPAddons update email to owner<br />
Check cPAddons update email to root<br />
Check package updates<br />
Check security updates<br />
Check cPanel <span style="color: #c20cb9; font-weight: bold;">tree</span><br />
Check melange chat server<br />
Check root<span style="color: #000000; font-weight: bold;">/</span>reseller <span style="color: #c20cb9; font-weight: bold;">login</span> to <span style="color: #c20cb9; font-weight: bold;">users</span> cPanel<br />
Check cPanel php <span style="color: #000000; font-weight: bold;">for</span> register_globals<br />
Check cPanel php.ini <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">for</span> register_globals<br />
Check cPanel passwords <span style="color: #000000; font-weight: bold;">in</span> email<br />
Check Coie IP Validation<br />
Check Referrer Blank Security<br />
Check Referrer Security<br />
Check Security Tens<br />
Check Parent Security<br />
Check Domain Loup Security<br />
Check SMTP Tweak<br />
Check nameservers &nbsp; WARNING At least one of the configured nameservers:<br />
ns1.grafindo.co.id<br />
ns2.grafindo.co.id<br />
should be located <span style="color: #000000; font-weight: bold;">in</span> a topologically and geographically dispersed location on the Internet - See RFC <span style="color: #000000;">2182</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>Section <span style="color: #000000;">3.1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
Server Services Check &nbsp; Status&nbsp; <br />
<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> cups<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> xfs<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> atd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> nfslock<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> canna<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> FreeWnn<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> cups-config-daemon<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> iiim<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> mDNSResponder<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> nifd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> rpcidmapd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> bluetooth<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> anacron<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> gpm<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> saslauthd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> avahi-daemon<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> avahi-dnsconfd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> hidd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> pcscd<br />
Check server startup <span style="color: #000000; font-weight: bold;">for</span> sbadm</span></code></pre>
</pre>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 22006px; width: 1px; height: 1px;">
<pre>
<pre>[/ccie]</pre>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=131</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ACL Description</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=129</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=129#comments</comments>
		<pubDate>Wed, 12 May 2010 02:41:51 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[RedHat - System]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=129</guid>
		<description><![CDATA[             ACL Entry                         Description
    ___________________________________________________________________
    u[ser]::perms        [...]]]></description>
			<content:encoded><![CDATA[<pre>             ACL Entry                         Description
    ___________________________________________________________________
    u[ser]::perms                 File owner permissions.
    g[roup]::perms                File group owner permissions.
    o[ther]:perms                 Permissions for users other than  the
                                  file  owner  or members of file group
                                  owner.<span id="more-129"></span>
    m[ask]:perms                  The ACL mask. The  mask  entry  indi-
                                  cates the maximum permissions allowed
                                  for users (other than the owner)  and
                                  for  groups.  The mask is a quick way
                                  to  change  permissions  on  all  the
                                  users and groups.
    u[ser]:uid:perms              Permissions for a specific user.  For
                                  uid,  you  can  specify either a user
                                  name or a numeric UID.
    g[roup]:gid:perms             Permissions for a specific group. For
                                  gid,  you  can specify either a group
                                  name or a numeric GID.
    d[efault]:u[ser]::perms       Default file owner permissions.
    d[efault]:g[roup]::perms      Default file group owner permissions.
</pre>
<pre>    d[efault]:o[ther]:perms       Default permissions for  users  other
                                  than the file owner or members of the
                                  file group owner.
    d[efault]:m[ask]:perms        Default ACL mask.
    d[efault]:u[ser]:uid:perms    Default permissions  for  a  specific
                                  user. For uid, you can specify either
                                  a user name or a numeric UID.
    d[efault]:g[roup]:gid:perms   Default permissions  for  a  specific
                                  group.   For  gid,  you  can  specify
                                  either a group name or a numeric GID.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=129</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install RHEV-Manager</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=125</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=125#comments</comments>
		<pubDate>Wed, 12 May 2010 02:38:15 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[RedHat - System]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=125</guid>
		<description><![CDATA[Instalasi RHEV manager di windows 2003 server
Requipment Software:
1. Windows 2003 Server SP1
2. Internet Information Service (IIS)
3. ASP.NET
4. Powershell
5. .NET SP1, .NET 2.0, .NET 3.5 SP1
6. Windows Active Directory


Requipment Hardware:
1. Minimum 1 GB Ram
2. 2 GB Free Hardisk

Lets Begin:
1. Install Windows 2003 server seperti biasa
2. Install IIS, ASP.NET, .NET 1.0 SP1, .NET 2.0, dan Active Direcktory [...]]]></description>
			<content:encoded><![CDATA[<p>Instalasi RHEV manager di windows 2003 server</p>
<pre>Requipment Software:
1. Windows 2003 Server SP1
2. Internet Information Service (IIS)
3. ASP.NET
4. Powershell
5. .NET SP1, .NET 2.0, .NET 3.5 SP1
6. Windows Active Directory
<span id="more-125"></span>
</pre>
<pre>Requipment Hardware:
1. Minimum 1 GB Ram
2. 2 GB Free Hardisk
</pre>
<pre>Lets Begin:
1. Install Windows 2003 server seperti biasa
2. Install IIS, ASP.NET, .NET 1.0 SP1, .NET 2.0, dan Active Direcktory dari CD Windows 2003
3. Install "Enable network DTC access" pada Add Remove Progam bagian Application Server
4. Restart
5. Install .NET 3.5 dan Powershell 1.0
6. Install Active Directory
- Click Start, click Run, type dcpromo, and then click OK.
- On the first page of the Active Directory Installation Wizard,
click Next.
- On the next page of the Active Directory Installation Wizard,
click Next.
- On the Domain Controller Type page, click Domain Controller
for a new domain, and then click Next.
- On the Create New Domain page, click Domain in a new forest,
and then click Next.
- On the New Domain Name page, in the Full DNS name for new
domain box, type corp.contoso.com, and then click Next.
- On the Database and Log Folders page, accept the defaults
in the Database folder box and the Log folder box, and then click Next.
- On the Shared System Volume page, accept the default in
the Folder location box, and then click Next.
- On the DNS Registration Diagnostics page, click Install and
 configure the DNS server on this computer and set this computer
 to use this DNS server as its preferred DNS Server, and then click Next.
- On the Permissions page, click Permissions compatible only
with Windows 2000 or Windows Server 2003 operating systems,
and then click Next.
- On the Directory Services Restore Mode Administrator Password page,
 enter a password in the Restore Mode Password box, retype the password to confirm it in the Confirm password box, and then click Next.
- On the Summary page, confirm the information is correct,
and then click Next.
- When prompted to restart the computer, click Restart now.
- After the computer restarts, log on to CONT-CA01 as a member
of the Administrators group.

taken from : http://technet.microsoft.com/en-us/library/aa998088%28EXCHG.65%29.aspx

7. Add user di Active Directory untuk mengadd account Rhev Manager
8. Create permission pada user Rhev manager agar dapat membaca dan menulis di Active Directory, dalam hal ini saya samakan dengan permission administrator
9. Install RHEV-M software
- Klik Next
- Pilih pake yang ingin di install, dalam hal ini saya pilih semua paket dan klik Next
- Install SQL Server 2005 express Localy / jika anda sudah mempunya SQL Server sendiri, anda bisa set Use an exiting SQL Server 2005 Database
- Masukan password untuk user administrator database SQL Server 2005
- Klik Next
- Select Default Website
- Select Domain dan masukan domain yang telah di set pada active directory, dalam hal ini example.com
- Masukan user yang telah di create pada Active Directory
- Klik Next
- Masukan Informasi yang di butuhkan  dan klik Next
- Tunggu sampai proses instalasi selesai dan RHEV-M sudah dapat di gunakan
</pre>
<p>Terima Kasih</p>
<p>Yusuf Hadiwinata</p>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=125</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BGP di Juniper, Gimana sih?</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=117</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=117#comments</comments>
		<pubDate>Wed, 28 Apr 2010 03:09:42 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[ls /usr/ports/networking]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=117</guid>
		<description><![CDATA[Enabling BGP Routing
host1(config)#router bgp 100


Understanding BGP Command Scope






bgp advertise-inactive


 bgp log-neighbor-changes




 bgp always-compare-med


 bgp maxas-limit




 bgp bestpath med confed


 bgp redistribute-internal




 bgp bestpath missing-as-worst


 bgp router-id




 bgp client-to-client reflection


 bgp shutdown




 bgp cluster-id


 ip bgp-community new-format




 bgp confederation identifier


 maximum-paths




 bgp confederation peers


 overload shutdown




 bgp default local-preference


 rib-out disable




 bgp enforce-first-as


 router bgp




 bgp [...]]]></description>
			<content:encoded><![CDATA[<h2>Enabling BGP Routing</h2>
<pre>host1(config)#<strong>router bgp 100

</strong>
<h2>Understanding BGP Command Scope</h2>

<span id="more-117"></span></pre>
<table border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
<div>bgp advertise-inactive</div>
</td>
<td>
<div><a name="1435258"> </a>bgp log-neighbor-changes</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435260"> </a>bgp always-compare-med</div>
</td>
<td>
<div><a name="1435262"> </a>bgp maxas-limit</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435264"> </a>bgp bestpath med confed</div>
</td>
<td>
<div><a name="1435266"> </a>bgp redistribute-internal</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435268"> </a>bgp bestpath missing-as-worst</div>
</td>
<td>
<div><a name="1435270"> </a>bgp router-id</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435272"> </a>bgp client-to-client reflection</div>
</td>
<td>
<div><a name="1435274"> </a>bgp shutdown</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435276"> </a>bgp cluster-id</div>
</td>
<td>
<div><a name="1435278"> </a>ip bgp-community new-format</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435280"> </a>bgp confederation identifier</div>
</td>
<td>
<div><a name="1435282"> </a>maximum-paths</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435284"> </a>bgp confederation peers</div>
</td>
<td>
<div><a name="1435286"> </a>overload shutdown</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435288"> </a>bgp default local-preference</div>
</td>
<td>
<div><a name="1435290"> </a>rib-out disable</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435292"> </a>bgp enforce-first-as</div>
</td>
<td>
<div><a name="1435294"> </a>router bgp</div>
</td>
</tr>
<tr>
<td>
<div><a name="1435296"> </a>bgp fast-external-fallover</div>
</td>
<td>
<div><a name="1435298"> </a>timers bgp</div>
</td>
</tr>
</tbody>
</table>
<pre><img class="alignnone" title="bgp topologi" src="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/BGP_network_advertise.gif" alt="" width="436" height="176" />

The following commands configure router NY:
<pre>host1(config)#<strong>router bgp 300
</strong>host1(config-router)#neighbor 10.2.25.1 remote-as 100
host1(config-router)#<strong>neighbor 10.4.4.1 remote-as 400
</strong>host1(config-router)#network 192.168.33.0 mask 255.255.255.0</pre>
<p>The following commands configure router Boston:</p>
<pre>host2(config)#<strong>router bgp 100
</strong>host2(config-router)#neighbor 10.2.25.2 remote-as 300
host2(config-router)#<strong>neighbor 10.3.3.1 remote-as 400
</strong>host2(config-router)#network 172.19.0.0</pre>
<p>Notice that a mask was not specified for the prefix originating with router Boston. The <em>natural</em> mask is assumed for networks without a mask.The following commands configure router LA:</p>
<p>host3(config)#<strong>router bgp 400 </strong> host3(config-router)#neighbor 10.3.3.2 remote-as 100  host3(config-router)#neighbor 10.4.4.2 remote-as 300  host3(config-router)#network 172.28.8.0 mask 255.255.248.0</p>
<pre>
<h2>Redistributing Routes into BGP</h2>

BGP can learn about routes from sources other than BGP updates from peers. Routes known to other protocols can be <em>redistributed</em> into BGP. Similarly, routes manually configured on a router—static routes—can be redistributed into BGP. Once redistributed, BGP advertises the routes. When you redistribute routes, BGP sets the origin attribute for the route to Incomplete. Refer to <a href="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/bgp-config10.html#1156376">Understanding the Origin Attribute</a><em> </em>(p <a href="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/bgp-config10.html#1156376">1-99</a>) for more information on origins.
The following commands configure three static routes on router Boston and configure router Boston to redistribute the static routes and routes from OSPF into BGP for the network structure shown in <a href="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/bgp-config8.html#1154829">Figure 1-11</a>:
<pre>host2(config)#<strong>ip route 172.30.0.0 255.255.0.0 192.168.10.12
</strong>host2(config)#<strong>ip route 172.16.8.0 255.255.248.0 10.211.5.7
</strong>host2(config)#ip route 192.168.4.0 255.255.254.0 10.14.147.2
host2(config)#router bgp 29
host2(config-router)#<strong>neighbor 10.1.1.2 remote-as 92
</strong>host2(config-router)#redistribute static
host2(config-router)#redistribute ospf

<img class="alignnone" title="redis-bgp" src="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/BGP_redistributing_routes.gif" alt="" width="435" height="167" /></pre>
<pre>clear ip bgp redistribution
<ul>
<li><a name="1546656"> </a>Use to reapply policy to routes that have been redistributed into BGP.</li>
<li><a name="1546657"> </a>This command takes effect immediately.</li>
<li><a name="1400926"> </a>There is no <strong>no</strong> version.</li>
</ul>

<a name="1400930"> </a> disable-dynamic-redistribute
<ul>
<li><a name="1400932"> </a>Use to halt the dynamic redistribution of routes that are initiated by changes to a route map.</li>
<li><a name="1400934"> </a>Dynamic redistribution is enabled by default.</li>
<li><a name="1400935"> </a>Example</li>
</ul>

host1(config-router)#<strong>disable-dynamic-redistribute
</strong>
<ul>
<li><a name="1400937"> </a>This command takes effect immediately.</li>
<li><a name="1400938"> </a>Use the <strong>no</strong> version to reenable dynamic redistribution.</li>
</ul>
<h2>Redistributing Routes from BGP</h2>

bgp redistribute-internal
<ul>
<li><a name="1335792"> </a>Use to enable the redistribution of IBGP routes in addition to EBGP routes into IGPs configured for BGP route redistribution.</li>
<li><a name="1335794"> </a>Redistribution of IBGP routes is disabled by default, except within a VRF where IBGP routes are always redistributed.</li>
<li><a name="1335795"> </a>You must clear all BGP sessions after issuing this command for it to take effect.</li>
<li><a name="1335796"> </a>Example</li>
</ul>

host1(config-router)#<strong>bgp redistribute-internal
</strong>host1(config-router)#<strong>exit
</strong>host1(config)#<strong>exit
</strong>host1(config)#clear ip bgp *
<pre>Advertising Default Routes

To configure router NY:
<pre>host1(config)#<strong>router bgp 200
</strong>host1(config-router)#network 192.168.42.0 mask 255.255.254.0
host1(config-router)#neighbor 10.3.3.1 remote-as 300
host1(config-router)#neighbor 192.168.10.2 remote-as 100
host1(config-router)#<strong>neighbor 192.168.10.2 default-originate

<img class="alignnone" title="BGP_default_route_advertise" src="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/BGP_default_route_advertise.gif" alt="" width="437" height="158" />

</strong>
<h3>Redistributing Default Routes</h3>

default-information originate
<ul>
<li><a name="1154890"> </a>Use to enable the redistribution of default routes into BGP.</li>
<li><a name="1154891"> </a>Example</li>
</ul>

host1(config)#<strong>router bgp 100
</strong>host1(config-router)#default-information originate
<pre>
<h3>Setting a Static Default Route</h3>

Suppose that in <a href="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/bgp-config8.html#1154922">Figure 1-13</a>, router KC has been configured to advertise a default route to router Chicago:
<pre>host1(config)#<strong>router bgp 62
</strong>host1(config-router)#<strong>network 172.17.24.0 mask 255.255.248.0
</strong>host1(config-router)#<strong>neighbor 10.8.3.1 remote-as 21
</strong>host1(config-router)#<strong>neighbor 10.8.3.1 default-originate
</strong>
<a name="1154906"> </a>You prefer that router Chicago send traffic with unknown destinations to router StLouis, so you configure a static default route on router Chicago:</pre>
<pre>host2(config)#<strong>router bgp 21
</strong>host2(config-router)#network 192.168.48.0 mask 255.255.240.0
host2(config-router)#neighbor 10.8.3.4 remote-as 62
host2(config-router)#<strong>neighbor 10.24.5.1 remote-as 37
</strong>host2(config-router)#exit
host2(config)#ip route 0.0.0.0 0.0.0.0 172.25.122.0</pre>
<p><strong> </strong><a name="1154913"> </a>Router StLouis is configured to advertise network 172.25.122.0/23 to router Chicago:</p>
<p>host3(config)#<strong>router bgp 37 </strong>host3(config-router)#<strong>network 172.25.122.0 mask 255.255.254.0 </strong>host3(config-router)#neighbor 10.24.5.3 remote-as 21  <img class="alignnone" title="BGP_default_route_static" src="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/BGP_default_route_static.gif" alt="" width="517" height="116" /></p>
<pre><strong> </strong>
<h2>Setting the Minimum Interval Between Sending Routing Updates</h2>

In the following example, the minimum time between sending BGP routing updates is set to 5 seconds:
<pre>host1(config)#<strong>router bgp 100
</strong>host1(config-router)#<strong>neighbor 2.2.2.2
advertisement-interval 5

</strong>
<h2>Aggregating Routes</h2>

<img class="alignnone" title="BGP_aggregate_addressing" src="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/BGP_aggregate_addressing.gif" alt="" width="445" height="187" />

To configure router LA:
<pre>host1(config)#<strong>router bgp 873
</strong>host1(config-router)#<strong>neighbor 10.2.2.4 remote-as 873
</strong>host1(config-router)#<strong>network 172.24.1.0 mask 255.255.255.0
</strong>host1(config-router)#<strong>network 172.24.2.0 mask 255.255.255.0
</strong></pre>
<p><a name="1154970"> </a>To configure router SanJose:</p>
<p>host2(config)#<strong>router bgp 873<br />
</strong></p>
<p>host2(config-router)#<strong>neighbor 10.2.2.3 remote-as 873 </strong></p>
<p>host2(config-router)#<strong>neighbor 10.5.5.1 remote-as 17 </strong></p>
<p>host2(config-router)#<strong>network 172.24.24.0 mask 255.255.248.0 </strong></p>
<p>host2(config-router)#<strong>aggregate-address 172.24.0.0 255.255.224.0 </strong><a name="1154976"></a></p>
<p><a name="1154976"><br />
</a></p>
<p><a name="1154976"></a>As configured above, router SanJose advertises the more specific routes as well as the aggregate route to router Boston. Alternatively, you can use the <strong>summary-only</strong> option to configure router SanJose to suppress the more specific routes and advertise only the aggregate route:</p>
<p>host2(config)#<strong>router bgp 873 </strong><br />
host2(config-router)#<strong>neighbor 10.2.2.3 remote-as 873<br />
</strong>host2(config-router)#<strong>neighbor 10.5.5.1 remote-as 17 </strong><br />
host2(config-router)#<strong>network 172.24.24.0 mask 255.255.248.0<br />
</strong>host2(config-router)#<strong>aggregate-address 172.24.0.0 255.255.224.0 summary-only </strong><a name="1154982"></a></p>
<p>Each of these configurations sets the atomic-aggregate attribute in the aggregate route. This attribute informs recipients that the route <em>is</em> an aggregate and should not be deaggregated into more specific routes.<a name="1154983"> </a>Aggregate routes discard the path information carried in the original routes. To preserve the paths, you must use the <strong>as-set</strong> option. This option creates an AS-Set that consists of all the AS numbers traversed by the summarized paths. The AS-Set is enclosed within curly brackets; for example, {3, 2}. Each AS number appears only once, even if it appears in more than one of the original paths. If you use the <strong>as-set</strong> option, the atomic-aggregate attribute is not set for the aggregated route. The following commands configure router SanJose to aggregate the routes while preserving the path information:</p>
<p>host2(config)#<strong>router bgp 873<br />
</strong></p>
<p>host2(config-router)#<strong>neighbor 10.2.2.3 remote-as 873 </strong></p>
<p>host2(config-router)#<strong>neighbor 10.5.5.1 remote-as 17<br />
</strong></p>
<p>host2(config-router)#<strong>network 172.24.24.0 mask 255.255.248.0 </strong></p>
<p>host2(config-router)#<strong>aggregate-address 172.24.0.0 255.255.224.0 summary-only as-set </strong><a name="1154989"></a></p>
<p><a name="1154989"><br />
</a></p>
<p><a name="1154989"></a>If you do not want to aggregate all more specific routes, you can use a route map to limit aggregation. Consider <a href="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/bgp-config8.html#1154964">Figure 1-14</a> again. Suppose you do not want router SanJose to aggregate prefix 172.24.48.0/20. The following commands show how you can configure a route map on router SanJose to match this prefix, and how to invoke the route map with the <strong>advertise-map</strong> option:</p>
<p>host2(config)#<strong>router bgp 873 </strong> host2(config-router)#<strong>neighbor 10.2.2.3 remote-as 873 </strong>host2(config-router)#<strong>neighbor 10.5.5.1 remote-as 17 </strong> host2(config-router)#<strong>neighbor 10.2.2.3 route-map lmt_agg in </strong>host2(config-router)#<strong>network 172.24.24.0 mask 255.255.248.0 </strong> host2(config-router)#<strong>aggregate-address 172.24.0.0 255.255.224.0 advertise-map lmt_agg </strong> host2(config-router)#<strong>exit </strong>host2(config)#<strong>route-map lmt_agg permit 10 </strong>host2(config-route-map)#<strong>match ip address 1 </strong> host2(config-route-map)#<strong>exit </strong> host2(config)#<strong>access-list 1 permit 172.24.48.0 0.240.255.255 </strong><a name="1155004"> </a></p>
<p>You can use the <strong>attribute-map</strong> option to configure attributes for the aggregated route. In <a href="http://www.juniper.net/techpubs/software/erx/erx41x/swconfig-routing-vol2/html/bgp-config8.html#1154964">Figure 1-14</a>, suppose that router LA has been configured to set the community attribute for route 172.24.160.0/19 to no-export. This attribute is passed along to router SanJose and preserved when the aggregate route is created. As a result, the aggregate route would not be advertised outside the AS. The following commands demonstrate how to configure router SanJose to prevent the aggregate from not being advertised:host2(config)#<strong>router bgp 873 </strong></p>
<p>host2(config-router)#<strong>neighbor 10.2.2.3 remote-as 873<br />
</strong></p>
<p><strong></strong>host2(config-router)#<strong>neighbor 10.5.5.1 remote-as 17</strong> host2(config-router)#<strong>network 172.24.24.0 mask 255.255.248.0 </strong> host2(config-router)#<strong>aggregate-address 172.24.0.0 255.255.224.0 </strong>attribute-map conf_agg_att</p>
<p><strong> </strong><strong></strong>host2(config-router)#<strong>exit</strong> host2(config)#<strong>route-map conf_agg_att permit 10 </strong> host2(config-route-map)#<strong>set community no-export </strong></pre>
</pre>
</pre>
</pre>
</pre>
</pre>
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=117</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BGP dengan quangga/ zebra</title>
		<link>http://yusufhadiwinata.com/~bin_pwd/?p=115</link>
		<comments>http://yusufhadiwinata.com/~bin_pwd/?p=115#comments</comments>
		<pubDate>Wed, 28 Apr 2010 02:59:40 +0000</pubDate>
		<dc:creator>uid=0(yusuf) gid=0(yusuf) groups=0(yusuf),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</dc:creator>
				<category><![CDATA[ls /usr/ports/networking]]></category>

		<guid isPermaLink="false">http://yusufhadiwinata.com/~bin_pwd/?p=115</guid>
		<description><![CDATA[/etc/quagga/zebra.conf
  hostname jandakot
  ! define password for bgpd daemon (for connecting to daemon via telnet)
  password insertpasswordhere
  ! define enable password for bgpd daemon (for connecting to daemon via telnet)
  enable password insertpasswordhere
  !
  ! list interfaces
  interface eth1
  interface vlan0
  interface vlan1
  interface [...]]]></description>
			<content:encoded><![CDATA[<p>/etc/quagga/zebra.conf</p>
<pre>  hostname jandakot
  ! define password for bgpd daemon (for connecting to daemon via telnet)
  password <em>insertpasswordhere</em>
  ! define enable password for bgpd daemon (for connecting to daemon via telnet)
  enable password <em>insertpasswordhere</em>
  !
  ! list interfaces
  interface eth1
  interface vlan0
  interface vlan1
  interface lo
  !
  ! null route to consolidate all subnets in this /24
  ip route 10.60.86.0/24 Null0 255
  !
  line vty

<span id="more-115"></span>
/etc/quagga/bgpd.conf:
<pre>  hostname jandakot
  ! define password for bgpd daemon (for connecting to daemon via telnet)
  password <em>insertpasswordhere</em>
  ! define enable password for bgpd daemon (for connecting to daemon via telnet)
  enable password <em>insertpasswordhere</em>
  !
  ! define router's BGP AS
  router bgp 65086
  ! define ID of router - we use IP of the router
  bgp router-id 10.60.86.1
  ! define network address that this router knows about
  network 10.60.86.0/24
  !
  ! armadale neighbour
  neighbor 10.60.74.253 remote-as 65074
  neighbor 10.60.74.253 soft-reconfiguration inbound
  neighbor 10.60.74.253 distribute-list freenet in
  neighbor 10.60.74.253 distribute-list freenet out
  !
  ! willetton neighbour
  neighbor 10.60.84.253 remote-as 65084
  neighbor 10.60.84.253 soft-reconfiguration inbound
  neighbor 10.60.84.253 distribute-list freenet in
  neighbor 10.60.84.253 distribute-list freenet out
  !
  ! ACLs to stop people from propagating routes to their own private networks
  access-list freenet permit 10.48.0.0/12
  access-list freenet deny any
  !
  line vty
  exec-timeout 20160 0

Testing2
<pre>nc localhost 2605
<pre>  Hello, this is Quagga (version 0.98.4).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.

  User Access Verification

  Password: <em>insertpasswordhere</em>

  jandakot&gt;
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="16">
</td>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="100%" valign="top"><a href="http://openwrt.org/"> <img src="http://martybugs.net/wireless/openwrt/images/openwrt.png" border="0" alt="OpenWrt" hspace="10" vspace="5" width="88" height="31" align="right" /></a> BGP Routing on OpenWrt with Quagga 

 This page contains an overview on how to configure the Quagga BGP daemon on a Linksys WRT54GS  wireless router that is running OpenWrt. 

 Introductory Information 

 On the <a href="http://wafreenet.org/">WAFreeNet</a>, we have been using BGP (Border Gateway Protocol) as our dynamic routing protocol  (after initial unsuccessful attempts with OSPF due to stability issues with route flapping). 

 The <a href="http://quagga.net/">Quagga Routing Suite</a> is an opensource software suite, and provides a stable implementation of BGPv4 for Unix platforms. It consists of a core zebra daemon, and daemons for supporting various routing protocols, including RIP, OSPF and BGP. 

 Any BGP node only needs to be configured with details of its immediate neighbouring nodes, and will then start exchanging routes. This means adding a new node to a network only requires BGP configuration on the new node, and its immediate neighbours, and routes to the new node will then propagate through  then entire network. 

 Note that Quagga requires reciprocal configuration on a neighbouring node, so  you'll need to add neighbour configuration details to the nearest Quagga node  before it'll start exchanging routes with your WRT. 

 The sample configuration shown below is for the  <a href="http://www.nodedb.com/australia/wa/perth/view.php?nodeid=2143">Jandakot</a> node on the WAFreeNet.  This node uses a WRT54G running  <a href="http://martybugs.net/wireless/openwrt/">OpenWrt</a> as a router, and the WRT provides routing, dns, dhcp and firewalling services for the node.
 Jandakot has an uplink to the  <a href="http://www.nodedb.com/australia/wa/perth/view.php?nodeid=2093">ArmadaleAP</a> node, and <a href="http://www.nodedb.com/australia/wa/perth/view.php?nodeid=2122">Willetton</a> has a client link to Jandakot. 

 Install Components on OpenWrt
 <strong>Install IPK Packages</strong>
 Install the appropriate Quagga packages on OpenWrt: 
<pre>ipkg install quagga quagga-bgpd
</pre>
<p>Note that this assumes your WRT has internet access, and is able to download the <a href="http://openwrt.org/ipkg/Packages">package list</a> to determine where it needs to download the specified packages.<br />
If your WRT doesn't have internet access, you'll need to use a browser to view the <a href="http://openwrt.org/ipkg/Packages">package list</a> list,  manually download the specified packages, and transfer them to your WRT and install them.</p>
<p><strong>Create Configuration Files</strong><br />
Firstly, create a directory for all Quagga configuration files on the WRT:</p>
<pre>  mkdir /etc/quagga
</pre>
<p>Create a configuration file for the Quagga zebra daemon, /etc/quagga/zebra.conf:</p>
<pre>  hostname jandakot
  ! define password for bgpd daemon (for connecting to daemon via telnet)
  password <em>insertpasswordhere</em>
  ! define enable password for bgpd daemon (for connecting to daemon via telnet)
  enable password <em>insertpasswordhere</em>
  !
  ! list interfaces
  interface eth1
  interface vlan0
  interface vlan1
  interface lo
  !
  ! null route to consolidate all subnets in this /24
  ip route 10.60.86.0/24 Null0 255
  !
  line vty
</pre>
<p>The null route allows us to consolidate all routes for the /24 subnet that this router is responsible for, and will cause it to propagate a single route for the entire /24 subnet, rather than multiple routes for the smaller subnets inside 10.60.86.0/24.</p>
<p>Create a configuration file for the Quagga bgpd daemon, /etc/quagga/bgpd.conf:</p>
<pre>  hostname jandakot
  ! define password for bgpd daemon (for connecting to daemon via telnet)
  password <em>insertpasswordhere</em>
  ! define enable password for bgpd daemon (for connecting to daemon via telnet)
  enable password <em>insertpasswordhere</em>
  !
  ! define router's BGP AS
  router bgp 65086
  ! define ID of router - we use IP of the router
  bgp router-id 10.60.86.1
  ! define network address that this router knows about
  network 10.60.86.0/24
  !
  ! armadale neighbour
  neighbor 10.60.74.253 remote-as 65074
  neighbor 10.60.74.253 soft-reconfiguration inbound
  neighbor 10.60.74.253 distribute-list freenet in
  neighbor 10.60.74.253 distribute-list freenet out
  !
  ! willetton neighbour
  neighbor 10.60.84.253 remote-as 65084
  neighbor 10.60.84.253 soft-reconfiguration inbound
  neighbor 10.60.84.253 distribute-list freenet in
  neighbor 10.60.84.253 distribute-list freenet out
  !
  ! ACLs to stop people from propagating routes to their own private networks
  access-list freenet permit 10.48.0.0/12
  access-list freenet deny any
  !
  line vty
  exec-timeout 20160 0
</pre>
<p>As the Jandakot node has links to two other WAFreeNet nodes which also run bgpd, it'll be configured as a neighbour to each of these nodes, allowing it to exchange routes with each neighbour.</p>
<p>The IP address specified for each neighbour is that of the remote router's interface that connects to this node, ie, the IP address that the Jandakot WRT will see the bgpd traffic as originating from.<br />
The BGP AS number of each neighbour must also be specified.</p>
<p>Each of the neighbours must also have reciprocal configuration in their bgpd configuration file for the router you're configuring (ie, the WRT).</p>
<p><strong>Modify Init Script</strong><br />
The current quagga package for OpenWrt creates an init script, but if using older versions of the quagga package, you'll need to manually create the init script.</p>
<p>Edit the init script, /etc/init.d/S49quagga, and edit the following line, removing all daemons except those listed here:</p>
<pre>  DAEMONS="zebra bgpd"
</pre>
<p><strong>Firewall Script</strong><br />
Depending on the firewall script on your WRT, you may need to modify it to allow bgpd traffic. Ensure that in and outbound traffic on TCP port 179 is allowed through the firewall.</p>
<p>Starting Quagga on OpenWrt<br />
<strong>Starting Quagga</strong><br />
To manually start the zebra and bgpd daemons for the first time,  you can either reboot the WRT, or manually run the init script:</p>
<pre>  /etc/init.d/S49quagga start
</pre>
<p>After making changes to bgpd.conf or zebra.conf, you'll need to restart the zebra and bgpd daemons. A reboot will certainly achieve this, but a quicker way is to terminate the daemons and restart them using the following syntax:</p>
<pre>  /etc/init.d/S49quagga restart
</pre>
<p>Debugging Quagga<br />
<strong>Verifying BGP Operation</strong><br />
If Quagga is configured correctly at both ends, you should see the routing table of the WRT (viewable by running route -n from a command prompt) being populated with routes from its configured neighbour(s).</p>
<p>If routes are not showing up in the routing table, further debugging is required. While the Quagga daemons certainly can be configured to write status and debug information to log files, this isn't really a feasible option on a device such as the WRT, with flash memory.</p>
<p>Both the zebra and bgpd daemons provide local telnet access for monitoring and debugging.</p>
<p><strong>Telnet to BGP Daemon</strong><br />
OpenWrt doesn't have a telnet client, and telnet support hasn't been compiled into busybox. Instead, we need to use Netcat, which is included in the standard OpenWrt build.<br />
To telnet to the bgpd daemon, run:</p>
<pre>  nc localhost 2605
</pre>
<p>and you'll be prompted for a password.<br />
(If you have the appropriate entries defined in /etc/services, you can also use nc localhost bgpd, and similarly for  zebra.)</p>
<p>You need to enter the first password that was defined in /etc/quagga/bgpd.conf, and you'll then be rewarded with a prompt.</p>
<pre>  root@JANDAKOT-AP:~# nc localhost 2605

  Hello, this is Quagga (version 0.98.4).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.

  User Access Verification

  Password: <em>insertpasswordhere</em>

  jandakot&gt;
</pre>
<p>To view the status of the bgpd neighbours, run the following:</p>
<pre>  jandakot&gt; show ip bgp summary
</pre>
<p>and you should be rewarded with output similar to this:</p>
<pre>  BGP router identifier 10.60.86.1, local AS number 65086
  6 BGP AS-PATH entries
  0 BGP community entries

  Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
  10.60.74.253    4 65074   10525   10232        0    0    0 6d21h24m        4
  10.60.84.253    4 65084   10013   10181        0    0    0 6d22h49m        2

  Total number of neighbors 2
</pre>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</pre>
<pre>  jandakot&gt; show ip bgp
</pre>
<p>and you should get something similar to this output:</p>
<pre>  BGP table version is 0, local router ID is 10.60.86.1
  Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal
  Origin codes: i - IGP, e - EGP, ? - incomplete

     Network          Next Hop            Metric LocPrf Weight Path
  *&gt; 10.60.68.0/24    10.60.74.253                           0 65074 65068 i
  *&gt; 10.60.74.0/24    10.60.74.253             0             0 65074 i
  *&gt; 10.60.82.0/24    10.60.74.253                           0 65074 65082 i
  *&gt; 10.60.84.0/24    10.60.84.253             0             0 65084 i
  *&gt; 10.60.86.0/24    0.0.0.0                  0         32768 i
  *&gt; 10.60.113.0/24   10.60.84.253                           0 65084 65113 i
  *&gt; 10.64.0.0/12     10.60.74.253             0             0 65074 i
  Total number of prefixes 7

<strong>Telnet to Zebra Daemon</strong>
 To telnet to the zebra daemon, run: 
<pre>  nc localhost 2601
<pre>  root@JANDAKOT-AP:~# nc localhost 2601

  Hello, this is Quagga (version 0.98.4).
  Copyright 1996-2005 Kunihiro Ishiguro, et al.

  User Access Verification

  Password: <em>insertpasswordhere</em>

  jandakot&gt;
</pre>
<p>To view the status of the routing table, run the following:</p>
<pre>  jandakot&gt; show ip route
</pre>
<p>and you should be rewarded with output similar to this:</p>
<pre>  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         B - BGP, &gt; - selected route, * - FIB route

  K&gt;* 0.0.0.0/0 via 10.60.74.253, eth1
  B&gt;* 10.60.68.0/24 [20/0] via 10.60.74.253, eth1, 6d21h25m
  B&gt;* 10.60.74.0/24 [20/0] via 10.60.74.253, eth1, 6d21h25m
  C&gt;* 10.60.74.252/30 is directly connected, eth1
  B&gt;* 10.60.82.0/24 [20/0] via 10.60.74.253, eth1, 6d21h25m
  B&gt;* 10.60.84.0/24 [20/0] via 10.60.84.253, vlan1, 6d22h50m
  C&gt;* 10.60.84.252/30 is directly connected, vlan1
  S   10.60.86.0/24 [255/0] is directly connected, Null0, bh
  C&gt;* 10.60.86.0/28 is directly connected, vlan0
  C&gt;* 10.60.86.252/30 is directly connected, vlan1
  B&gt;* 10.60.113.0/24 [20/0] via 10.60.84.253, vlan1, 6d22h50m
  B&gt;* 10.64.0.0/12 [20/0] via 10.60.74.253, eth1, 6d21h25m
  C&gt;* 127.0.0.0/8 is directly connected, lo
</pre>
</pre>
</pre>
</pre>
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://yusufhadiwinata.com/~bin_pwd/?feed=rss2&amp;p=115</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

