Electronox Blog Electronox Photo Gallery Electronox Forum

Debian Etch Linux Router June 2nd, 2007 by Justin

 

Optional – Install ddclient to update the IP of your router automatically.

  1. Log into namecheap, click electronox.net domain, dynamic dns, and copy and paste that large password, keeping it handy.
  2. # apt-get install ddclient
  3. Go through the installer, it doesn’t matter what you click because we have to do it manually anyway later.
  4. # nano /etc/ddclient.conf
  5. 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

  6. Did it work?
  7. # 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.

  8. If not, in /usr/sbin/ddclient, change the following 2 lines nic_namecheap_update (use ctrl-w):
  9. $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

  1. # apt-get install cacti
  2. 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.

  3. # nano /etc/cacti/apache.conf
  4. 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 you want to be used.

  5. # /etc/init.d/apache2 restart
  6. # /etc/snmp/snmpd.conf
  7. 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.

  8. # /etc/init.d/snmpd restart
  9. Reload the configuration variables.

  10. # snmpwalk localhost -c public -v1
  11. 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.

  12. # snmpwalk 10.0.0.15 -c public -v1
  13. 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…

  14. # nano /etc/default/snmpd
  15. 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

updates
 
  • Download the desktop portal.
most recent blog posts
most recent comments
most recent forum posts
 
log in