How do I upgrade from x86 to x64 without losing settings

http://askubuntu.com/questions/6176/how-do-i-upgrade-from-x86-to-x64-without-losing-settings 1) Backup your /etc and /home folders (I have /home as its own partition, you may need more folders if you have any custom folders… or /var/www if you have Apache, maybe backup databases if you had any). You may use for example fsarchiver. 2) Run dpkg –get-selections > installed-software to save the list … Read more

How to setup OpenVPN with bridging on Ubuntu 12.04

https://help.ubuntu.com/12.04/serverguide/openvpn.html http://ubuntuguide.org/wiki/OpenVPN_server # Setup your router to forward port 1194 to OpenVPN server or place server in DMZ (all incoming traffic is forwaded to OpenVPN server) # install OpenVPN and bridge utilities apt-get -y install openvpn bridge-utils # setup bridge br0 interface and modify primary interface eth0 (assign eth0 IP address to br0 interface) /etc/network/interfaces … Read more

Postfix SMTP Authentication

http://linux.about.com/od/ubusrv_doc/a/ubusg29t05.htm http://www.jimmy.co.at/weblog/?p=52 apt-get install sasl2-bin libsasl2-2 libsasl2-modules Configure Postfix to do SMTP AUTH using SASL (saslauthd): postconf -e 'smtpd_sasl_local_domain =' postconf -e 'smtpd_sasl_auth_enable = yes' postconf -e 'smtpd_sasl_security_options = noanonymous' postconf -e 'broken_sasl_auth_clients = yes' postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination' postconf -e 'inet_interfaces = all' echo 'pwcheck_method: saslauthd' > /etc/postfix/sasl/smtpd.conf echo 'mech_list: plain login' > … Read more

Remove all unused kernels in debian based systems

http://www.unixmen.com/remove-all-unused-kernels-with-1-command-in-debian-based-systems/ sudo apt-get remove $(dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`) If it doesn’t work, try this: dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge http://www.commandlinefu.com/commands/view/10520/remove-all-unused-kernels-with-apt-get

OpenWRT Boot from USB device

http://www.nslu2-linux.org/wiki/OpenWRT/BootFromUsbDevice This guide covers fast (12mbit/s) USB and ext2 filesystem only. Make sure you install package kmod-usb2 and load module ehci-hcd or your disk will be (very, hdparm -t < 12,5mbit/s) slow. This tutorial is for OpenWRT (kamikaze, backfire) with 2.6 kernel, but it will probably work for other devices too running OpenWRT on a ... Read more

How to setup OpenVPN with bridging on OpenWRT

http://wiki.openwrt.org/doc/howto/vpn.openvpn opkg update opkg install openvpn openvpn-easy-rsa Or if you prefer configure openvpn via GUI: opkg install luci-app-openvpn /etc/easy-rsa/vars export EASY_RSA="/etc/easy-rsa" export OPENSSL="openssl" export PKCS11TOOL="pkcs11-tool" export GREP="grep" export KEY_CONFIG=`/usr/sbin/whichopensslcnf $EASY_RSA` export KEY_DIR="$EASY_RSA/keys" echo NOTE: If you run ./clean-all, I will be doing a rm -rf on $KEY_DIR export PKCS11_MODULE_PATH="dummy" export PKCS11_PIN="dummy" export KEY_SIZE=1024 export CA_EXPIRE=3650 … Read more

Samba server and client configuration in Debian

http://www.debianhelp.co.uk/samba.htm http://julien.herbin.ecranbleu.org/samba_client_howto/ Samba server configuration apt-get install samba samba-client Check an smb.conf configuration file for internal correctness. testparm Look what services are available on a server. smbclient -L //server -U username /etc/samba/smb.conf [global] workgroup = WORKGROUP server string = %h server (Samba %v) dns proxy = no log file = /var/log/samba/log.%m max log size = … Read more

HOWTO: NFS Server/Client

http://ubuntuforums.org/showthread.php?t=249889 I found using NFS just as easy if not easier than using Samba for sharing between a few of my Unix based systems. In order to share a folder it only required a single line in a configuration file under /etc/exports, and a single line under /etc/fstab on the client to mount the share … Read more

How to install Linux Mint from the USB stick

http://community.linuxmint.com/tutorial/view/744 Using the Terminal It is really simple. Go to a Terminal and type: sudo dd if=~/Desktop/linuxmint.iso of=/dev/sdx oflag=direct  bs=1048576 Where ‘~/Desktop/linuxmint.iso’ is the name and location of your downloaded image (located at the desktop in this example) and ‘/dev/sdx’ is the target USB drive. If your system doesn’t support ‘oflag=direct’, you can just leave it … Read more

SSH Server configuration

Change following settings: /etc/ssh/sshd_config Port 22 Protocol 2 PermitRootLogin no RSAAuthentication yes PubkeyAuthentication yes PermitEmptyPasswords no X11Forwarding yes UsePAM yes UseDNS no