Search

Tuesday, 3 November 2009

ImageMagick

Been using this lately, you sometimes forgot just how quick and powerful linux command line utils are.

http://www.imagemagick.org/script/convert.php

Thursday, 15 October 2009

Linux - join PDF files using ghostscript

Just open a bash window and use a command similar to the following, where finalfile.pdf is the resultant file you need and file1.pdf etc are the single pages you wish to join together.


gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finalfile.pdf file1.pdf file2.pdf file3.pdf

Friday, 9 October 2009

Cisco ASA - Can connect via VPN but cannot ping or connect to anything

If you have the above problem you need to check the following line in the firewall config:
No crypto  isakmp nat-traversal

If this line exists, then change it too:

crypto  isakmp nat-traversal

Wednesday, 7 October 2009

ORF - Exchange anti-spam

http://www.vamsoft.com/orfee_overview.asp

Open DNS

Just been reintroduced to opendns. Had heard of it before but forgot how useful it could be. If you are having problems with your ISP's DNS then switch to this instead. Once you have an account you can use the filtering options as well. Particularly good if you have kids.
https://www.opendns.com/start/

Tuesday, 6 October 2009

Linux sound problems on Asus A7U laptop

I've had an Asus A7U for about a year now and could take no more of Vista 'Ultimate'. I waited on the service packs etc but still so sloooowww.
Decided over the last few months to try various flavours of linux, all worked blindingly quick with one underlying theme, no sound whatsoever!
I've tried various fixes but at last found the definitive method. Thanks to Stéphane Gaudreault at http://monespaceperso.org/blog-en/2009/08/31/upgrade-alsa-1-0-21-on-ubuntu-jaunty-9-04/ for his Alsa upgrade howto.
I'm currently running Mint 7
Follow these steps to hopefully get sound working on your Asus.
Upgrade Alsa
Open a terminal window and check what version of Alsa you have:
cat /proc/asound/version
Stop Alsa running:
sudo /etc/init.d/alsa-utils stop
Run the following commands or create a shell script from this:
# install the necessary tools to compile along with the kernel headers
sudo apt-get -y install build-essential ncurses-dev gettext xmlto
sudo apt-get -y install linux-headers-`uname -r` libncursesw5-dev
# download alsa-driver, alsa-lib and alsa-utils
cd ~
rm -rf ~/alsa*
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.21.tar.bz2
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.21a.tar.bz2
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.21.tar.bz2
sudo rm -rf /usr/src/alsa
sudo mkdir -p /usr/src/alsa
cd /usr/src/alsa
sudo cp ~/alsa* .
# Unpack the 3 tar files
sudo tar xjf alsa-driver*
sudo tar xjf alsa-lib*
sudo tar xjf alsa-utils*
# We compile and install alsa-driver
cd alsa-driver*
sudo ./configure
sudo make
sudo make install
# We compile and install alsa-lib
cd ../alsa-lib*
sudo ./configure
sudo make
sudo make install
# add symbolic links
sudo ln -s libpanelw.so.5 /usr/lib/libpanelw.so
sudo ln -s libformw.so.5 /usr/lib/libformw.so
sudo ln -s libmenuw.so.5 /usr/lib/libmenuw.so
sudo ln -s libncursesw.so.5 /lib/libncursesw.so
# We compile and install alsa-utils
cd ../alsa-utils*
sudo ./configure
sudo make
sudo make install
# remove the 3 tar files
rm -f ~/alsa-driver*
rm -f ~/alsa-lib*
rm -f ~/alsa-utils*
echo Please reboot your computer


Once rebooted run the following to check you have upgraded OK:
cat /proc/asound/version
Finally run:
sudo alsaconf
Once this is done carry out the following:
Open a terminal window and enter the following command:
gksudo gedit /etc/modprobe.d/alsa-base.conf
Add the following line at the end of the alsa-base file and save the change:
options snd-hda-intel model=auto


Monday, 5 October 2009

The DUDE! - network analysis

If you want to find out what is connected where then this app does a pretty good job.

http://www.mikrotik.com/thedude.php

Run Linux boot processes in parallel


This runs boot processes in parallel if you have a DUAL (or more) CORE PROCESSOR
edit the following file with root permissions:
/etc/init.d/rc
Find the following line:
CONCURRENCY=none
and replace none with shell

Wednesday, 30 September 2009

Open CMS

I've been looking for an open CMS system, as an alternative to Sharepoint. Only thing I've found so far is:

http://typo3.com/

Tuesday, 29 September 2009

Exchange 2007 - spam from your own domain



Obviously, this is coming from a spammer who has spoofed your email address, or that of someone else from your domain. Unfortunately, SMTP- the protocol that allows mail clients and servers to exchange email, allows headers to be spoofed easily.
In Exchange 2007, Accepted Domains tell Exchange which domains to accept email for. If a domain – e12labs.com in this example, exists as an Accepted Domain, there is no reason external senders should use that domain in the MAIL or FROM headers.
You may have remote POP3/IMAP4 users who use SMTP to send mail. However, such sessions should be authenticated, and preferably use a separate Receive Connector.
Thanks to the extensive Transport Permissions model in Exchange 2007, we can easily prevent such spam. Receive Connectors have the ms-exch-smtp-accept-authoritative-domain-sender permission which dictates whether an Accepted Domain can be used in the MAIL or FROM headers. External/internet hosts submit mail to your server without authentication, as anonymous senders. To prevent anonymous senders from sending mail using your domain(s), we need to remove the ms-exch-smtp-accept-authoritative-domain-sender permission assigned to them.
Use the following command to remove the ms-exch-smtp-accept-authoritative-domain-sender permission from NT Authority\Anonymous Logon on internet-facing Receive Connector(s):
Get-ReceiveConnector “My Internet ReceiveConnector ” | Get-ADPermission -user “NT AUTHORITY\Anonymous Logon” | where {$_.ExtendedRights -like “ms-exch-smtp-accept-authoritative-domain-sender”} | Remove-ADPermission
Once this permission is removed, when anonymous senders try to submit mail using your Accepted Domain(s), here’s how the SMTP conversation goes:
220 E12Postcard.e12labs.com Microsoft ESMTP MAIL Service ready at Wed, 3 Sep 2008 06:22:43 -0700
helo
250 E12Postcard.e12labs.com Hello [172.31.0.170]
mail from:jadams@e12labs.com
550 5.7.1 Client does not have permissions to send as this sender
Exchange stopped spoofing of P1/envelope headers. Let’s continue the session and try to spoof the P2 headers (the ones in the DATA part of the message) – maybe that’ll work!
mail from:someone@someotherdomain.com
250 2.1.0 Sender OK
rcpt to:jadams@e12labs.com
250 2.1.5 Recipient OK
data
354 Start mail input; end with.
from:jadams@e12labs.com
subject: Header spoofing
This is how we spoof headers, spoof headers.
.
550 5.7.1 Client does not have permissions to send as this sender
quit
221 2.0.0 Service closing transmission channel

Setup SSH without a password


Using the below steps, you can ssh to the server from client without the entering any password.
The machine which run the ssh command is the client
The machine that the client access using ssh is the server
  1. Run the following command on the client
    • -> ssh-keygen -t dsa

  2. File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
  3. Copy id_dsa.pub to the server’s .ssh directory
    • -> scp $HOME/.ssh/id_dsa.pub user@server:/home/user/.ssh

  4. Change to /root/.ssh and create file authorized_keys containing id_dsa content
    • -> cd /home/user/.ssh
    • -> cat id_dsa >> authorized_keys

  5. You can try ssh to the server from the client and no password will be needed
    • -> ssh user@server

Another alternative to the above steps is to use ssh-copy-id command. The steps are:
  1. Run the following command on the client
    • -> ssh-keygen -t dsa

  2. File id_dsa and id_dsa.pub will be created inside $HOME/.ssh
  3. Copy the id_dsa.pub to the server’s .ssh directory
    • -> ssh-copy-id -i ~/.ssh/id_dsa.pub user@server

  4. You can try ssh to the server from the client and no password will be needed
    • -> ssh user@server