Thursday, January 30, 2014

Setting up SNMP monitoring on Network interface with bsnmpd

Setting up SNMP monitoring on Network interface with bsnmpd

bsnmpd file is already installed so lets go ahead with utilities
run the following to install bsnmp-ucd:

        # cd /usr/ports/net-mgmt/bsnmp-ucd
        # make all install clean
Run the following to instal bsnmptools
        # cd /usr/ports/net-mgmt/bsnmptools
        # make all install clean
CONFIGURING BSNMP
edit /etc/snmpd.config to add the line:
        begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"
edit the rest of that file - change the read variable to set your snmp community string

FINISHING TOUCHES AND FINAL COMMENTS
At this point you need to add
bsnmpd_enable="YES"

to the file /etc/rc.conf and start bsnmp by issuing
# /etc/rc.d/bsnmp start

Ok now run the testing from workstation to see if bsnmpd is working fine on server
to use snmpwalk / snmpget you must install package snmp in linux workstation

snmpwalk -v2c -c public 192.168.2.5

i you are getting getting no response , check the snmp service is running by netstat -a command and see snmp port is listed

Now its time to install MRTG and see if we can get the graph genarated

cd /usr/port/net-mgmt/mrtg
make install clean

Then create the configuration file for the NICs by using cfgmaker
cfgmaker --ifref=eth public@localhost > /usr/local/etc/mrtg/network.cfg

then modify the network.cfg file and run mrtg
mrtg network.cfg --logging /var/log/mrtg.log, run this command atleast 4,5 times to clean the rateup errors

Check the mrtg.log file for any erros and add a crontab entry to update the mrtg @ 5 minutes
crontab -e
*/5  *    *   *   *   /usr/local/bin/mrtg /usr/local/etc/mrtg/network.cfg --logging /var/log/mrtg.log > /dev/null

Now create the index file in the www home folder

indexmaker /usr/local/etc/mrtg/network.cfg > /home/www/mrtg/index.html

Transferring Files from Windows to FreeBSD without passwords in secured way. Keyless Authentication

Transferring Files from Windows to FreeBSD without passwords in secured way

Tools needed
putty - ssh client
puttygen - ssh key genarator for windows
pscp - secure copy clients of putty

First part is Genarating keys to be used to keyless operation
keylength 2048
Click on genarate and move the mouse on blank area to create some randomness
copy the private key safely and copy the public key and  signature

in the remote machine, paste the public key signature on authorized_keys in .ssh folder and try the keyless auth

Thats all and now Enjoy

Update after a long time!

Took a real break from all these to concentrate more on personal front.
So here I am after a big break wanted to post few things which is getting me hooked and exciting
First and foremost of FreeBSD - with just released version of 10 FreeBSD moves into a milestone with some solid changes all over
so what and all happened during these days of FreeBSD 8 to FreeBSD 10

1. Major changes in kernel where the kernel is much more fine tuned for processors with multi cores i.e FreeBSD scales pretty much very with latest all hardwares
2.Clag was introduced as the major/default compiler for FreeBSD system. Yes gcc is still there but not installed by default
3. Ports system under went major over haul with a security breach happend @ 2012 and pkg is the default package managment.
4. Bind is removed from the system, it got replaced with a super light unbind.
5. Major virtualization enhancements
6. Introduction of capsicum into the default system (enhanced jail/sandboxing)
7.Major changes in FreeBSD installer
8. Kernel can address upto 4 TB of system memory
9. Enhanced hardware support
10.ZFS got matured very much and considered to be very stable

These are of few I could think of and for the entire features you could visit the Whats New page of FreeBSD 10 hereSo that to start with
Wishing you all a great new year ahead