|
Installation
The operating system and requirements
Sipman is mainly written in shell script(bash) and perl. Besides this you need an numbre of external programs (like fping, snmpget), which are used for different tasks. So it should run on most Unix platforms.
For development, Debian is the main platform used. So the rest of this manual covers an install from scratch using an intel based platform with Debian.
Installing the Debian base system
- On the web, goto http://www.debian.org/CD/http-ftp/.
- Under Official CD/DVD images of the stable release, goto I386 Use whatever architecture your system has, Debian has a verry wide varyity of systems supported..
- Download the cd1 image ( eg. debian-40r3-i386-CD-1.iso )
- Burn this to a cd as an bootable image (may vary depending on your burner software).
- Insert it into your test/management machine, you will use to run Sipman, and boot from the cd.
- If you get an screen with an Debian logo, with the message .ENTER or boot:., just enter.
- Choose as language English and enter.
- Choose your country (for your timezone, etc.). If you are in Holland, choose other, and press 4 times an n to get Netherlands.
- Keymap to use, American English, or whatever keyboard you have. After this it will be scanning your cd.
- It will automatically try to detect dhcp. This may fail if you have a slow dhcp server. In case of failure, Continu and Retry network autoconfiguration. You can also define your IP setup manualy.
- When asked for an hostname, supply one (eg. Sipman), and select Continue.
- Enter your domain name, when asked for it ( eg. net.loc ), and select Continue. This will start the partitioner and scan for disks.
- When asked for the partition method, select Manual.
- You will need an swap file of twice the memory size (with an max of 1 Gigabyte) and at least 1 Linux partition. If you have enough room, you can create one root (/) partition of 10 GB and for example a data partition for the rest. This allows you to quickly reinstall the system, while leaving the data on your system intact. In this example, I will remove all existing partitioning info, and create 1 swap and a root partition. Be sure you do not need any data currently on your system and if necessary make sure you ha a working backup, because It will be erased in the next chapters.
- Select your first partition and enter.
- Select Delete the partition.
- This will create FREE SPACE, do this for all your existing partitions. If any of your partitions is oke, leave it allone. Repeat this, untile there are no partitions left.
- Select the FREE SPACE, to start creating your partitions.
- Select Create a new partition.
- Choose the size of your swap partition (eg 1GB).
- Select the partition type: Primary.
- Select the location of the partition: Beginning.
- Select Use as: enter.
- Choose swap area from the list and enter.
- Select Done setting up the partition and enter.
- Select the FREE SPACE, to start creating your data partition.
- Select Create a new partition.
- Choose the size of your partition and enter (it should propose the rest of your partition).
- Select the partition type: Primary.
- Select Use as: and enter.
- Choose ReiserFS from the list, and enter. The ReiserFS filesystem is the most efficient and fastest filesystem for use with Sipman, so use it.
- Choose Format the partition: Yes, format it.
- Choose Mount options:
- Select noatime with your spacebar and enter.
- Select Done setting up the partition and enter.
- Select Finish partitioning and write changes to disk, to start formatting your disk.
- On Write changes to disk, select Yes, and enter. The system will start formatting your disk.
- On Root password: enter your root password (you will need it to get access to your system in administration mode).
- On Re-enter password:, re-enter your password.
- On Full name for the new user: enter a user name ( eg. Your name ). You can use this account later, to log into the system.
- On Username for your account: enter the userid.
- On Choose a password for the new user:, enter the users password.
- On Re-enter password to verify: enter the password again. The system will now start installing the base system from the cd, this may take a few minutes.
- On Use a network mirror?, select Yes.
- Select your country ( eg Netherlands ).
- Select the mirror (eg ftp.debian.nl ). make sure all of your systems use the same mirror, so your proxyserver (or the apt-cacher) can cache requests to the internet.
- On HTTP proxy information: enter the name and port number of your proxy server. ( eg http://proxy.emea.xxx.com:8080 ). If all goes well, it will start scanning your mirror (retrieving the package lists).
- On Participate in the package survey?, simply choose No. (We will not be installing specific packages).
- In the Software selection window, deselect all selected packages., using the spacebar and Continue.
- On Install the GRUB boot loader to the master boot reccord, select Yes.
- The cd will be ejected on the Finish the installation screen, and by selecting Continue, you can reboot into your new system.
- After the reboot, at the login prompt enter the userid root, and the password you selected. You should get an prompt with <System name> #. Use the ifconfig command to determine your current ip address.
eth0 Link encap:Ethernet HWaddr 00:0D:60:2C:B7:84
inet addr:10.1.1.81 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::20d:60ff:fe2c:b784/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:191262 errors:0 dropped:0 overruns:0 frame:0
TX packets:112927 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:224401912 (214.0 MiB) TX bytes:9874763 (9.4 MiB)
Base address:0x8000 Memory:c0220000-c0240000
- Edit the apt sources file with the command vi /etc/apt/sources.list. Commentout the line starting with deb cdrom:..... with an # at the beginning. You no longer need the cd to install packages.
- Run apt-get install openssh-server, to install the ssh server, so you can login.
- Thats all about installing the base operating system.
Getting Sipman
There are several ways to get Sipman on your system.
Get an copy or backup from an existing machine, running the folowing commands:
cd /var # this will change the directory to the /var directory.
scp -pr <serverip>:/var/sipman3 /var
ls -la # you should be able to see the directory sipman3
Get an copy from the sipman website.
- On your sipman system run the command apt-get install wget, to install wget.
- Checkout which versions are available at http://www.sipman.net/downloads/sources.
- Download the file with the command wget http://www.sipman.net/downloads/sources/sipman-yyyymmdd.tgz. The archives are created with the command tar -cvzf /tmp/sipman-20080415.tgz /var/sipman3.
- Make sure you are in the root. If neccessary run the command cd /.
- Test the file with the command tar -ztvf <filename>.
- Unpack the file with the command: tar -zxvf <filename>.
Preparation
The first recommended step for using sipman would be to start monitoring your network. Sipman has a couple of ways to discover your network, but the best way is to give Sipman snmp read access to your routers and switches. This way is can discover most of your network without any further assistance. So try to get a working snmp community string.
Link the sipman.conf file
Run ln -s /var/sipman3/main/configs/sipman.conf /etc/sipman.conf to be able to run the install script.
Dependencies and the system configuration
To install sipman (on an Debian system), follow the folowing steps.
(To install sipman on an different architecture like AIX, install the binaries mentioned in the file /var/sipman3/main/configs/sipman.conf. You will need the external commands like fping, mtr, snmpget, snmpwalk, rndc, named, dhcpd and rrdtool. After this you will need to create the links, directories etc, mentioned in the install-sipman3.sh script.)
Change within the folowing files
- /etc/snmp/snmpd.conf
#com2sec paranoid default public
com2sec readonly default public
You can change the community to whatever you feel comfortable with. Readonly will only allow readonly access to your system.
- /etc/default/snmpd
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
# by removing 127.0.0.1, the snmp deamon listenes on all ports.
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
This makes the deamon listen on all ports.
- /etc/default/tftpd-hpa
# start the tftp deamon.
RUN_DAEMON="yes"
# point the tftp boot directory to /tftpboot .
# -c allows to create files which do not exist (sipman creates random filenames)
OPTIONS="-l -c -s /tftpboot"
(Re)start the tftpserver with /etc/init.d/tftpd-hpa restart.
You can check if the tftp server is running with the command ps -ef|grep tftp.
- /etc/network/interfaces
Sample fixed config
iface eth0 inet static
address 10.1.1.90
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.1
Sample dhcp config
iface eth0 inet dhcp
Run the following steps.
- Run: /etc/init.d/snmpd restart. The server should respond with Restarting network management services: snmpd.
- Run visudo and add the content from the file /var/sipman3/main/configs/sudoers.txt. You can leave visudo with ctrl x, y followed by enter.
- Add the content from the file /var/sipman3/main/configs/crontab.txt to the file /etc/crontab (eg. cat /var/sipman3/main/configs/crontab.txt >> /etc/crontab). All background processes are started from the crontab. You can tweak the intervals as you like.
- Edit the file /var/sipman3/data/local/configs/snmp-strings.txt and add or change the line like default s1ppAr. Default means, the communitystring is tested on any devicetype, s1ppAr is a sample communitystring. The tool will test all communitystrings starting from specific (eg. if nodetype is net, try the strings of the type net, etc...) and then the default ones.
- Within Sipman, goto monitor (black bar) ==> add (grey bar) ==> Add nodes from range:: <ip adress node>. This will discover all pingable nodes on your subnet (if they are pingable).
- Then run extra (black bar) ==> starter (grey bar) ==> run-discover. After running this scrip a few times, you should have discovered a large part of your network, if your network nodes are snmp manageable.
- Edit the file /etc/logrotate.d/apache2, and change the filemask to 644, or change the group to www-data, to allow the Sipman process te read the apache log files.
Installing an dhcp/snmp node.
If you wish to use Sipman as your primary dns and dhcp tool, it is reccommended to install 2 dedicated dns/dhcp machines (either physical or virtual)
running
the service for your client. Why? There are 2 important reasons:
- Because this allows you to run your actual dns/dhcp servers on an super stable base environment, which hardly
needs any updates / care (except for the regular security fixes). The actual management system will probably get frequent updates because of
feature enhancements, bug fixes etc.. The basic dns/dhcp service code has had verry little changes over the last five years.
The last thing you want is for either of these environments to go down.
These systems can easily be run on an qemu or vmware applyance, if you don't want to install any additional hardware.
- This will allow you to run your Sipman as an hidden primary DNS server. The advantage of this approach is, your primary dns server is unknown
to your clients, which means you can move, upgrade and/or replace this system without your community ever knowing it exists.
This will also allow you to protect your primary dns system from attacks. You user don't know the system and don't need access to it, so you
can filter access to this box (eg in an management environment).
To instal such a system, follow the steps "Installing the Debian base system" and run the folowing additional steps.
- Download your copy for the Sipman dns and dhcp process from
http://www.sipman.net/downloads/sources/.
- Install this copy by running tar -zxvf <Filename> in the /var directory.
- Goto the /var/sipman/bin directory and run ./install-dns-dhcp.sh apt. This will install the neccesary dependencies.
If the install complains abaout an non authorative install, don't bother. The config files will be generated by Sipman.
|
|