<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7418033514329924180</id><updated>2024-09-01T18:57:24.486+05:45</updated><category term="Linux"/><category term="CentOS"/><category term="Mac"/><category term="UNIX"/><category term="FreeBSD"/><category term="Debian"/><category term="Gentoo"/><category term="MySQL"/><category term="Ubuntu"/><category term="DSA"/><category term="Firefox"/><category term="FreeRADIUS"/><category term="IM"/><category term="Jaber"/><category term="Joomala"/><category term="OpenSSH"/><category term="OpenSource"/><category term="PEM"/><category term="Perl"/><category term="RSA"/><category term="Windows"/><title type='text'>CS&#39;s IT Weblog</title><subtitle type='html'>How-To guides related to UNIX, Linux, Mac OS X, System Administration, Network Administration ...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.chatur.com.np/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-4823542339615744067</id><published>2011-01-14T12:05:00.000+05:45</published><updated>2011-01-14T12:22:55.417+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="DSA"/><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="Gentoo"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSSH"/><category scheme="http://www.blogger.com/atom/ns#" term="PEM"/><category scheme="http://www.blogger.com/atom/ns#" term="RSA"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Convert OpenSSH RSA or DSA key to PEM format</title><content type='html'>&lt;p&gt;RSA to PEM&lt;/p&gt;&lt;p&gt;First create an RSA key using OpenSSH tools:&lt;/p&gt;&lt;p&gt;$ ssh-keygen -t rsa&lt;/p&gt;&lt;p&gt;Then converted it to PEM format:&lt;/p&gt;&lt;p&gt;$ openssl rsa -in ~/.ssh/id_rsa -outform pem &amp;gt; id_rsa.pem&lt;/p&gt;&lt;p&gt;DSA to PEM&lt;/p&gt;&lt;p&gt;First create an DSA key using OpenSSH tools:&lt;/p&gt;&lt;p&gt;$ ssh-keygen -t dsa&lt;/p&gt;&lt;p&gt;Then converted it to PEM format:&lt;/p&gt;&lt;p&gt;$ openssl dsa -in ~/.ssh/id_dsa -outform pem &amp;gt; id_dsa.pem&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/4823542339615744067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2011/01/convert-openssh-rsa-key-to-pem-format.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/4823542339615744067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/4823542339615744067'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2011/01/convert-openssh-rsa-key-to-pem-format.html' title='Convert OpenSSH RSA or DSA key to PEM format'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-4556941709520435173</id><published>2009-12-21T17:54:00.000+05:45</published><updated>2010-01-27T17:40:41.101+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gentoo"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Update Gentoo Profile</title><content type='html'>There are 2 ways to upgrading Gentoo’s profile, which is whether by using the program eselect, or by manual linking.&lt;br /&gt;&lt;br /&gt;Firstly the portage tree need to be updated to get the latest profile list by running he following command;&lt;br /&gt;&lt;br /&gt;# emerge --sync&lt;br /&gt;The following example is to update using eselect;&lt;br /&gt;&lt;br /&gt;# eselect profile list&lt;br /&gt;# eselect profile set &amp;lt;number&amp;gt;&lt;br /&gt;where number is the number of favored profile from the list.&lt;br /&gt;&lt;br /&gt;To manually update the profile, simply delete the softlink and create a new link to the intended profile as the following (be sure not to add / at the end of /etc/make.profile)&lt;br /&gt;&lt;br /&gt;# rm /etc/make.profile&lt;br /&gt;# ln -s /usr/portage/profiles/&amp;lt;profile of choice&amp;gt; /etc/make.profile&lt;br /&gt;Optionally, in the end you might want to upgrade the system using the new profile;&lt;br /&gt;&lt;br /&gt;# emerge --sync&lt;br /&gt;# emerge --update --newuse --deep world&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/4556941709520435173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/12/update-gentoo-profile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/4556941709520435173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/4556941709520435173'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/12/update-gentoo-profile.html' title='Update Gentoo Profile'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-5562883692758134642</id><published>2009-11-12T17:01:00.000+05:45</published><updated>2009-11-12T17:54:52.240+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="IM"/><category scheme="http://www.blogger.com/atom/ns#" term="Jaber"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenSource"/><title type='text'>Jabber - an open source instant messaging</title><content type='html'>Jabber is an open instant messaging technology that anyone can use.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Jabber Server Setup on CentOS 5&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Configuring and Installing jabber server&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Install rpmforge repo&lt;br /&gt;&lt;br /&gt;rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;&lt;br /&gt;Install necessary packages&lt;br /&gt;&lt;br /&gt;yum -y install gcc-c++ vim-enhanced mysql-server mysql gcc mysql-devel libidn-devel make automake libtool tcpdump rsync crontabs vixie-cron php-mysql cyrus-sasl-devel expat-devel udns-devel&lt;br /&gt;&lt;br /&gt;Install gsasl&lt;br /&gt;&lt;br /&gt;cd /usr/src/&lt;br /&gt;wget ftp://alpha.gnu.org/pub/gnu/gsasl/libgsasl-0.2.29.tar.gz&lt;br /&gt;tar xvfz libgsasl-0.2.26.tar.gz &lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;br /&gt;Add gsasl library ‘/usr/local/lib’ to ld.so.conf&lt;br /&gt;&lt;br /&gt;echo &quot;/usr/local/lib&quot; &amp;gt;&amp;gt; /etc/ld.so.conf.d/usr-local-lib.conf&lt;br /&gt;ldconfig&lt;br /&gt;&lt;br /&gt;Create Jabber User and Group&lt;br /&gt;&lt;br /&gt;su&lt;br /&gt;useradd jabber&lt;br /&gt;passwd jabber&lt;br /&gt;&lt;br /&gt;Getting Jabber Server&lt;br /&gt;&lt;br /&gt;wget http://ftp.xiaoka.com/jabberd2/releases/jabberd-2.2.0.tar.bz2&lt;br /&gt;&lt;br /&gt;Uncompress sources&lt;br /&gt;&lt;br /&gt;tar xvfj jabberd-2.2.0.tar.bz2 &lt;br /&gt;&lt;br /&gt;Configure&lt;br /&gt;&lt;br /&gt;cd jabberd-2.2.0&lt;br /&gt;./configure --prefix=/opt/jabber --enable-mysql --enable-ssl --enable-ldap --with-sasl=gsasl --enable-debug&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;br /&gt;mysql -u root -p  &amp;lt; tools/db-setup.mysql&lt;br /&gt;mysql -u root -p&lt;br /&gt;GRANT select,insert,delete,update ON jabberd2.* to jabberd2 at localhost IDENTIFIED by &#39;jtest&#39;;&lt;br /&gt;&lt;br /&gt;Add Jabberd2 library to ld.so.conf&lt;br /&gt;&lt;br /&gt;echo &quot;/opt/jabber/lib/jabberd&quot; &amp;gt;&amp;gt; /etc/ld.so.conf.d/jabberd2.conf&lt;br /&gt;ldconfig&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Customizing the jabberd server install&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To customize the server, we first need to change to the jabberd directory by running the following command: cd /opt/jabber/etc/. Then we want to edit the sm.xml file so we follow the following steps as root:&lt;br /&gt;&lt;br /&gt;• Open sm.xml in your favorite text editor&lt;br /&gt;• Change the ID on the network from localhost to jabber.chatur.test (Make sure that jabber.chatur.test resolves)&lt;br /&gt;• Change the MYSQL database passwaed from&amp;lt;pass&amp;gt;secret&amp;lt;/pass&amp;gt; to &amp;lt;pass&amp;gt;jtest&amp;lt;/pass&amp;gt;&lt;br /&gt;• Scroll down to the User Options and uncomment the &amp;lt;auto-create/&amp;gt; tag. This allows users that are not registered on the server to register themselves.&lt;br /&gt;• If you want to have a predefined userlist to populate all new users, scroll to the the end of the file and uncomment &amp;lt;roster&amp;gt;/opt/jabber/etc/templates/roster.xml&amp;lt;/roster&amp;gt;. We will cover the contents of the roster.xml in a few minutes.&lt;br /&gt;&lt;br /&gt;Once we are done editing, save sm.xml and exit the editor. Now we need to customize c2s.xml, so follow these steps as root:&lt;br /&gt;&lt;br /&gt;• Open c2s.xml in your favorite text editor&lt;br /&gt;• Scroll to the &#39;Local network configuration&#39; section and change the &amp;lt;id&amp;gt; from localhost to jabber.chatur.test&lt;br /&gt;• In order to able to login though Mac OS X iChat client, change the authentication mechanism under ‘sasl’ first comment out ‘digest-md5’ from &amp;lt;digest-md5 /&amp;gt; to &amp;lt;-- &amp;lt;digest-md5 /&amp;gt; --&amp;gt;  and add ‘cram-md5’ instead &amp;lt;cram-md5 /&amp;gt;&lt;br /&gt;• Change the MYSQL database passwaed from&amp;lt;pass&amp;gt;secret&amp;lt;/pass&amp;gt; to &amp;lt;pass&amp;gt;jtest&amp;lt;/pass&amp;gt;&lt;br /&gt;• Save and exit&lt;br /&gt;&lt;br /&gt;This completes the configuration of the jabberd server. This gives us a basic jabber server that allows users to register themselves and chat with each other. However, if we want to have the ability to create chat rooms, we need to install some additional software called mu-conference. We will cover the installation of mu-conference momentarily.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating a default buddy list for new users&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;jabberd gives us the ability to create a template buddy list so that each new user has a default buddy list. This is very useful in environments where the administrator wants to make sure each user has all the important people in their buddy list without spending a lot of time adding each user manually.&lt;br /&gt;&lt;br /&gt;The template file is located in the templates subdirectory and is called roster.xml. The file has the following format:&lt;br /&gt;&lt;br /&gt;&amp;lt;query xmlns=’jabber:iq:roster’&amp;gt;&lt;br /&gt; &amp;lt;!--&lt;br /&gt;  &amp;lt;item name=’Buddy Name’ jid=’JID@Host.domain’ subscription=’both’&amp;gt;&lt;br /&gt;   &amp;lt;group&amp;gt;BuddyGroup&amp;lt;/group&amp;gt;&lt;br /&gt;  &amp;lt;/item&amp;gt;&lt;br /&gt; --&amp;gt;&lt;br /&gt;&amp;lt;/query&amp;gt;&lt;br /&gt;&lt;br /&gt;To add new users we need to uncomment the &amp;lt;item name&amp;gt; tag and add a new line for each user. For example if you wanted to add me to the default roster and my JID (Jabber ID) was chatur@jabber.chatur.test the entry for my name would look like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;item name=&#39;chatur&#39; jid=&#39;chatur@jabber.chatur.test&#39; subscription=&#39;both&#39;&amp;gt;&lt;br /&gt; &amp;lt;group&amp;gt;Support&amp;lt;/group&amp;gt;&lt;br /&gt;&amp;lt;/item&amp;gt;&lt;br /&gt;&lt;br /&gt;The group field tells the client the group under which the entry is supposed to be stored. In this case chatur is being stored under the Support group. All entries need to be enclosed within the &amp;lt;query&amp;gt; &amp;lt;/query&amp;gt; tag, so the complete file with one user would look something like:&lt;br /&gt;&lt;br /&gt;&amp;lt;query xmlns=’jabber:iq:roster’&amp;gt;&lt;br /&gt; &amp;lt;item name=’chatur’ jid=’chatur@jabber.chatur.test’ subscription=’both’&amp;gt;&lt;br /&gt;  &amp;lt;group&amp;gt;Support&amp;lt;/group&amp;gt;&lt;br /&gt; &amp;lt;/item&amp;gt;&lt;br /&gt;&amp;lt;/query&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Generating a Self-Signed SSL Certificate&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Important&lt;/strong&gt;: Key Is Self-Signed The key generated by the instructions below is self-signed. Such a key is not part of a trust hierarchy. When used to secure communications with Jabber clients, a self-signed key will usually cause warnings to appear because its authenticity cannot be verified against a trusted key.&lt;br /&gt;&lt;br /&gt;Generate Key Pair&lt;br /&gt;&lt;br /&gt;From a working directory, enter the command below to begin an interactive key generation process:&lt;br /&gt;&lt;br /&gt;openssl req -new -x509 -newkey rsa:1024 -days 3650 -keyout privkey.pem -out server.pem&lt;br /&gt;&lt;br /&gt;You will be prompted for a passphrase for the private key. After entering and confirming your passphrase, you will be prompted for public information about your key.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note&lt;/strong&gt;: Common Name Note that you should enter your domain name as the Common Name for your certificate.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note&lt;/strong&gt;: Key Lifetime Note that the command above creates a key with a 3650 day (10 year lifetime). To change the key lifetime, use a different number of days for the -days parameter.&lt;br /&gt;&lt;br /&gt;Remove Passphrase&lt;br /&gt;&lt;br /&gt;Enter this command to remove the passphrase from your private key:&lt;br /&gt;&lt;br /&gt;openssl rsa -in privkey.pem -out privkey.pem&lt;br /&gt;&lt;br /&gt;Combine the Private and Public Key&lt;br /&gt;&lt;br /&gt;Enter this command to combine the private and public keys into a single file:&lt;br /&gt;&lt;br /&gt;cat privkey.pem &amp;gt;&amp;gt; server.pem&lt;br /&gt;&lt;br /&gt;Delete Private Key&lt;br /&gt;&lt;br /&gt;You should now delete your private key:&lt;br /&gt;&lt;br /&gt;rm privkey.pem&lt;br /&gt;&lt;br /&gt;Move Key and Set Permissions&lt;br /&gt;&lt;br /&gt;You can now move your key to its permanent location. For example, to move the key to the default Jabberd pemfile location, you would enter this command (as superuser):&lt;br /&gt;&lt;br /&gt;mv server.pem /opt/jabber/etc/server.pem&lt;br /&gt;&lt;br /&gt;Then, you should set permissions on this file so that it is owned by superuser and is readonly (as superuser):&lt;br /&gt;&lt;br /&gt;chown root:jabber /opt/jabber/etc/server.pem    &lt;br /&gt;chmod 640 /opt/jabber/etc/server.pem&lt;br /&gt;&lt;br /&gt;Your certificate is now ready for use by Jabberd. You should make a backup (such as to a floppy) of your certificate.</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/5562883692758134642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/11/jabber-open-source-instant-messaging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/5562883692758134642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/5562883692758134642'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/11/jabber-open-source-instant-messaging.html' title='Jabber - an open source instant messaging'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-5179529082996518523</id><published>2009-10-05T00:01:00.000+05:45</published><updated>2009-10-05T00:19:18.554+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><title type='text'>Ethernet Bridge on FreeBSD</title><content type='html'>The basic operation of a bridge is to join two or more network segments together. There are many reasons to use a host based bridge over plain networking equipment such as cabling constraints, firewalling or connecting pseudo networks such as a Virtual Machine interface. A bridge can also connect a wireless interface to a wired network and act as an access point.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Requirements&lt;/strong&gt;:&lt;br /&gt;Two Physical (Real) Network Card (NIC) (minimum)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Enabling the Bridge:&lt;/strong&gt;&lt;br /&gt;The bridge is created using interface cloning. &lt;br /&gt;&lt;br /&gt;To create a bridge use ifconfig&lt;br /&gt;&lt;br /&gt;# ifconfig bridge create&lt;br /&gt;bridge0&lt;br /&gt;&lt;br /&gt;# ifconfig bridge0&lt;br /&gt;bridge0: flags=8802&amp;lt;BROADCAST,SIMPLEX,MULTICAST&amp;gt; metric 0 mtu 1500&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;ether 96:3d:4b:f1:79:7a&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0&lt;br /&gt;&lt;br /&gt;Add the member network interfaces to the bridge.&lt;br /&gt;&lt;br /&gt;# ifconfig bridge0 addm re0 addm re1 up&lt;br /&gt;# ifconfig re0 up&lt;br /&gt;# ifconfig re1 up&lt;br /&gt;&lt;br /&gt;To remove a BRIDGE interface, enter:&lt;br /&gt;# ifconfig bridge0 destroy&lt;br /&gt;&lt;br /&gt;To make configuration persistence, open /etc/rc.conf, Append / modify as follows:&lt;br /&gt;# vi /etc/rc.conf&lt;br /&gt;cloned_interfaces=&quot;bridge0&quot;&lt;br /&gt;ifconfig_bridge0=&quot;addm re0 addm re1 up&quot;&lt;br /&gt;ifconfig_re0=&quot;up&quot;&lt;br /&gt;ifconfig_re1=&quot;up&quot;&lt;br /&gt;&lt;br /&gt;bridge interface can be configured to take part in network.&lt;br /&gt;# ifconfig bridge0 inet 192.168.200.1/24</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/5179529082996518523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/10/ethernet-bridge-on-freebsd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/5179529082996518523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/5179529082996518523'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/10/ethernet-bridge-on-freebsd.html' title='Ethernet Bridge on FreeBSD'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-1646572794773657492</id><published>2009-10-04T23:43:00.000+05:45</published><updated>2009-10-04T23:56:19.890+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Linux Ethernet Bridge</title><content type='html'>&lt;span style=&quot;color: rgb(38,38,38);&quot;&gt;The Linux ethernet bridge can be used for connecting multiple ethernet devices together. The connection is fully transparent: hosts connected to one ethernet device see hosts connected to the other ethernet devices directly.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Requirements&lt;/strong&gt;:&lt;br /&gt;&lt;ol style=&quot;list-style-type: decimal&quot;&gt;&lt;li&gt;Two Physical (Real) Network Card (NIC) (minimum)&lt;/li&gt;&lt;li&gt;bridge-utils - &lt;span style=&quot;color: rgb(38,38,38);&quot;&gt;This package contains utilities for configuring the Linux ethernet bridge.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;Steps&lt;/strong&gt;:&lt;br /&gt;1. Zero IP the interfaces.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# ifconfig eth0 0.0.0.0&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# ifconfig eth1 0.0.0.0&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;OR&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# ifconfig eth0 up promisc&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# ifconfig eth1 up promisc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Create the bridge interface.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# brctl addbr br0&lt;br /&gt;&lt;br /&gt;3. Add interfaces to the bridge.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# brctl addif br0 eth0&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# brctl addif br0 eth1&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;OR&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# brctl addif br0 eth0 eth1&lt;br /&gt;&lt;br /&gt;4. Put up the bridge.&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# ifconfig mybridge up&lt;br /&gt;          &lt;br /&gt;5. The virtual interface &lt;strong&gt;br0&lt;/strong&gt; can also be configured to take part in network. It behaves like real interface (like a normal network card). &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;# ifconfig br0 192.168.200.100 netmask 255.255.255.0&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/1646572794773657492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/10/linux-ethernet-bridge.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/1646572794773657492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/1646572794773657492'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/10/linux-ethernet-bridge.html' title='Linux Ethernet Bridge'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-3230028167609284552</id><published>2009-10-03T19:55:00.000+05:45</published><updated>2009-10-03T21:13:54.219+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>kill process based on username and logout users</title><content type='html'>To kill all process of logged in user and logout&lt;br /&gt;&lt;br /&gt;pkill -KILL -u username&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/3230028167609284552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/10/kill-process-based-on-username-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/3230028167609284552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/3230028167609284552'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/10/kill-process-based-on-username-and.html' title='kill process based on username and logout users'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-8934843792082876426</id><published>2009-10-03T18:15:00.000+05:45</published><updated>2009-10-03T19:01:47.301+05:45</updated><title type='text'>Ethernet Loopback connector</title><content type='html'>Occasionally I need for a network card to operate as a live network connection, without it actually being connected to a network. Typically for testing purposes, I need a quick and easy way to make a loopback connector. Small enough to keep in my Pocket. The following is a quick &quot;how to&quot; for making an Ethernet loopback connector.&lt;br /&gt;
&lt;br /&gt;
To create a loopback plug, cross pin 1 (TX+) and pin 3 (RX+) together, and cross pin 2 (TX-) and pin 6 (RX-) together. You need the following equipment to create the loopback:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;A 6-inch long CAT5 cable&lt;/li&gt;
&lt;li&gt;An RJ-45 connector&lt;/li&gt;
&lt;li&gt;A crimping tool&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZN1xwkSaSayvWfXTN4V4KxSgBHXlPG6_qpSqv-sFIwTZ0vV9kOdadnHcuFQtt2BvJK8njeObOlMRDyhLhG9QavgIHbYCPND3IQsiRw_nd3iOIMTMIx3L4ofbqOo45UD5rMv0ov5O6_4g/s1600-h/ethloopback.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZN1xwkSaSayvWfXTN4V4KxSgBHXlPG6_qpSqv-sFIwTZ0vV9kOdadnHcuFQtt2BvJK8njeObOlMRDyhLhG9QavgIHbYCPND3IQsiRw_nd3iOIMTMIx3L4ofbqOo45UD5rMv0ov5O6_4g/s400/ethloopback.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
When you create and then test a physical loopback, you are testing the RJ-45 interface of the NIC.</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/8934843792082876426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/10/ethernet-loopback-connector.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/8934843792082876426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/8934843792082876426'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/10/ethernet-loopback-connector.html' title='Ethernet Loopback connector'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZN1xwkSaSayvWfXTN4V4KxSgBHXlPG6_qpSqv-sFIwTZ0vV9kOdadnHcuFQtt2BvJK8njeObOlMRDyhLhG9QavgIHbYCPND3IQsiRw_nd3iOIMTMIx3L4ofbqOo45UD5rMv0ov5O6_4g/s72-c/ethloopback.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-5398547343634864985</id><published>2009-10-03T17:52:00.000+05:45</published><updated>2009-10-03T18:01:22.066+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="FreeRADIUS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Perl"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Know Number of Logged in User in FreeRadius from Shell</title><content type='html'>This is a very useful perl script that i created to know how many user are logged in on FreeRadius from the UNIX/Linux shell or command line.&lt;br /&gt;&lt;br /&gt;It’s for FreeRadius with MySQL and I think it is usefull for other radiuses as well.&lt;br /&gt;Below is the full code.&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;use DBI;&lt;br /&gt; my $db = &#39;radius&#39;;&lt;br /&gt;my $db_host = &#39;localhost&#39;;&lt;br /&gt;my $db_username = &#39;username&#39;;&lt;br /&gt;my $db_password = &#39;password&#39;;&lt;br /&gt;my $dbh = DBI-&amp;gt;connect(&quot;dbi:mysql:database=$db;host=$db_host:port number;user=$db_username;password=$db_password&quot;) or die &quot;Couldn&#39;t connect to database: $DBI::errstr\n&quot;;&lt;br /&gt;&lt;br /&gt;my $sql = qq{SELECT DISTINCT UserName,AcctStartTime,FramedIPAddress,CallingStationId FROM radacct WHERE AcctStopTime = &#39;0000-00-00 00:00:00&#39; AND NASIPAddress = &#39;192.168.254.2&#39; GROUP BY UserName};&lt;br /&gt;&lt;br /&gt;$sth = $dbh-&amp;gt;prepare($sql) or die &quot;Couldn&#39;t prepare query &#39;$sql&#39;: $DBI::errstr\n&quot;;&lt;br /&gt;&lt;br /&gt;$sth-&amp;gt;execute() or die &quot;Couldn&#39;t execute query &#39;$sql&#39;: $DBI::errstr\n&quot;;&lt;br /&gt;&lt;br /&gt;print $sth-&amp;gt;rows();&lt;br /&gt;&lt;br /&gt;$sth-&amp;gt;finish();&lt;br /&gt;&lt;br /&gt;$dbh-&amp;gt;disconnect();&lt;br /&gt;&lt;br /&gt;exit;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br /&gt;change the username and password to actual username and password of a MySQL database, and &lt;strong&gt;NASIPAddress&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/5398547343634864985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/10/know-number-of-logged-in-user-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/5398547343634864985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/5398547343634864985'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/10/know-number-of-logged-in-user-in.html' title='Know Number of Logged in User in FreeRadius from Shell'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-217176676548860400</id><published>2009-10-03T17:17:00.000+05:45</published><updated>2009-10-03T17:18:34.198+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>MacJournal to WordPress</title><content type='html'>&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;You can publish your MacJournal to WordPress.&lt;br /&gt;
(For custom configuration.)&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;b&gt;Here’s the step-by-step guide:&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;1. Select your desired journal entry.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;2. From the menu Entry, click Send to Blog.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;3. Click Manual Setup&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;4. Type in Name : (your blog name)&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;5. In pull down menu,Type: select Movable Type&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;6. Type in URL: http://yourname.wordpress.com/&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;7. Type in Post URL: http://yourname.wordpress.com/xmlrpc.php&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;8. Type in Username : (your account name)&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;9. Type in Blog ID : 1&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 12.0px Helvetica; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;10. Press button Ok.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/217176676548860400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/10/macjournal-to-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/217176676548860400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/217176676548860400'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/10/macjournal-to-wordpress.html' title='MacJournal to WordPress'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-7767058572404701643</id><published>2009-04-20T19:15:00.000+05:45</published><updated>2009-10-03T17:58:43.872+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>FreeBSD VLANs Configuration using ifconfig command</title><content type='html'>To create a new VLAN interface, enter:&lt;br /&gt;&lt;strong&gt;# ifconfig {vlan-name} create&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;To associate the VLAN interface with a physical interface and assign a VLAN ID, IP address, and netmask:&lt;br /&gt;&lt;strong&gt;# ifconfig {vlan-name} {ip-address} netmask {subnet-mask} vlan {vlan-id} vlandev {physical-interface}&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;The following examples, all packets will be marked on egress with 802.1Q VLAN tags, specifying a VLAN ID of 500:&lt;br /&gt;&lt;strong&gt;# ifconfig vlan500 10.0.0.1 netmask 255.255.255.0 vlan500 vlandev em0&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;To remove a VLAN interface, enter:&lt;br /&gt;&lt;strong&gt;# ifconfig {vlan-name} destroy&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;To make configuration persistence, open /etc/rc.conf:&lt;br /&gt;&lt;strong&gt;# vi /etc/rc.conf&lt;br /&gt;&lt;br /&gt;Append / modify as follows:&lt;br /&gt;cloned_interfaces=“vlan500 vlan600”&lt;br /&gt;ifconfig_vlan500=&quot;inet x.x.x.x netmask y.y.y.y vlan 500 vlandev em0&quot;&lt;br /&gt;ifconfig_vlan600=&quot;inet x.x.x.x netmask y.y.y.y vlan 600 vlandev em0&quot;&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/7767058572404701643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/04/freebsd-vlans-configuration-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/7767058572404701643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/7767058572404701643'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/04/freebsd-vlans-configuration-using.html' title='FreeBSD VLANs Configuration using ifconfig command'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-356895545854351771</id><published>2009-01-03T12:35:00.000+05:45</published><updated>2009-10-03T17:30:35.030+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Static ARP entry</title><content type='html'>&lt;strong&gt;arp -s &lt;em&gt;ip_address&lt;/em&gt; &lt;em&gt;ethernert_address&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;example&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;arp -s 192.168.69.126 00:1f:f3:52:20:ed&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;arp -S &lt;em&gt;ip_address&lt;/em&gt; &lt;em&gt;ethernert_address&lt;/em&gt;&lt;/strong&gt; &lt;br /&gt;- Is just like -s except any existing ARP entry for this host will be deleted first.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;example&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;arp -S 192.168.69.126 00:1f:f3:52:20:ed</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/356895545854351771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2009/01/static-arp-entry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/356895545854351771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/356895545854351771'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2009/01/static-arp-entry.html' title='Static ARP entry'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-1073357862871183541</id><published>2008-03-09T18:10:00.000+05:45</published><updated>2009-10-03T19:43:09.284+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>Reset Forgotten MySQL Root Password</title><content type='html'>Have you ever forgotten the root password on one of your MySQL servers? No? Well maybe I’m not as perfect as you. This is a quick how to reset your MySQL root password. It does require root access on your server.&lt;br /&gt;&lt;br /&gt;First things Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;mysqld_safe --skip-grant-tables&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;mysql --user=root mysql&lt;br /&gt;update user set Password=PASSWORD(&#39;new-password&#39;); flush privileges; exit;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Now kill your running mysqld, then restart it normally. You should be good to go. Try not to forget your password again.&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/1073357862871183541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2008/03/reset-forgotten-mysql-root-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/1073357862871183541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/1073357862871183541'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2008/03/reset-forgotten-mysql-root-password.html' title='Reset Forgotten MySQL Root Password'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-6552573431989532229</id><published>2008-02-21T18:10:00.000+05:45</published><updated>2009-10-03T19:36:08.085+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Firefox"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Install Firefox 3 beta in CentOS 5 / RHEL 5</title><content type='html'>This short howto is about is CentOS 5 which is based on RedHat Enterprise Linux 5, so this should also work on RHEL 5.&lt;br /&gt;&lt;br /&gt;I use CentOS 5 as a Desktop OS on office PC, it’s a very stable and working distro even if it doesn’t always have the latest software. This is why I had to manually install the latest Beta Firefox 3.&lt;br /&gt;&lt;br /&gt;First off all we need to install compat-libstdc++-33. Otherwise Firefox won’t run.&lt;br /&gt;# yum install compat-libstdc++-33&lt;br /&gt;&lt;br /&gt;Then download the latest beta version of Firefox 3 from &lt;a href=&quot;http://www.mozilla.com/firefox/all-beta.html&quot;&gt;www.mozilla.com/firefox/all-beta.html&lt;/a&gt; and unpack it to /usr/lib&lt;br /&gt;&lt;br /&gt;# tar jxvf firefox-3.0b3.tar.bz2&lt;br /&gt;# mv firefox /usr/lib/firefox-3.0b3&lt;br /&gt;&lt;br /&gt;Set the link for the binary&lt;br /&gt; # cd /usr/bin&lt;br /&gt;# cp firefox firefox-1.5&lt;br /&gt;# gedit firefox&lt;br /&gt;&lt;br /&gt;then replace all ‘firefox-1.5.0.12’ with ‘firefox-3.0b3’&lt;br /&gt;and finally for a desktop menu &lt;span style=&quot;color: rgb(38,38,38);&quot;&gt;&lt;/span&gt;create a firefox-3.desktop on /usr/share/applications&lt;br /&gt;&lt;br /&gt;# gedit /usr/share/applications/firefox-3.desktop&lt;br /&gt;&lt;br /&gt;[Desktop Entry]&lt;br /&gt;Version=1.0&lt;br /&gt;Encoding=UTF-8&lt;br /&gt;Name=Firefox 3 beta 3&lt;br /&gt;GenericName=Web browser&lt;br /&gt;Comment=Send and Receive Email&lt;br /&gt;Exec=firefox&lt;br /&gt;Icon=firefox.png&lt;br /&gt;Terminal=false&lt;br /&gt;MimeType=text/html;text/xml;application/xhtml+xml&lt;br /&gt;Type=Application&lt;br /&gt;Categories=Network;Application;X-Fedora;&lt;br /&gt;Comment=Firefox Web Browser&lt;br /&gt; &lt;br /&gt;thats all, Firefox 3 beta is ready to run with required plugins.&lt;br /&gt;Same steps can be followed for laatest stable Firefox version 2. &lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/6552573431989532229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2008/02/install-firefox-3-beta-in-centos-5-rhel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/6552573431989532229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/6552573431989532229'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2008/02/install-firefox-3-beta-in-centos-5-rhel.html' title='Install Firefox 3 beta in CentOS 5 / RHEL 5'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-8189130129273332441</id><published>2008-02-19T18:11:00.000+05:45</published><updated>2009-10-03T19:52:31.809+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Promote Additional Domain Controller to Primary Domain Controller</title><content type='html'>&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td colspan=2 style=&quot;vertical-align:top;width: 667px;padding: 1px,1px,1px,1px;border-top: 0px solid rgb(0,0,0);border-right: 0px solid rgb(0,0,0);border-bottom: 0px solid rgb(0,0,0);border-right: 0px solid rgb(0,0,0);margin: 0px,0px,0px,0px;&quot;&gt;In an Active Directory forest, where you have several domain controllers, but one primary domain controller (PDC) - you may think that you must RESTORE or recover this PDC to salvage the domain. In other words, if the PDC fails - is all lost? Nope, not at all. Unless you do not have backup domain controllers.&lt;br /&gt;&lt;br /&gt;When you promote additional servers on your domain, and make them member DC&#39;s in the same forest, then your domain details are available to you - and you simply need to transfer the Operation Master role to another DC - but before doing that - there are the FSMO&#39;s - yea, something hardly anyone knows about: FSMO = Flexible Single Master Operation - something your PDC or master of operations - manages. If a PDC - and Global Catalog for that matter - goes offline, a backup DC will generally pickup and juggle traffic for the PDC. But what happens if the PDC crashes altogether, and you need to basically assign a member backup DC the PDC role?&lt;br /&gt;&lt;br /&gt;FSMO must be transferred to a backup DC before that DC can assume the Master of Operations role. This is done at the command-line level, and you must be careful before you make this call - ONLY do this if you are sure you cannot recover the original PDC because once you do this - you cannot laterr recover the PDC and bring it online. It cannot be added back into the forest at all.&lt;br /&gt;So, the FSMO roles and how we transfer these. In a word, you cannot simply transfer the FSMO roles because the PDC is off line and not available to authorize the transfer. However, you &#39;can&#39; SEIZE the FSMO roles from the original PDC - even with the machine offl line.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,0,0);&quot;&gt;&lt;strong&gt;Caution&lt;/strong&gt;: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;span style=&quot;color: rgb(0,0,0);&quot;&gt;Open a CMD prompt on the backup DC you want to perform this on. At the command-line prompt, type &lt;strong&gt;Ntdsutil&lt;/strong&gt; and press &amp;lt;Enter&amp;gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td colspan=2 style=&quot;vertical-align:top;width: 667px;padding: 1px,1px,1px,1px;border-top: 0px solid rgb(0,0,0);border-right: 0px solid rgb(0,0,0);border-bottom: 0px solid rgb(0,0,0);border-right: 0px solid rgb(0,0,0);margin: 0px,0px,0px,0px;&quot;&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;C:\WINDOWS&amp;gt;ntdsutil&lt;/span&gt; &lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;ntdsutil:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;At this prompt, type &lt;em&gt;roles&lt;/em&gt; and press &amp;lt;Enter&amp;gt;:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;ntdsutil: roles&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;fsmo maintenance:&lt;/span&gt;&lt;br /&gt;Now type &lt;em&gt;connections&lt;/em&gt; and press &amp;lt;Enter&amp;gt;:&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;fsmo maintenance: connections&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;server connections:&lt;/span&gt;&lt;br /&gt;Now type &lt;em&gt;connect to servername &amp;lt;serverName&amp;gt;&lt;/em&gt; where &amp;lt;serverName&amp;gt; is the name of the backup DC you are working on, and press &amp;lt;Enter&amp;gt;:&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;server connections: connect to servername hamddc02&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;Connected to hamdc02 using credentials of locally logged on user.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;server connections:&lt;/span&gt;&lt;br /&gt;At the server connections prompt type &lt;em&gt;q&lt;/em&gt; and press &amp;lt;Enter&amp;gt;:&lt;br /&gt;&lt;span style=&quot;color: rgb(41,91,246);&quot;&gt;server connections: q&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(41,91,246);&quot;&gt;fsmo maintenance:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to SEIZE the FSMO roles we want. NOTE: Out of the 5 FSMO roles, we are NOT &lt;br /&gt;going to seize the &lt;em&gt;Infrastructure Master&lt;/em&gt;. We do not want to put the Infrastructure Master (IM) role on the same domain controller as the Global Catalog server. If the Infrastructure Master runs on a GC server it will stop updating object information because it does not contain any references to objects that it does not hold. This is because a GC server holds a partial replica of every object in the forest. For now, we&#39;ll seize the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;Seize domain naming master&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;Seize PDC&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;Seize RID master&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0,37,245);&quot;&gt;Seize schema master&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We do this by typig the line shown above. For example, to seize the domain naming master, type &lt;em&gt;&lt;strong&gt;seize domain naming master&lt;/strong&gt;&lt;/em&gt; and press &amp;lt;Enter&amp;gt;&lt;br /&gt;&lt;br /&gt;You will receive a Windows dialog prompting to confirm this move - click &amp;lt;Yes&amp;gt; and then you&#39;ll see the attempt to safely transfer the FSMO role, a failure message, and then it will seize the role, assigning it to the backup DC you specified when you connected to the server above.&lt;br /&gt;Once you have completed this for the 4 roles, type Quit to exit the utility, then Exit to return to Windows.&lt;br /&gt;&lt;br /&gt;From the Start menu, select Run and enter &lt;strong&gt;dsa.msc&lt;/strong&gt; and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;On the domain that is displayed, right click and select &lt;strong&gt;Operations Masters&lt;/strong&gt;. You should now see that this backup domain controller (HAMDC02 in this case) is not the Operations master.&lt;br /&gt;From here you simply re-create the failed domain controller, and promote it - joining it to this existing forest.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;NOTE:&lt;br /&gt;some great tips found on net&lt;br /&gt;&lt;ol style=&quot;list-style-type: decimal&quot;&gt;&lt;br /&gt;&lt;li&gt;The seize command is a rather heavy handed route to undertake and only should happen as a last resort if the usual transfer is not possible. Don&#39;t be alarmed though if you need to go down this road. If the DC is limping till it gives up the ghost, try and transfer the roles without delay. In other words, if there is a chance to transfer then, do it otherwise fall back on seizing them.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The issue of never returning the same DC back into the AD had concerened me the most especially as it&#39;s written everywhere yet with no good explanation as to why. The main reason for it is that the AD will be competing with the downed server for the handling of the RID pool in particular. If this was to occur, any newly created items within AD will not get unique identifiers and start to cause unknown complications when calling on these ID&#39;s leading up to an unstable and very confused AD.&lt;/li&gt;&lt;br /&gt;&lt;li&gt; However, the above rule would only happen if the downed DC was not freshly rebuilt before returning to the domain. If the server _is_ the same one that left, then you can never bring it back into AD and promote it. However, if it&#39;s the same server physically yet was formatted and repartitioned with a fresh OS then its not technically the same server as the GUID of the new machine will be different. That&#39;s what is referred to when instructed never to bring it back - the GUID. So, when rebuilding you can even use the same netbios/dns name as the original since AD will hand it a new GUID on entry to the directory.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;This then means that when removing the server (or rebuilding it from a crash) there will still be remnants of it within AD. You will then need to do a metadata cleanup via ntdsutil. To ensure that all records of the original server have been removed from AD, use the DcDiag /v command.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you need to determine which servers are handling each of the 5 FSMO roles, use the &quot;Netdom query FSMO /domain&quot; command available from either the windows 2000 support tools or within the standard 2003 server.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/8189130129273332441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2008/02/promote-additional-domain-controller-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/8189130129273332441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/8189130129273332441'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2008/02/promote-additional-domain-controller-to.html' title='Promote Additional Domain Controller to Primary Domain Controller'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418033514329924180.post-805556515644794635</id><published>2008-02-12T17:13:00.000+05:45</published><updated>2009-10-03T19:23:01.496+05:45</updated><category scheme="http://www.blogger.com/atom/ns#" term="Joomala"/><title type='text'>How to add Google meta verification to Joomla</title><content type='html'>&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td colspan=2 style=&quot;vertical-align:top;width: 667px;padding: 1px,1px,1px,1px;border-top: 0px solid rgb(0,0,0);border-right: 0px solid rgb(0,0,0);border-bottom: 0px solid rgb(0,0,0);border-right: 0px solid rgb(0,0,0);margin: 0px,0px,0px,0px;&quot;&gt;Easy. Simply sign up for &lt;a href=&quot;https://www.google.com/webmasters/tools/docs/en/about.html&quot;&gt;Google Webmaster Tools&lt;/a&gt;, and choose the meta tag verification option.  Google will then generate a custom meta tag that you need to embed in the template of your Joomla site.&lt;br /&gt;&lt;br /&gt;If you use multiple templates, you should add this code to all templates and upload.&lt;br /&gt;&lt;br /&gt;We prefer to make these changes using Dreamweaver (or notepad) and FTP.  But, if for some reason you do NOT have FTP access, you can still make the changes yourself through the Joomla control panel.&lt;br /&gt;&lt;br /&gt;Just log in and go to site &amp;gt; template manager.  Click the radio box of the template you want to manage and click the EDIT HTML icon in the upper right.&lt;br /&gt;&lt;br /&gt;A window will open and you can edit the HTML code directly.&lt;br /&gt;&lt;br /&gt;We recommend you ad the code just above the &amp;lt;head&amp;gt; tag.&lt;br /&gt;&lt;br /&gt;It should look something like this:&lt;br /&gt;&lt;br /&gt;&amp;lt;meta name=&quot;verify-v1&quot; content=&quot;UniqueGoogleID&quot; /&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.chatur.com.np/feeds/805556515644794635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.chatur.com.np/2008/02/how-to-add-google-meta-verification-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/805556515644794635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418033514329924180/posts/default/805556515644794635'/><link rel='alternate' type='text/html' href='http://www.chatur.com.np/2008/02/how-to-add-google-meta-verification-to.html' title='How to add Google meta verification to Joomla'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>