Aici veti gasi detalii tehnice despre cum se pot realiza configurari software+ hardware.
Here you can find tehnical details about software/hardware configuration.

miercuri, 12 iunie 2013

From KMail to Thunderbird

Preparation

        Before you start, make sure you have the full backup. Sure, the chance is nothing would go wrong, but if it would, the backup would be something which would save your day.
Shut down the KMail process if you have it running. Make sure it has finished, not just disappeared. There was a bug when KMail IO slaves were kept running in the background even after KMail was closed, and kept updating the mail folder. You do not want any external modifications to your mail folders while you’re converting the emails.
Install Thunderbird and configure just one e-mail account (it will guide you through the account configuration upon the first start). If you use POP3 access, make sure that you click on “Advanced config” button and under the  ”Leave messages on server” uncheck the “For at most 14 days” box. This will ensure you won’t lose any emails if the conversion goes wrong and you want to get back to your previous configuration. You need this so Thunderbird creates a profile directory and you’ll know where your email will be stored.
Now close Thunderbird as well as you do not want it to modify the e-mail folders you’re converting email into.



Converting your old emails

           Before proceeding through this chapter check whether you need to convert your emails at all. If you’re using IMAP protocol to access your email, and all your emails are stored at server, you do not need to convert anything at all. All you need to do is login into your account in Thunderbird and synchronize emails with the server. Then you can proceed to customization.
If you previously configured your KMail to keep the e-mail in Maildir in MBOX format, you’re lucky and you do not have to convert anything. Just copy your mbx files to the Thunderbird mail directory which you can find in the Account Settings for your account in the Server Settings submenu.
Now if you’re like me and you used POP3 to retrieve all your e-mail from the server, and have your email stored in Maildir – you need to convert it to mbx format for Thunderbird to understand. There are zillions of scripts for this task, and after trying twenty or so of them I found a Python script kmail2thunder.py. This script even generates the Thunderbird folder structure which is very helpful when you have a complex one. Download the script, and execute it passing the -k switch followed by the path to KMail Maildirs directory, the -e switch followed by the path to Thunderbird mail directory and -i ” switch to indicate we want to convert inbox, outbox, sent and trash folders:

 python /tmp/kmail2thunder.py -k /home/radut/.kde4/share/apps/kmail/mail -e /home/radut/.thunderbird/mhbphysz.default/Mail/Local -i ''


        Note that I passed the path to the subdirectory which belongs to this specific account, as I’m converting the mail account by account. Of course you need to have Python installed (you can uninstall it after conversion if this is an issue for you, don’t worry).
After the script succeeds you should have the emails converted to MBOX format and stored in the Thunderbird folder. Start Thunderbird and see your old mailboxes intact. Note that the first start may take longer than usual since Thunderbird needs to index your mail.
If you’re happy with the conversion result, add the rest of your accounts and convert the rest of emails.
source

vineri, 22 martie 2013

Filter multicast on dd-wrt


insmod ebtables
insmod ebtable_filter

iptables -I FORWARD -m pkttype --pkt-type multicast -i br0 -s ip_source -j DROP
iptables -I FORWARD -m pkttype --pkt-type multicast -i br0 -s ip_source2 -j DROP

joi, 21 martie 2013

Cisco recovery password (8xx series)

Work for these Cisco routers:
  
  • Cisco 806 Series Router
  • Cisco 826 Series Router
  • Cisco 827 Series Router
  • Cisco 828 Series Router
  • Cisco 831 Series Router
  • Cisco 836 Series Router
  • Cisco 837 Series Router
  • Cisco 881 Series Router

=============================================
Send BREAK after power on the router.
In HyperTerminal CTRL+BREAK
In Minicom CTRL + A + F

C850 series (Board ID: 4-149) platform with 65536 Kbytes of main memory

rommon 1 > confreg 0x2142

You must reset or power cycle for new config to take effect
rommon 2 > reset   (this command will reset the router)
rommon 3 >
System Bootstrap, Version 12.3(8r)YI2, RELEASE SOFTWARE
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2005 by cisco Systems, Inc.

........................

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: no


Press RETURN to get started!

Router>
Router>ena
Router#
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#config-register 0x2102
Router(config)#
Router(config)#^Z    (CTRL+Z)

==========================
 If you wish to save old configuration:
Router#copy startup-config running-config
Router#conf t
Router(config)#enable secret cisco
Router(config)#^Z
Router#wr
 [OK]
 ==========================
Router#wr
 [OK]
Router#
Router#reload
Proceed with reload? [confirm]





marți, 19 februarie 2013

How do I get ISC DHCP to log to its own file?

How do I get ISC DHCP to log to its own file?

The ISC DHCP server normally does its logging via syslog. By default, it will log all messages with the facility of LOG_DAEMON. This will mix up all the DHCP log entries with all other daemons on your system. These messages will typically end up in the /var/log/messages or /var/adm/messages file, depending on your system.

To make the server log extra lease information (such as requests, sends, etc.) to /var/log/messages, make sure the following line is near the top of your configuration file (dhcpd.conf). This entry appears in the default dhcpd.conf.sample file.

cd /usr/local/etc
vi dhcpd.conf
log-facility local7;


You can actually put any log facility in that line..

Now to tell syslog where to copy this new data, which will now include extra information such as DHCP requests, sends, etc. Create the new log file in the desired location:

touch  /var/log/dhcpd.log

Add the following lines to the /etc/syslog.conf file:
# dhcp log
!dhcpd
*.* /var/log/dhcpd.log

Note that there are TAB characters between the facility and the filename, in this example. This may or may not be important. See the syslog man page on your system for more details. Don't forget to restart syslog after making this change.

Also, you may want to have your DHCP logs rotated along with your other logs. Since this is specific to each platform, we won't cover the details of this here. Look in root's crontab for the weekly log rotation script.
- N.
To restart the syslogd service under FreeBSD, do a ps  -aux to find the PID of the process and stop it with a kill  -9   pid. To start the service, run /usr/sbin/syslogd  -s

source

joi, 17 ianuarie 2013

A simple test for damaged disks

WARNING !!! ... This test will destroy the partition table and the beginning of the first partition. It can be done only as a last resort.


dd if=/dev/urandom of=test.img bs=65536 count=16

cat test.img > /dev/daX

dd if=/dev/daX of=test_rb.img bs=65536 count=16

diff test.img test_rb.img

If these files differs you have problems with disk.
source

sâmbătă, 5 ianuarie 2013

How to move centos system on a large disk

Hard Disk Upgrade Mini How-To

Instructions for PXE booting FreeBSD 9.x


There have been some changes in how PXE booting works with the release of FreeBSD 9.0. So I wanted to share some of what needs to be done to boot FreeBSD 9.0 via PXE.
The quick notes for people that have done PXE booting on prior versions of FreeBSD is:
  • mfsroot is gone, so no config needed in /boot/loader.conf (i.e. it should be empty).
  • Copy over the new pxeboot binary to your TFTP space, the old one will not work.
See below for a guide on how to get this working.

PXE Booting Guide

Prep the PXE Boot Server host

This is where the DHCP server, NFS Server and PXE Boot server will live. They could all easily live on different machines.
  1. Download the FreeBSD 9 disc1 ISO from here: http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/9.0/
  2. Create a directory to store the files in:
    # mkdir /usr/public/freebsd90-amd64
  3. Attach the iso as a device:
    # mdconfig -a -t vnode -f FreeBSD-9.0-RELEASE-amd64-disc1.iso
  4. Mount the device:
    # mount_cd9660 /dev/md0 /mnt
  5. Copy the files over:
    # cp -R /mnt/* /usr/public/freebsd90-amd64
  6. Unmount the device:
    # umount /mnt
  7. Detach the device:
    # mdconfig -d -u 0
  8. Comment out the etc/fstab entry to mount from the cdrom media:
    # vi /usr/public/freebsd90-amd64/etc/fstab
  9. Export the Directory via NFS in /etc/exports:
  10. /usr/public/freebsd90-amd64 -ro
  11. Wiew my article 

    Setup a NFS server on FreeBSD

       about how setup/run NFS Server.
  12. Restart the mount daemon:
    # pkill -HUP mountd
  13. Create a Directory for tftp files:
    # mkdir /usr/public/tftp
  14. Enable tftp in /etc/inetd.conf:
    tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /usr/public/tftp
  15. Enable inetd in /etc/rc.conf:
    inetd_enable="YES"
  16. Start inetd:
    # /etc/rc.d/inetd start
  17. Copy over the pxeboot file to the tftp area:
    # cp /usr/public/freebsd90-amd64/boot/pxeboot /usr/public/tftp
  18. Configure DHCPd:
    host fbsd9pxe {
     hardware ethernet xx:xx:xx:xx:xx:xx;
     fixed-address 192.168.1.45;
     next-server 192.168.1.10;
     filename "pxeboot";
     option root-path "/usr/public/freebsd90-amd64/";
    }
  19. Enable DHCPd in /etc/rc.conf:
    dhcpd_enable="YES"
  20. Start DHCPd:
    /usr/local/etc/rc.d/isc-dhcpd start
Modify the IP addresses and the MAC Address as needed for the environment in dhcpd.conf.

Boot your system

If everything went well you should be presented with the Installer ready to go.
source

vineri, 4 ianuarie 2013

Setup a NFS server on FreeBSD

Lets begin:

  1. % su
  2. # echo 'nfs_server_enable="YES"' >> /etc/rc.conf
  3. # echo 'rpcbind_enable="YES"' >> /etc/rc.conf
  4. # echo 'mountd_flags="-r"' >> /etc/rc.conf
  5. # echo 'rpc_lockd_enable="YES"' >> /etc/rc.conf
  6. # echo 'rpc_statd_enable="YES"' >> /etc/rc.conf
By passing these options we guarantee that NFS related daemons are started at boot time. Steps 2 to 4 are mandatory and enable the NFS daemons, steps 5 and 6 are optional and are used to guarantee file locking operations over NFS and monitor NFS client so that the NFS server can free resources when the host disappears.

Lets proceed by identifying what we want to share:
  1. % su
  2. # vi /etc/exports
  3. add the following line:
/usr/ports/distfiles -network 192.168.1 -mask 255.255.255.0
Step 3 shares the /usr/ports/distfiles directory and make it available to any client with an IP address beginning in 192.168.1 and netmask of 255.255.255.0.

Now that we've enabled the NFS server settings and configured the exports file, lets start the server by:
  1. % su
  2. # rpcbind
  3. # nfsd -u -t -n 4
  4. # mountd -r
If you perform any changes changes to the exports file, reload it by:
  1. % su
  2. # /etc/rc.d/mountd onereload
Also, the showmount command can be used to display the exports on the server:
  1. % su
  2. # showmount -e

source

Map


Visitor Map