Optional – Install ddclient to update the IP of your router automatically.
- Log into namecheap, click electronox.net domain, dynamic dns, and copy and paste that large password, keeping it handy.
- # apt-get install ddclient
- Go through the installer, it doesn’t matter what you click because we have to do it manually anyway later.
- # nano /etc/ddclient.conf
- Did it work?
- If not, in /usr/sbin/ddclient, change the following 2 lines nic_namecheap_update (use ctrl-w):
pid=/var/run/ddclient.pid
use=if, if=eth0
##
## NameCheap (namecheap.com)
##
protocol=namecheap,
server=dynamicdns.park-your-domain.com,
login=electronox.net,
password=XXXXXXXXXXX
yourroutername
yourname
## DO NOT USE www, forum, pix, etc. YOU WOULD OVERWRITE THESE IP ADDRESSES WITH YOUR OWN
# nano /var/log/syslog
ctrl-w ddclient
does it say success?
example: “Jun 2 21:12:29 router1 ddclient[6927]: SUCCESS: updating thelockdown: good: IP address set to 69.247.175.90”
alternatively, check namecheap.com for the right ip’s.
$url .= "?host=$config{$h}{'login'}";
$url .= "&domain=$h";
to:
$url .= "?host=$h";
$url .= "&domain=$config{$h}{'login'}";
If these were already changed, you have a patched version and something else is wrong.
Optional: snmpd / snmp monitoring with debian etch
- # apt-get install cacti
- # nano /etc/cacti/apache.conf
- # /etc/init.d/apache2 restart
- # /etc/snmp/snmpd.conf
- # /etc/init.d/snmpd restart
- # snmpwalk localhost -c public -v1
- # snmpwalk 10.0.0.15 -c public -v1
- # nano /etc/default/snmpd
Follow the directions to get you goin’. Cacti is a php application that will call in snmpd and allow you to look at snmp information via a web interface. More information for installing cacti can be found at http://www.cacti.net/ if it’s not immediately working.
You can change the location of the cacti directory by modifying the “Alias /cacti /usr/share/cacti/site” to “Alias /whatever /usr/share/cacti/site,” which will be globally accessible on any http service via http://yourdomain.com/whatever. You can also make this specific to one virtual host by copying the entirety of /etc/cacti/apache.conf to your /etc/apache2/sites-enabled/default file within the
For basic installs, the only thing you need to write here is a read-only community called “public” and allow “public” to access from certain hosts. To do this…
rocommunity public hostiporhostname
rocommunity public localhost
rocommunity public 10.0.0.0/24
This will allow access to 1. a specific host or ip address, 2. the local machine, and 3. all local machines with IP’s 10.0.0.1 thru 10.0.0.254.
Reload the configuration variables.
If snmpwalk is a command not found, # apt-get install snmp, and try again. You should get a lot of lines of output from the local machine. If not, you don’t have snmpd set up right.
Assuming the localhost’s ip is 10.0.0.15 and you get a Timeout error, then snmpd is not bound to the right interface and won’t respond to snmpwalk requests placed to 10.0.0.15 even if its trying to access snmp on the same machine. To fix this…
Change:
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
to
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
Removing 127.0.0.1 from the SNMPDOPTS allows snmp to listen to requests on all interfaces, instead of just the local loopback address. This was an annoying security bug “feature” enabled by default and was nearly impossible to figure out a solution for without some hours of fiddling and google-searching.
Now you can start fiddling around with cacti’s powerful but somewhat disorganized interface, adding hosts in a similar fashion to what was described above. Have fun!




Warning: number_format() expects parameter 1 to be double, array given in /var/www/www.electronox.net/htdocs/blog/wp-includes/functions.php on line 155
Comments () »
No comments yet.
Leave a comment