<?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"
	>

<channel>
	<title>The journey of me @_@</title>
	<atom:link href="http://www.bimo.web.id/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.bimo.web.id/wp</link>
	<description>Bimo - my one Last Breathh....</description>
	<pubDate>Wed, 07 Dec 2011 01:52:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>how to block ftp and ssh brute force attack in FreeBSD</title>
		<link>http://www.bimo.web.id/wp/?p=122</link>
		<comments>http://www.bimo.web.id/wp/?p=122#comments</comments>
		<pubDate>Wed, 07 Dec 2011 01:50:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[attack]]></category>

		<category><![CDATA[brute force]]></category>

		<category><![CDATA[bruteblock]]></category>

		<category><![CDATA[ftp brute force]]></category>

		<category><![CDATA[how to block brute force]]></category>

		<category><![CDATA[ipfw]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[ssh brute force]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=122</guid>
		<description><![CDATA[bruteblock
Hate with ssh and FTP brute force attack? if you are Freebsd user, try use bruteblock software.
by this software, we can block brute force attacker automatically use ipfw2. so.. you can sleep well every day&#8230; hehehe..
here is step by step installation and configuration:
1. install from port
#cd /usr/ports/security/bruteblock
# make install clean

2. add command in rc.conf for [...]]]></description>
			<content:encoded><![CDATA[<p>bruteblock</p>
<p>Hate with ssh and FTP brute force attack? if you are Freebsd user, try use bruteblock software.<br />
by this software, we can block brute force attacker automatically use ipfw2. so.. you can sleep well every day&#8230; hehehe..<br />
here is step by step installation and configuration:<br />
1. install from port</p>
<p>#cd /usr/ports/security/bruteblock</p>
<p># make install clean<br />
<span id="more-122"></span></p>
<p>2. add command in rc.conf for automatic running after reboot</p>
<p>bruteblockd_enable=”YES”<br />
bruteblockd_table=”1?<br />
bruteblockd_flags=”-s 5?</p>
<p>3. edit syslog.conf</p>
<p>change this line:<br />
auth.info;authpriv.info /var/log/auth.log<br />
to<br />
auth.info;authpriv.info |exec /usr/local/sbin/bruteblock -f /usr/local/etc/bruteblock/ssh.conf</p>
<p>4. restart syslog</p>
<p>#/etc/rc.d/syslogd restart</p>
<p>5. run bruteblock software</p>
<p>#/usr/local/etc/rc.d/bruteblockd start</p>
<p>6. add ipfw firewall to block the ip in the list of bruteblock</p>
<p>#ipfw add 400 deny ip from me to table\(1\)<br />
#ipfw add 410 deny ip from table\(1\) to me</p>
<p>7. change configuration as you want in /usr/local/etc/bruteblock/ssh.conf</p>
<p> i add for vsftpd so i add this line in regexp</p>
<p>regexp4         = vsftpd.*FAIL LOGIN: Client (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})</p>
<p>we can add another service, just put in regexp based on log format in log file</p>
<p>this is it&#8230;. we can can sleep well every night now&#8230;.</p>
<p>source: http://zuma.staff.umm.ac.id/2010/10/08/penangkal-serangan-bruteforce/</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=122</wfw:commentRss>
		</item>
		<item>
		<title>add tun device on freebsd</title>
		<link>http://www.bimo.web.id/wp/?p=120</link>
		<comments>http://www.bimo.web.id/wp/?p=120#comments</comments>
		<pubDate>Tue, 12 Jul 2011 12:18:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[belajar]]></category>

		<category><![CDATA[device]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[poptop]]></category>

		<category><![CDATA[pptp]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[tun]]></category>

		<category><![CDATA[unix]]></category>

		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=120</guid>
		<description><![CDATA[If you using vpn server on your server, you must check your tun device. How to check it?
[root@fw-gw1 /usr/home/bimo]# cd /dev
[root@fw-gw1 /dev]# ls
tun0
tun1
tun2
if you want to add tun device, you can create using command:
# ifconfig tun3 create
if you want to delete tun device:
#ifconfig tun3 destroy
]]></description>
			<content:encoded><![CDATA[<p>If you using vpn server on your server, you must check your tun device. How to check it?</p>
<p>[root@fw-gw1 /usr/home/bimo]# cd /dev<br />
[root@fw-gw1 /dev]# ls<br />
tun0<br />
tun1<br />
tun2</p>
<p>if you want to add tun device, you can create using command:<br />
# ifconfig tun3 create</p>
<p>if you want to delete tun device:<br />
#ifconfig tun3 destroy</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=120</wfw:commentRss>
		</item>
		<item>
		<title>Install PostgreSQL in FreeBSD</title>
		<link>http://www.bimo.web.id/wp/?p=115</link>
		<comments>http://www.bimo.web.id/wp/?p=115#comments</comments>
		<pubDate>Sat, 04 Dec 2010 02:04:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[Database]]></category>

		<category><![CDATA[install]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[POstgreSQL]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=115</guid>
		<description><![CDATA[Its been long time since my last writen. Few days ago Bos ask me to install PostgreSQL in our webserver because he have costumer use PostgreSQL Database. OKe&#8230;lets start how to configure it.
First, make sure port in server is up to date, or we can update it, see update manual.
Now, lets start to install it.
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
cd [...]]]></description>
			<content:encoded><![CDATA[<p>Its been long time since my last writen. Few days ago Bos ask me to install PostgreSQL in our webserver because he have costumer use PostgreSQL Database. OKe&#8230;lets start how to configure it.<br />
First, make sure port in server is up to date, or we can update it, <a href="http://www.bimo.web.id/wp/?p=33">see update manual.</a><br />
Now, lets start to install it.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong>cd /usr/port/database/postgresql84-server</strong><br />
<strong>make config</strong>, choose OPTIMIZED_CFLAGS for optimized<br />
<strong>make install clean</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>after finish installed, now lets configure it<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Put postgresql in rc.conf so can running otomatic every time server startup<br />
<strong>echo &#8216;postgresql_enable=&#8221;YES&#8221;&#8216; >> /etc/rc.conf</strong><br />
<span id="more-115"></span><br />
For init DB:<br />
<strong>/usr/local/etc/rc.d/postgresql initdb</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<em>The files belonging to this database system will be owned by user &#8220;pgsql&#8221;.<br />
This user must also own the server process.</p>
<p>The database cluster will be initialized with locale C.<br />
The default text search configuration will be set to &#8220;english&#8221;.</p>
<p>fixing permissions on existing directory /usr/local/pgsql/data &#8230; ok<br />
creating subdirectories &#8230; ok<br />
selecting default max_connections &#8230; 40<br />
selecting default shared_buffers &#8230; 28MB<br />
creating configuration files &#8230; ok<br />
creating template1 database in /usr/local/pgsql/data/base/1 &#8230; ok<br />
initializing pg_authid &#8230; ok<br />
initializing dependencies &#8230; ok<br />
creating system views &#8230; ok<br />
loading system objects&#8217; descriptions &#8230; ok<br />
creating conversions &#8230; ok<br />
creating dictionaries &#8230; ok<br />
setting privileges on built-in objects &#8230; ok<br />
creating information schema &#8230; ok<br />
vacuuming database template1 &#8230; ok<br />
copying template1 to template0 &#8230; ok<br />
copying template1 to postgres &#8230; ok</p>
<p>WARNING: enabling &#8220;trust&#8221; authentication for local connections<br />
You can change this by editing pg_hba.conf or using the -A option the<br />
next time you run initdb.</p>
<p>Success. You can now start the database server using:</p>
<p>    /usr/local/bin/postgres -D /usr/local/pgsql/data<br />
or<br />
    /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start</p>
<p></em></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Edit configuration<br />
<strong>ee /usr/local/pgsql/data/postgresql.conf</strong></p>
<p>listen_addresses=&#8217;*&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
edit this file also<br />
<strong>ee /usr/local/pgsql/data/pg_hba.conf</strong></p>
<p>host  all  all  127.0.0.1  md5<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
after finsih all, lets start the POstgreSQL<br />
<strong>/usr/local/etc/rc.d/postgresql start &#038;<br />
</strong><br />
create user:<br />
<strong>su pgsql</strong><br />
$<strong> createuser -sdrP username</strong><br />
Enter password for new role: ******<br />
Enter it again: ******</p>
<p>$ <strong>exit</strong></p>
<p>create db and user privillege:<br />
<strong>su pgsql</strong><br />
$ <strong>createdb test</strong><br />
$ <strong>psql test</strong><br />
psql (8.4.5)<br />
Type &#8220;help&#8221; for help.</p>
<p>test=# <strong>create user usertest with password &#8216;userpaswd&#8217;;</strong><br />
CREATE ROLE<br />
test=# </p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=115</wfw:commentRss>
		</item>
		<item>
		<title>Upgrade FreeBSD to Stable Version</title>
		<link>http://www.bimo.web.id/wp/?p=106</link>
		<comments>http://www.bimo.web.id/wp/?p=106#comments</comments>
		<pubDate>Sun, 22 Feb 2009 17:29:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[Good Stories]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=106</guid>
		<description><![CDATA[after 2 years running, i forget to upgrade my mail server to stable version ( wat de f@!#$!!). Not like my others server, My mail server only for backup server (before). So I am not consentrate with it. But now it is also my main server for email. so i must upgrade the version to [...]]]></description>
			<content:encoded><![CDATA[<p>after 2 years running, i forget to upgrade my mail server to stable version ( wat de f@!#$!!). Not like my others server, My mail server only for backup server (before). So I am not consentrate with it. But now it is also my main server for email. so i must upgrade the version to stable and update other running application on it. Here i write down how to upgrade FreeBSD to stable version.</p>
<p>before you do it, make sure you understand of what you doing and prepare some coffee and &quot;cemilan&quot;, coz its take more than 3 hour prosess ( depend on your computer resource and bandwidth)</p>
<p>Bismillahirohmanirohim&#8230;..</p>
<p>first, lets check my mail server version<br />
mail# <strong>uname -a</strong><br />
FreeBSD mail.pagongxx.xxx.xx 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Tue Oct 16 14:26:49 WIT 2007     bimo@mail.pagongxx.xxx.xx:/usr/src/sys/i386/compile/KERNEL1  i386<br />
mail#<br />
<span id="more-106"></span><br />
oke..still Release version, lets make it STABLE VERSION&#8230;.</p>
<p>we must install cvsup first,<br />
mail#<strong>cd /usr/ports/net/cvsup-without-gui</strong><br />
mail#<strong>make install clean</strong><br />
now, edit  file called stable-supfile on /usr/share/examples/cvsup/ directory</p>
<p>mail#<strong>ee /usr/share/examples/cvsup/stable-supfile<br />
</strong><br />
edit this field:</p>
<p><strong>default host= cvsup2.freebsd.org</strong> or <strong>cvsup3.freebsd.org</strong><br />
save it.</p>
<p>or you can see at http://www.freebsd.org/doc/en_US.ISO8859 - /books/handbook/cvsup.html#CVSUP-MIRRORS</p>
<p>then,<br />
mail#<strong>cvsup -g -L 2 /usr/share/examples/cvsup/stable-supfile</strong></p>
<p>now, rebuild your kernel, here is the steps<br />
mail# <strong>cd /usr/src</strong><br />
mail# <strong>make buildworld</strong><br />
mail# <strong>make buildkernel KERNCONF=YOUR_KERNEL_NAME</strong><br />
mail# <strong>make installkernel KERNCONF=YOUR_KERNEL_NAME</strong><br />
mail# <strong>reboot</strong></p>
<p>mail# <strong>mergemaster -p</strong><br />
mail# <strong>make installworld</strong><br />
mail# <strong>mergemaster</strong></p>
<p>But i suggest you to back up your file in /etc/ directory before you do  mergemaster</p>
<p>mail# <strong>cp -Rp /etc /etc.old</strong><br />
mergemaster -p use for pre-buildworld mode. Its use to compare ecensial file for successfull buildworld.</p>
<p>-finish-</p>
<p>its status today,</p>
<p>mail# <strong>uname -a</strong><br />
FreeBSD mail.pagongxx.xxx.xx 6.4-STABLE FreeBSD 6.4-STABLE #0: Fri Feb 20 02:46:47 WIT 2009     bimo@mail.pagongxx.xxx.xx:/usr/obj/usr/src/sys/KERNEL1  i386<br />
mail#</p>
<p>its easy right?<br />
for detail, you can visit http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=106</wfw:commentRss>
		</item>
		<item>
		<title>Install DNS Server in FreeBSD</title>
		<link>http://www.bimo.web.id/wp/?p=105</link>
		<comments>http://www.bimo.web.id/wp/?p=105#comments</comments>
		<pubDate>Wed, 04 Feb 2009 05:15:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=105</guid>
		<description><![CDATA[Last night, i help pak cancer install DNS server for Disduk ( Dinas kependudukan).He is NOC in dinas Kependudukan. Since all server change to FreeBSD so everything must build from beginning so the DNS. i have long time not install DNS. I dont have any documentation about it also.  so today i will write [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, i help <a href="http://www.sumber-wireless.com">pak cancer</a> install DNS server for Disduk ( Dinas kependudukan).He is NOC in dinas Kependudukan. Since all server change to FreeBSD so everything must build from beginning so the DNS. i have long time not install DNS. I dont have any documentation about it also.  so today i will write down step by step installing DNS server using Bind9. Just incase if I forget, i can see this manual. Oke..lets begin&#8230;.</p>
<p>Bismillahirohmanirohim&#8230;&#8230;<br />
<strong><br />
1. INSTALL APPLICATION</strong></p>
<p>install bind94<br />
NS1#<strong>cd /usr/ports/dns/bind94</strong><br />
NS1#<strong>make install clean</strong></p>
<p><strong>cd /etc/named<br />
ee named.conf</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;-begin&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong>options {<br />
        // Relative to the chroot directory, if any<br />
        directory               &#8220;/etc/namedb&#8221;;<br />
        pid-file                &#8220;/var/run/named/pid&#8221;;<br />
        dump-file               &#8220;/var/dump/named_dump.db&#8221;;<br />
        statistics-file         &#8220;/var/stats/named.stats&#8221;;<br />
        allow-recursion         { any; }; &#8212;&#8212;&#8212;&#8212;&#8212;-> add this line euy<br />
        allow-query             { any; }; &#8212;&#8212;&#8212;&#8212;&#8212;-> add this line euy<br />
        allow-query-cache       { any; }; &#8212;&#8212;&#8212;&#8212;&#8212;-> add this line euy<br />
        listen-on               { any; }; &#8212;&#8212;&#8212;&#8212;&#8212;-> add this line euy<br />
</strong><br />
&#8212;&#8212;&#8212;-edit this line&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; </p>
<p>    <strong>forward only; &#8212;&#8212;&#8211;> use this</p>
<p> //       forwarders {     &#8212;&#8212;&#8212;&#8212;&#8212;-> disable this line<br />
 //               127.0.0.1;  &#8212;&#8212;&#8212;&#8212;&#8212;-> disable this line</p>
<p>        };<br />
</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;close here&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>and also delete unnecesary configuration or example config<br />
<span id="more-105"></span><br />
move named.root original<br />
NS1#<strong>mv named.root named.root.asli<br />
</strong><br />
download new named.root<br />
NS1#<strong>wget  ftp://internic.net/domain/named.root</strong><br />
if you cant download it, you can create manually your named.root from http://internic.net/domain/named.root</p>
<p>make file for zona localhost<br />
NS1#<strong>sh make-localhost</strong></p>
<p>edit file zona localhost<br />
NS1#<strong>pwd</strong><br />
/usr/named/<br />
NS1#<strong>cd master</strong></p>
<p>NS1#<strong>ee localhost.rev</strong><br />
#&#8212;&#8212;&#8212;&#8212;&#8212;-begin&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>$TTL    3600</p>
<p>@       IN      SOA             localhost.     localhost.  (<br />
                                20070303        ; Serial<br />
                                3600    ; Refresh<br />
                                900     ; Retry<br />
                                3600000 ; Expire<br />
                                3600 )  ; Minimum<br />
        IN      NS      localhost.<br />
1       IN      PTR     localhost.<br />
</strong><br />
#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end of file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>save the file.</p>
<p>make a zone for localhost</p>
<p>for the zone, we can copy file from localhost.rev to db.localhost then edit,<br />
NS1#<strong>cp localhost.rev db.localhost</strong><br />
NS1#<strong>ee db.localhost</strong></p>
<p>#&#8212;&#8212;&#8212;&#8212;&#8212;-begin&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>$TTL    3600</p>
<p>@       IN      SOA             localhost.     root.localhost.  (<br />
                                20070303        ; Serial<br />
                                3600    ; Refresh<br />
                                900     ; Retry<br />
                                3600000 ; Expire<br />
                                3600 )  ; Minimum<br />
        IN      NS      localhost.<br />
        IN      A       127.0.0.1</strong><br />
#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end of file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>save the zone, and continue with the next step.</p>
<p>now, put localhost zone into named.conf</p>
<p>NS1#<strong>cd /etc/namedb</strong><br />
NS1#<strong>ee named.conf</strong></p>
<p>add this line<br />
##&#8212;&#8212;&#8212;-begin&#8212;&#8212;&#8212;&#8212;-<br />
<strong>zone &#8220;localhost&#8221; IN {</p>
<p>type master;</p>
<p>file &#8220;master/db.localhost&#8221;;</p>
<p>};</strong><br />
##&#8212;&#8212;&#8212;&#8212;-stop&#8212;&#8212;&#8212;&#8211;</p>
<p>save the file.</p>
<p>***make an rndc.conf file</p>
<p>for the next step, makes an rndc.conf file by using rndc-confgen.<br />
the result always different with yours.<br />
NS1#<strong>rndc-confgen</strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;begin file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong># start of rndc.conf</p>
<p>key â€œrndc-keyâ€ {</p>
<p>algorithm hmac-md5;</p>
<p>secret â€œ68p7glMULOP2NWn9oBOPSg= =â€;</p>
<p>};</p>
<p>options {</p>
<p>default-key â€œrndc-keyâ€;</p>
<p>default-server 127.0.0.1;</p>
<p>default-port 953;</p>
<p>};</p>
<p># end of rndc.conf</p>
<p># key â€œrndc-keyâ€ {</p>
<p># algorithm hmac-md5;</p>
<p># secret â€œ68p7glMULOP2NWn9oBOPSg= =â€;</p>
<p># };</p>
<p>#</p>
<p># controls {</p>
<p># inet 127.0.0.1 port 953</p>
<p># allow { 127.0.0.1; } keys { â€œrndc-keyâ€; };</p>
<p># };<br />
</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end of file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>create your rndc.conf<br />
NS1#<strong>ee rndc.conf</strong><br />
and put this line ( from rndc-confgen)</p>
<p>k<strong>ey â€œrndc-keyâ€ {</p>
<p>algorithm hmac-md5;</p>
<p>secret â€œ68p7glMULOP2NWn9oBOPSg= =â€;</p>
<p>};</p>
<p>options {</p>
<p>default-key â€œrndc-keyâ€;</p>
<p>default-server 127.0.0.1;</p>
<p>default-port 953;</p>
<p>};<br />
</strong><br />
now, lets edit named.conf<br />
NS1#<strong>ee named.conf</strong><br />
and put this line ( from rndc-confgen)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;begin file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>key â€œrndc-keyâ€ {</p>
<p>algorithm hmac-md5;</p>
<p>secret â€œ68p7glMULOP2NWn9oBOPSg= =â€;</p>
<p>};</p>
<p>controls {</p>
<p>inet 127.0.0.1 port 953</p>
<p>allow { 127.0.0.1; } keys { â€œrndc-keyâ€; };<br />
};<br />
</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end of file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
then, save the file and run the BIND.<br />
NS1# <strong>/usr/local/bin/named </strong><br />
or<br />
NS1# <strong>/usr/sbin/named</strong><br />
(depends named location)</p>
<p>check the application already running or not,<br />
NS1# <strong>ps ax | grep named</strong><br />
  490  ??  Ss    15:21.76 named<br />
64091  p0  R+     0:00.00 grep named</p>
<p>oke sip. its running.<br />
now, lets edit our dns IP in our server,<br />
NS1#<strong>ee /etc/resolv.conf</strong></p>
<p><strong>nameserver 127.0.0.1</strong></p>
<p>save it.<br />
now, lets test it.<br />
NS1# <strong>host localhost</strong><br />
localhost has address 127.0.0.1</p>
<p>NS1#<strong>host 127.0.0.1</strong><br />
1.0.0.127.in-addr.arpa domain name pointer localhost</p>
<p>sip. our DNS already running well.</p>
<p><strong><br />
2. MAKES zONE DOMAIN<br />
</strong><br />
for example, we have a domain using bohongan.net, and delegated to our dns, so we should do this step:</p>
<p>NS1#<strong>ee named.conf</strong><br />
add this line</p>
<p>    z<strong>one &#8220;bohongan.net&#8221; {<br />
    type master;<br />
    file &#8220;master/db.bohongan&#8221;;<br />
    };</strong></p>
<p>now makes file db.bohongan</p>
<p>NS1#<strong>ee master/db.bohongan</strong></p>
<p>#&#8212;&#8212;&#8212;&#8212;&#8212;-begin&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>$TTL    3600</p>
<p>@       IN      SOA             ns1.bohongan.net.     admin.bohongan.net.  (<br />
                                20070303        ; Serial<br />
                                3600    ; Refresh<br />
                                900     ; Retry<br />
                                3600000 ; Expire<br />
                                3600 )  ; Minimum<br />
        IN      NS      ns1.bohongan.net.<br />
        IN      NS      ns2.bohongan.net.<br />
        IN      MX      10 mail.bohongan.net.<br />
        IN      A       123.567.89.1  &#8212;&#8212;&#8212;&#8212;&#8212;> fill with your IP<br />
ns1     IN      A       123.567.89.1  &#8212;&#8212;&#8212;&#8212;&#8212;> fill with your IP<br />
mail    IN      A       123.567.89.1<br />
www     IN      A       123.567.89.1<br />
</strong>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-end of file&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>save and restart our DNS</p>
<p>NS1#<strong>rndc reload</strong></p>
<p>Test domain</p>
<p># <strong>dig -t ns bohongan.net</strong></p>
<p>; <<>> DiG 9.3.0 <<>> -t ns bohongan.net<br />
;; global options: printcmd<br />
;; Got answer:<br />
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38978<br />
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0</p>
<p>;; QUESTION SECTION:<br />
;bohongan.net. IN NS</p>
<p>;; ANSWER SECTION:<br />
bohongan.net. 3269 IN NS ns2.bohongan.net.<br />
bohongan.net. 3269 IN NS ns1.bohongan.net.</p>
<p>;; Query time: 16 msec<br />
;; SERVER: 202.134.0.155#53(202.134.0.155)<br />
;; WHEN: Fri Aug 11 21:22:23 2006<br />
;; MSG SIZE rcvd: 79</p>
<p>if show this, its mean our domain already resolve and running. so internet already known it.</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=105</wfw:commentRss>
		</item>
		<item>
		<title>Tips and trick FreeBSD</title>
		<link>http://www.bimo.web.id/wp/?p=104</link>
		<comments>http://www.bimo.web.id/wp/?p=104#comments</comments>
		<pubDate>Wed, 21 Jan 2009 19:08:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=104</guid>
		<description><![CDATA[Here are some tips for freebsd users.. 
Having trouble using fetch through a firewall? Try setting the environment
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.
%
By pressing &#8220;Scroll Lock&#8221; you can use the arrow keys to scroll backward
through the console output.  Press &#8220;Scroll Lock&#8221; again to turn it off.
%
Want colour in your directory [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some tips for freebsd users.. </p>
<p>Having trouble using fetch through a firewall? Try setting the environment<br />
variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details.<br />
%<br />
By pressing &#8220;Scroll Lock&#8221; you can use the arrow keys to scroll backward<br />
through the console output.  Press &#8220;Scroll Lock&#8221; again to turn it off.<br />
%<br />
Want colour in your directory listings?  Use &#8220;ls -G&#8221;.  &#8220;ls -F&#8221; is also useful,<br />
and they can be combined as &#8220;ls -FG&#8221;.<br />
%<br />
If you need to ask a question on the FreeBSD-questions mailing list then</p>
<p>http://www.freebsd.org/doc/en_US.ISO8859-1/articles/<br />
freebsd-questions/index.html</p>
<p>contains lots of useful advice to help you get the best results.<br />
%<br />
If you&#8217;d like to keep track of applications in the FreeBSD ports tree, take a<br />
look at FreshPorts;</p>
<p>http://www.freshports.org/<br />
%<br />
To search for files that match a particular name, use find(1); for example</p>
<p>find / -name &#8220;*GENERIC*&#8221; -ls</p>
<p>will search &#8216;/&#8217;, and all subdirectories, for files with &#8216;GENERIC&#8217; in the name.<br />
&#8211;  Stephen Hilton<br />
%<br />
In tcsh, you can `set autolist&#8217; to have the shell automatically show<br />
all the possible matches when doing filename/directory expansion.<br />
%<br />
You can `set autologout = 30&#8242; to have tcsh log you off automatically<br />
if you leave the shell idle for more than 30 minutes.<br />
%<br />
If you `set filec&#8217; (file completion) in tcsh and write a part of the<br />
filename, pressing TAB will show you the available choices when there<br />
is more than one, or complete the filename if there&#8217;s only one match.<br />
%<br />
You can press up-arrow or down-arrow to walk through a list of<br />
previous commands in tcsh.<br />
%<br />
You can disable tcsh&#8217;s terminal beep if you `set nobeep&#8217;.<br />
%<br />
If you `set watch = (0 any any)&#8217; in tcsh, you will be notified when<br />
someone logs in or out of your system.<br />
<span id="more-104"></span><br />
%<br />
Nice tcsh prompt: set prompt = &#8216;%m %# &#8216;<br />
%<br />
Nice tcsh prompt: set prompt = &#8216;%n@%m%# &#8216;<br />
%<br />
Nice tcsh prompt: set prompt = &#8216;%n@%m:%~%# &#8216;<br />
%<br />
Nice tcsh prompt: set prompt = &#8216;%n@%m:%/%# &#8216;<br />
%<br />
Nice tcsh prompt: set prompt = &#8216;[%B%m%b] %B%~%b%# &#8216;<br />
%<br />
Simple tcsh prompt: set prompt = &#8216;%# &#8216;<br />
%<br />
If you want df(1) and other commands to display disk sizes in<br />
kilobytes instead of 512-byte blocks, set BLOCKSIZE in your<br />
environment to &#8216;K&#8217;.  You can also use &#8216;M&#8217; for Megabytes or &#8216;G&#8217; for<br />
Gigabytes.  If you want df(1) to automatically select the best size<br />
then use &#8216;df -h&#8217;.<br />
%<br />
To change an environment variable in tcsh you use: setenv NAME &#8220;value&#8221;<br />
where NAME is the name of the variable and &#8220;value&#8221; its new value.<br />
%<br />
To change an environment variable in /bin/sh use:</p>
<p>$ VARIABLE=&#8221;value&#8221;<br />
$ export VARIABLE<br />
%<br />
You can use /etc/make.conf to control the options used to compile software<br />
on this system.  Example entries are in<br />
/usr/share/examples/etc/defaults/make.conf.<br />
%<br />
To do a fast search for a file, try</p>
<p>locate filename</p>
<p>locate uses a database that is updated every Saturday (assuming your computer<br />
is running FreeBSD at the time) to quickly find files based on name only.<br />
%<br />
In order to search for a string in some files, use &#8216;grep&#8217; like this:</p>
<p>grep &#8220;string&#8221; filename1 [filename2 filename3 ...]</p>
<p>This will print out the lines in the files that contain the string.  grep can<br />
also do a lot more advanced searches - type &#8216;man grep&#8217; for details.<br />
%<br />
You can use the &#8216;fetch&#8217; command to retrieve files over ftp or http.</p>
<p>fetch http://www.freebsd.org/index.html</p>
<p>will download the front page of the FreeBSD web site.<br />
%<br />
In order to make fetch (the FreeBSD downloading tool) ask for<br />
username/password when it encounters a password-protected web page, you can set<br />
the environment variable HTTP_AUTH to &#8216;basic:*&#8217;.<br />
%<br />
You can permanently set environment variables for your shell by putting them<br />
in a startup file for the shell.  The name of the startup file varies<br />
depending on the shell - csh and tcsh uses .login, bash, sh, ksh and zsh use<br />
.profile.  When using bash, sh, ksh or zsh, don&#8217;t forget to export the<br />
variable.<br />
%<br />
If you are running xterm, the default TERM variable will be &#8216;xterm&#8217;.  If you<br />
set this environment variable to &#8216;xterm-color&#8217; instead, a lot of programs will<br />
use colors.  You can do this by</p>
<p>TERM=xterm-color; export TERM</p>
<p>in Bourne-derived shells, and</p>
<p>setenv TERM xterm-color</p>
<p>in csh-derived shells.<br />
%<br />
If you do not want to get beeps in X11 (X Windows), you can turn them off with</p>
<p>xset b off<br />
%<br />
You can look through a file in a nice text-based interface by typing</p>
<p>less filename<br />
%<br />
The default editor in FreeBSD is vi, which is efficient to use when you have<br />
learned it, but somewhat user-unfriendly.  To use ee (an easier but less<br />
powerful editor) instead, set the environment variable EDITOR to /usr/bin/ee<br />
%<br />
If you accidentally end up inside vi, you can quit it by pressing Escape, colon<br />
(:), q (q), bang (!) and pressing return.<br />
%<br />
You can use aliases to decrease the amount of typing you need to do to get<br />
commands you commonly use.  Examples of fairly popular aliases include (in<br />
Bourne shell style, as in /bin/sh, bash, ksh, and zsh):</p>
<p>alias lf=&#8221;ls -FA&#8221;<br />
alias ll=&#8221;ls -lA&#8221;<br />
alias su=&#8221;su -m&#8221;</p>
<p>In csh or tcsh, these would be</p>
<p>alias lf ls -FA<br />
alias ll ls -lA<br />
alias su su -m</p>
<p>To remove an alias, you can usually use &#8216;unalias aliasname&#8217;.  To list all<br />
aliases, you can usually type just &#8216;alias&#8217;.<br />
%<br />
In order to support national characters for European languages in tools like<br />
less without creating other nationalisation aspects, set the environment<br />
variable LC_ALL to &#8216;en_US.ISO8859-1&#8242;.<br />
%<br />
You can search for documentation on a keyword by typing</p>
<p>apropos keyword<br />
%<br />
Man pages are divided into section depending on topic.  There are 9 different<br />
sections numbered from 1 (General Commands) to 9 (Kernel Developer&#8217;s Manual).<br />
You can get an introduction to each topic by typing</p>
<p>man  intro</p>
<p>In other words, to get the intro to general commands, type</p>
<p>man 1 intro<br />
%<br />
FreeBSD is started up by the program &#8216;init&#8217;.  The first thing init does when<br />
starting multiuser mode (ie, starting the computer up for normal use) is to<br />
run the shell script /etc/rc.  By reading /etc/rc, you can learn a lot about<br />
how the system is put together, which again will make you more confident about<br />
what happens when you do something with it.<br />
%<br />
If you want to play CDs with FreeBSD, a utility for this is already included.<br />
Type &#8216;cdcontrol&#8217; then &#8216;help&#8217; to learn more.  (You may need to set the CDROM<br />
environment variable in order to make cdcontrol want to start.)<br />
%<br />
If you have a CD-ROM drive in your machine, you can make the CD-ROM that is<br />
presently inserted available by typing &#8216;mount /cdrom&#8217; as root.   The CD-ROM<br />
will be available under /cdrom/.  Remember to do &#8216;umount /cdrom&#8217; before<br />
removing the CD-ROM (it will usually not be possible to remove the CD-ROM<br />
without doing this.)</p>
<p>Note: This tip may not work in all configurations.<br />
%<br />
You can install extra packages for FreeBSD by using the ports system.<br />
If you have installed it, you can download, compile, and install software by<br />
just typing</p>
<p># cd /usr/ports//<br />
# make install &#038;&#038; make clean</p>
<p>as root.   The ports infrastructure will download the software, change it so<br />
it works on FreeBSD, compile it, install it, register the installation so it<br />
will be possible to automatically uninstall it, and clean out the temporary<br />
working space it used.  You can remove an installed port you decide you do not<br />
want after all by typing</p>
<p># cd /usr/ports//<br />
# make deinstall</p>
<p>as root.<br />
%<br />
Nice bash prompt: PS1=&#8217;([$(tput md)]t <w>[$(tput me)]) $(echo $?) $ &#8216;<br />
&#8211; Mathieu<br />
%<br />
To see the output from when your computer started, run dmesg(8).  If it has<br />
been replaced with other messages, look at /var/run/dmesg.boot.<br />
&#8211; Francisco Reyes<br />
%<br />
You can use &#8220;whereis&#8221; to locate standard binary, manual page and source<br />
directories for the specified programs. This can be particularly handy<br />
when you are trying to find where in the ports tree an application is.</p>
<p>Try &#8220;whereis netscape&#8221; and &#8220;whereis whereis&#8221;.<br />
&#8211; Konstantinos Konstantinidis<br />
%<br />
You can press Ctrl-D to quickly exit from a shell, or logout from a<br />
login shell.<br />
&#8211; Konstantinos Konstantinidis<br />
%<br />
You can use &#8220;pkg_info&#8221; to see a list of packages you have installed.<br />
&#8211; Konstantinos Konstantinidis<br />
%<br />
You can change the video mode on all consoles by adding something like<br />
the following to /etc/rc.conf:</p>
<p>allscreens=&#8221;80&#215;30&#8243;</p>
<p>You can use &#8220;vidcontrol -i mode | grep T&#8221; for a list of supported text<br />
modes.<br />
&#8211; Konstantinos Konstantinidis<br />
%<br />
Any user that is a member of the wheel group can use &#8220;su -&#8221; to simulate<br />
a root login. You can add a user to the wheel group by editing /etc/group.<br />
&#8211; Konstantinos Konstantinidis<br />
%<br />
Over quota?  &#8220;du -s * | sort -n &#8221; will give you a sorted list of your<br />
directory sizes.<br />
&#8211; David Scheidt<br />
%<br />
Handy bash(1) prompt:   PS1=&#8221;u@h w !$ &#8221;<br />
&#8211; David Scheidt<br />
%<br />
Ever wonder what those numbers after command names were, as in cat(1)?  It&#8217;s<br />
the section of the manual the man page is in.  &#8220;man man&#8221; will tell you more.<br />
&#8211; David Scheidt<br />
%<br />
&#8220;man hier&#8221; will explain the way FreeBSD filesystems are normally laid out.<br />
&#8211; David Scheidt<br />
%<br />
&#8220;man tuning&#8221; gives some tips how to tune performance of your FreeBSD system.<br />
&#8211; David Scheidt<br />
%<br />
&#8220;man firewall&#8221; will give advice for building a FreeBSD firewall<br />
&#8211; David Scheidt<br />
%<br />
You can often get answers to your questions about FreeBSD by searching in the<br />
FreeBSD mailing list archives at</p>
<p>http://www.freebsd.org/search.html<br />
%<br />
You can adjust the volume of various parts of the sound system in your<br />
computer by typing &#8216;mixer  &#8216;.  To get a list of what you can<br />
adjust, just type &#8216;mixer&#8217;.<br />
%<br />
You can automatically download and install binary packages by doing</p>
<p>pkg_add -r </p>
<p>where you replace  with the URL to the package.  This will also<br />
automatically install the packages the package you download is dependent on<br />
(ie, the packages it needs in order to work.)<br />
%<br />
You can get a good standard workstation install by using the<br />
instant-workstation port/package.  If you have ports installed, you can<br />
install it by doing</p>
<p># cd /usr/ports/misc/instant-workstation<br />
# make install &#038;&#038; make clean</p>
<p>as root.  This will install a collection of packages that is convenient to<br />
have on a workstation.<br />
%<br />
You can get a good generic server install by using the<br />
instant-server port/package.  If you have ports installed, you can<br />
install it by doing</p>
<p># cd /usr/ports/misc/instant-server<br />
# make install &#038;&#038; make clean</p>
<p>as root.  This will install a collection of packages that is appropriate for<br />
running a &#8220;generic&#8221; server.<br />
%<br />
You can make a log of your terminal session with script(1).<br />
%<br />
&#8220;man ports&#8221; gives many useful hints about installing FreeBSD ports.<br />
%<br />
&#8220;man security&#8221; gives very good advice on how to tune the security of your<br />
FreeBSD system.<br />
%<br />
Want to find a specific port, just type the following under /usr/ports,<br />
or one its subdirectories:</p>
<p>&#8220;make search name=&#8221;<br />
or<br />
&#8220;make search key=&#8221;<br />
%<br />
Want to see how much virtual memory you&#8217;re using? Just type &#8220;swapinfo&#8221; to<br />
be shown information about the usage of your swap partitions.<br />
%<br />
ports/net/netcat port is useful not only for redirecting input/output<br />
to TCP or UDP connections, but also for proxying them. See inetd(8) for<br />
details.<br />
%<br />
If other operating systems have damaged your Master Boot Record, you can<br />
reinstall it either with /stand/sysinstall or with boot0cfg(8). See<br />
&#8220;man boot0cfg&#8221; for details.<br />
%<br />
Need to see the calendar for this month? Simply type &#8220;cal&#8221;.  To see the<br />
whole year, type &#8220;cal -y&#8221;.<br />
&#8211; Dru<br />
%<br />
Need to quickly return to your home directory? Type &#8220;cd&#8221;.<br />
&#8211; Dru<br />
%<br />
To see the last time that you logged in, use lastlogin(8).<br />
&#8211; Dru<br />
%<br />
To clear the screen, use &#8220;clear&#8221;. To re-display your screen buffer, press<br />
the scroll lock key and use your page up button. When you&#8217;re finished,<br />
press the scroll lock key again to get your prompt back.<br />
&#8211; Dru<br />
%<br />
To save disk space in your home directory, compress files you rarely<br />
use with &#8220;gzip filename&#8221;.<br />
&#8211; Dru<br />
%<br />
To read a compressed file without having to first uncompress it, use<br />
&#8220;zcat&#8221; or &#8220;zmore&#8221; to view it.<br />
&#8211; Dru<br />
%<br />
To see how much disk space is left on your partitions, use</p>
<p>df -h<br />
&#8211; Dru<br />
%<br />
To see the 10 largest files on a directory or partition, use</p>
<p>du /partition_or_directory_name | sort -rn | head<br />
&#8211; Dru<br />
%<br />
To determine whether a file is a text file, executable, or some other type<br />
of file, use</p>
<p>file filename<br />
&#8211; Dru<br />
%<br />
Time to change your password? Type &#8220;passwd&#8221; and follow the prompts.<br />
&#8211; Dru<br />
%<br />
Want to know how many words, lines, or bytes are contained in a file? Type<br />
&#8220;wc filename&#8221;.<br />
&#8211; Dru<br />
%<br />
Need to print a manpage? Use</p>
<p>man name_of_manpage | col -bx | lpr<br />
&#8211; Dru<br />
%<br />
Need to remove all those ^M characters from a DOS file? Try</p>
<p>tr -d<br />
 < dosfile > newfile<br />
&#8211; Originally by Dru<br />
%<br />
Forget what directory you are in? Type &#8220;pwd&#8221;.<br />
&#8211; Dru<br />
%<br />
If you are in the C shell and have just installed a new program, you won&#8217;t<br />
be able to run it unless you first type &#8220;rehash&#8221;.<br />
&#8211; Dru<br />
%<br />
Need to leave your terminal for a few minutes and don&#8217;t want to logout?<br />
Use &#8220;lock -p&#8221;. When you return, use your password as the key to unlock the<br />
terminal.<br />
&#8211; Dru<br />
%<br />
Need to find the location of a program? Use &#8220;locate program_name&#8221;.<br />
&#8211; Dru<br />
%<br />
Forget how to spell a word or a variation of a word? Use</p>
<p>look portion_of_word_you_know<br />
&#8211; Dru<br />
%<br />
To see the last 10 lines of a long file, use &#8220;tail filename&#8221;. To see the<br />
first 10 lines, use &#8220;head filename&#8221;.<br />
&#8211; Dru<br />
%<br />
To see how long it takes a command to run, type the word &#8220;time&#8221; before the<br />
command name.<br />
&#8211; Dru<br />
%<br />
To quickly create an empty file, use &#8220;touch filename&#8221;.<br />
&#8211; Dru<br />
%<br />
To find out the hostname associated with an IP address, use</p>
<p>dig -x IP_address<br />
&#8211; Dru<br />
%<br />
If you use the C shell, add the following line to the .cshrc file in your<br />
home directory to prevent core files from being written to disk:</p>
<p>limit coredumpsize 0<br />
&#8211; Dru<br />
%<br />
If you need a reminder to leave your terminal, type &#8220;leave +hhmm&#8221; where<br />
&#8220;hhmm&#8221; represents in how many hours and minutes you need to leave.<br />
&#8211; Dru<br />
%<br />
Need to do a search in a manpage or in a file you&#8217;ve sent to a pager? Use<br />
&#8220;/search_word&#8221;. To repeat the same search, type &#8220;n&#8221; for next.<br />
&#8211; Dru<br />
%<br />
Forget when Easter is? Try &#8220;ncal -e&#8221;. If you need the date for Orthodox<br />
Easter, use &#8220;ncal -o&#8221; instead.<br />
&#8211; Dru<br />
%<br />
Need to see your routing table? Type &#8220;netstat -rn&#8221;. The entry with the G<br />
flag is your gateway.<br />
&#8211; Dru<br />
%<br />
Need to see which daemons are listening for connection requests? Use<br />
&#8220;sockstat -4l&#8221; for IPv4, and &#8220;sockstat -l&#8221; for IPv4 and IPv6.<br />
&#8211; Dru<br />
%<br />
Can&#8217;t remember if you&#8217;ve installed a certain port or not? Try &#8220;pkg_info<br />
-Ix port_name&#8221;.<br />
%<br />
To erase a line you&#8217;ve written at the command prompt, use &#8220;Ctrl-U&#8221;.<br />
&#8211; Dru<br />
%<br />
To repeat the last command in the C shell, type &#8220;!!&#8221;.<br />
&#8211; Dru<br />
%<br />
Need to quickly empty a file? Use &#8220;: > filename&#8221;.<br />
&#8211; Dru<br />
%<br />
To see all of the directories on your FreeBSD system, type</p>
<p>ls -R / | more<br />
&#8211; Dru<br />
%<br />
To see the IP addresses currently set on your active interfaces, type<br />
&#8220;ifconfig -u&#8221;.<br />
&#8211; Dru<br />
%<br />
To see the MAC addresses of the NICs on your system, type</p>
<p>ifconfig -a<br />
&#8211; Dru<br />
%<br />
You can open up a new split-screen window in (n)vi with :N or :E and then<br />
use ^w to switch between the two.<br />
%<br />
sh (the default Bourne shell in FreeBSD) supports command-line editing.  Just<br />
&#8220;set -o emacs&#8221; or &#8220;set -o vi&#8221; to enable it.<br />
%<br />
When you&#8217;ve made modifications to a file in vi(1) and then find that<br />
you can&#8217;t write it, type &#8220;!rm -f %&#8221; then &#8220;:w!&#8221; to force the<br />
write</p>
<p>This won&#8217;t work if you don&#8217;t have write permissions to the directory<br />
and probably won&#8217;t be suitable if you&#8217;re editing through a symbolic link.<br />
%<br />
If you want to quickly check for duplicate package/port installations,<br />
try the following pkg_info command.</p>
<p>pkg_info | sort | sed -e &#8217;s/-[0-9].*$//&#8217; |<br />
uniq -c | grep -v &#8216;^[[:space:]]*1&#8242;<br />
%<br />
Want to use sed(1) to edit a file in place?  Well, to replace every &#8216;e&#8217; with<br />
an &#8216;o&#8217;, in a file named &#8216;foo&#8217;, you can do:</p>
<p>sed -i.bak s/e/o/g foo</p>
<p>And you&#8217;ll get a backup of the original in a file named &#8216;foo.bak&#8217;, but if you<br />
want no backup:</p>
<p>sed -i &#8221; s/e/o/g foo<br />
%<br />
To obtain a neat PostScript rendering of a manual page, use &#8220;-t&#8221; switch<br />
of the man(1) utility: &#8220;man -t &#8221;.  For example:</p>
<p>man -t grep > grep.ps   # Save the PostScript version to a file<br />
or<br />
man -t printf | lp      # Send the PostScript directly to printer</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=104</wfw:commentRss>
		</item>
		<item>
		<title>Downgrade port in freebsd</title>
		<link>http://www.bimo.web.id/wp/?p=103</link>
		<comments>http://www.bimo.web.id/wp/?p=103#comments</comments>
		<pubDate>Sun, 21 Dec 2008 19:36:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=103</guid>
		<description><![CDATA[Problem: I already upgrade my phpmyadmin (phpmyadmin  V.3.xx) but cant read mysql because my mysql still the older version (mysql version 4.xx). so its make difficult for my client when upload his/her databases. Because they ussually use phpmyadmin for upload it. so today i must downgrade my phpmyadmin to older version. its not difficult [...]]]></description>
			<content:encoded><![CDATA[<p>Problem: I already upgrade my phpmyadmin (phpmyadmin  V.3.xx) but cant read mysql because my mysql still the older version (mysql version 4.xx). so its make difficult for my client when upload his/her databases. Because they ussually use phpmyadmin for upload it. so today i must downgrade my phpmyadmin to older version. its not difficult but its not easy also. its just tricky. here I explain step by step downgrading phpmyadmin in freebsd,</p>
<p>install portdowngrade first,<br />
webserver# cd /usr/ports/ports-mgmt/portdowngrade<br />
webserver# make install clean<br />
<span id="more-103"></span><br />
now, lets downgrade our phpmyadmin,<br />
webserver#  /usr/local/sbin/portdowngrade phpmyadmin -s:pserver:anoncvs@anoncvs.tw.FreeBSD.org:/home/ncvs</p>
<p><em>portdowngrade 0.6 by Heiner Eichmann<br />
Please note, that nothing is changed in the ports tree<br />
unless it is explicitly permitted in step 6!</p>
<p>Seeking port phpmyadmin &#8230;</p>
<p>Found several matches:<br />
1: databases/phpmyadmin<br />
2: databases/phpmyadmin211</p>
<p>Please choose one</em>: &#8212;&#8212;-> i choose 1</p>
<p>then follow the instruction</p>
<p>note:<strong> -s:pserver:anoncvs@anoncvs.tw.FreeBSD.org:/home/ncvs</strong> is the specific server, you can choose any server you like.</p>
<p>after finish downgrading, its time to uninstall your existing phpmyadmin.<br />
webserver# cd /usr/ports/databases/phpmyadmin<br />
webserver# make deinstall</p>
<p>now lets install your phpmyadmin<br />
webserver# make install clean</p>
<p><em>=> phpmyadmin &#8212; cross-site scripting vulnerability.<br />
   Reference: <http://www.FreeBSD.org/ports/portaudit/51b51d4a-7c0f-11dc-9e47-0011d861d5e2.html><br />
=> Please update your ports tree and try again.<br />
*** Error code 1</p>
<p>Stop in /usr/ports/databases/phpmyadmin.<br />
*** Error code 1</p>
<p>Stop in /usr/ports/databases/phpmyadmin.<br />
</em><br />
if you find that error, dont worry because freebsd told us that our application has vurnelability.( because our phpmyadmin is the older version right?)</p>
<p>we can use -DDISABLE_VULNERABILITIES to ignore the vurnelability, here should we do:</p>
<p>webserver# make install clean -DDISABLE_VULNERABILITIES</p>
<p>now lets check your phpmyadmin, its back to older version right?<br />
but you must know the risk if you downgrade any application, beware of the vurnelability.<br />
its not recommended at all , but if must to do, why not?</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=103</wfw:commentRss>
		</item>
		<item>
		<title>How to add user and database in mysql</title>
		<link>http://www.bimo.web.id/wp/?p=102</link>
		<comments>http://www.bimo.web.id/wp/?p=102#comments</comments>
		<pubDate>Thu, 11 Dec 2008 16:05:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=102</guid>
		<description><![CDATA[from now, i must add user and database manually in mysql server. Before, i ussualy use phpmyadmin for add it. And today, i want to write down step by step adding user and databases in mysql manually (textmode, not using phpmyadmin or any interface). 
Lets begin, Bismillahirrohmanirrohim&#8230;.
i assume you already have root login.
dbserver#mysql -u root [...]]]></description>
			<content:encoded><![CDATA[<p>from now, i must add user and database manually in <a href="http://www.mysql.com/ ">mysql</a> server. Before, i ussualy use <a href="http://www.phpmyadmin.net">phpmyadmin</a> for add it. And today, i want to write down step by step adding user and databases in <a href="http://www.mysql.com/ ">mysql</a> manually (textmode, not using <a href="http://www.phpmyadmin.net">phpmyadmin</a> or any interface). </p>
<p>Lets begin, Bismillahirrohmanirrohim&#8230;.</p>
<p>i assume you already have root login.<br />
dbserver#mysql -u root -p<br />
Enter password: &#8212;&#8212;&#8212;&#8212;-> put your root password here<br />
<span id="more-102"></span><br />
mysql>show databases;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Database |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| information_schema |<br />
| mysql |<br />
| test |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
3 rows in set (0.00 sec)</p>
<p>mysql> create database coba;<br />
mysql> grant all on coba.* to root;<br />
mysql> grant all on coba.* to root@localhost;<br />
mysql> grant all on coba.* to cobauser;<br />
mysql> grant all on coba.* to cobauser@localhost;<br />
mysql> set password for cobauser@localhost=password(&#8217;pwdusercoba&#8217;);<br />
mysql> quit</p>
<p>Now, lets upload your sql table to your databases . you must dump your sql table first ( iam not explain how to dump it in here). And upload to your directory.</p>
<p>make sure your sql-dump-file already upload to your directory.<br />
dbserver# cd /home/youruser/<br />
dbserver# ls<br />
sqlname.sql   &#8212;&#8212;> its your sql-dump-file</p>
<p>put your .sql to database,<br />
dbserver# mysql -u root -p coba < sqlname.sql<br />
password:<br />
dbserver#</p>
<p>lets check,<br />
dbserver#mysql -u root -p<br />
Enter password:</p>
<p>mysql> show databases;<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| Database |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
| information_schema |<br />
| coba |<br />
| mysql |<br />
| test |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
4 rows in set (0.00 sec)</p>
<p>mysql> use coba;<br />
mysql> show table;<br />
blabla bla&#8230;..<br />
( it must be show your table here)</p>
<p>mysql> quit</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=102</wfw:commentRss>
		</item>
		<item>
		<title>Centralize online shopping</title>
		<link>http://www.bimo.web.id/wp/?p=101</link>
		<comments>http://www.bimo.web.id/wp/?p=101#comments</comments>
		<pubDate>Thu, 11 Dec 2008 03:06:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Umum]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=101</guid>
		<description><![CDATA[As we know, by Internet we can find anything include shopping. unbelievable right? but you should believe me because i found GREAT SITE to make easier your shopping.
Especially for gamers, you can find any kind video game in SHOPWIKI.Since the site launch, so many gamers from around the world join in shopwiki. Until now, Shopwiki [...]]]></description>
			<content:encoded><![CDATA[<p>As we know, by Internet we can find anything include shopping. unbelievable right? but you should believe me because i found <a href="http://www.shopwiki.com">GREAT SITE</a> to make easier your shopping.<br />
Especially for gamers, you can find any kind video game in <a href="http://www.shopwiki.com/wiki/Video+Games">SHOPWIKI</a>.Since the site launch, so many gamers from around the world join in <a href="http://www.shopwiki.com/wiki/Video+Games">shopwiki</a>. Until now, <a href="http://www.shopwiki.com/wiki/Video+Games">Shopwiki</a>  is recomended by gamers around the world to find everything about video game.<br />
Everything new about Game, available in <a href="http://www.shopwiki.com/wiki/Video+Games">shopwiki</a>.<br />
In <a href="http://www.shopwiki.com">shopwiki</a> we not only find any games, but everything you need are available here.  food, automotive, gadget, computer freak, wedding, pets are available here. so easy right? by visiting <a href="http://www.shopwiki.com/">shopwiki</a>, we can buy anything we need.You dont believe me? pleae check by yourself, visit <a href="http://www.shopwiki.com/">www.shopwiki.com</a>.</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=101</wfw:commentRss>
		</item>
		<item>
		<title>Upgrade and update web server aplication</title>
		<link>http://www.bimo.web.id/wp/?p=100</link>
		<comments>http://www.bimo.web.id/wp/?p=100#comments</comments>
		<pubDate>Sun, 30 Nov 2008 15:49:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.bimo.web.id/wp/?p=100</guid>
		<description><![CDATA[Few days ago, i was update my web server (using freeBSD 6.2) for security reason. Almost all aplication in this server finish for upgrading now, except mysql. I am not upgrade it because mysql not install from port collection. I install manual from source. so i still use my old mysql now. I will upgrade [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago, i was update my web server (using freeBSD 6.2) for security reason. Almost all aplication in this server finish for upgrading now, except mysql. I am not upgrade it because mysql not install from port collection. I install manual from source. so i still use my old mysql now. I will upgrade it later.I am afraid all database broken and all sites in web server down. Because i am not upgrade on site but remote. I am so far away with my server.<br />
oke lets write down step by step for upgrading. ( i hope its usefull for me and everyone)</p>
<p>Bismillahirahmanirohim&#8230;..</p>
<p>webserper# uname -a<br />
FreeBSD ns1.pagongxx.xxx 6.2-STABLE FreeBSD 6.2-STABLE #1: Mon Jun  2 21:23:05 WIT 2008     admin@ns1.pagongxx.xxx:/usr/src/sys/i386/compile/KERNEL1  i386</p>
<p>firstable, I must upgrate our port collection,</p>
<p>step by step upgrade port:<br />
webserper# portsnap fetch<br />
webserper# portsnap extract</p>
<p></u><span id="more-100"></span></p>
<p>now, lets check  installed aplication in our webserver.</p>
<p>webserper# pkg_version</p>
<p>apache                              <<br />
autoconf                            <<br />
autoconf                            <<br />
autoconf-wrapper                    =<br />
awstats                             <<br />
bandwidthd                          <<br />
bind9-base                          <<br />
chkrootkit                          <<br />
cvsup-without-gui                   <<br />
db41                                =<br />
php4-bz2                            <<br />
php4-calendar                       <<br />
php4-ctype                          <<br />
php4-ftp                            <<br />
php4-gd                             <<br />
php4-gettext                        <<br />
mrtg                                <<br />
mysql-client                        <<br />
net-snmp                            <<br />
nmap                                <<br />
phpmyadmin			    <</p>
<p>etc&#8230;</p>
<p> its mean, apache, php, mysql and other ( < ) need to upgrade, except autoconf-wrapper and db41( = ).</p>
<p>Now, lets check the vurnability,<br />
webserper# /usr/local/sbin/portaudit apache</p>
<p>if you want to check all aplication in your server, you can use this:<br />
webserper# /usr/local/sbin/portaudit â€“Fd</p>
<p>Oke, lets do upgrade those aplication.</p>
<p>webserver# /usr/local/sbin/portupgrade apache</p>
<p>webserver# /usr/local/sbin/portupgrade phpmyadmin</p>
<p>webserver# /usr/local/sbin/portupgrade chkrootkit</p>
<p>etc&#8230;</p>
<p>For upgrade php is little bit different because I want upgrade my php4 to php5, so here is the step ( its better to turn off your apache first)</p>
<p>webserper# apachectl stop</p>
<p>webserper# cd /usr/ports/lang/php5<br />
webserper# make config           (Note: make sure &#8216;Apache&#8217; is checked here)<br />
webserper# portupgrade -f -o lang/php5 php4-4.4.2_1</p>
<p>if u finish,  there should be a file /usr/local/etc/php.conf,<br />
that contains the following:</p>
<p>webserper# cat /usr/local/etc/php.conf<br />
   PHP_VER=5<br />
    PHP_VERSION=5.1.4<br />
    PHP_SAPI=cli cgi mod</p>
<p>Now check in your httpd.conf and check this line and make sure this line uncomment.</p>
<p>webserper# ee /usr/local/etc/apache22/httpd.conf</p>
<p>LoadModule php5_module        libexec/apache22/libphp5.so</p>
<p>run your apache:<br />
webserper# apachectl start</p>
<p>oke, web server already update now.<br />
Thank you all</p>
<!-- Created with WP-Autoblog (http://elliottback.com) -->]]></content:encoded>
			<wfw:commentRss>http://www.bimo.web.id/wp/?feed=rss2&amp;p=100</wfw:commentRss>
		</item>
	</channel>
</rss>

