Just in case anyone missed it the newest stable version of OpenOffice was just released. Everyone must have already heard as the website is down with only links to the downloads. Version 3.0 should be bringing along some new features that help it compete as an office suite. One of the biggest improvements I am looking forward to is the native office 2007 format compatibilities (docx and the like).
One thing I'm hoping for is that there is an easy way to write a group policy to skip the annoying registration screen for the install. If the past is any indication, that will not be the case and there will be a brand new work around. I'll be installing this within a week and will let people know how it went.
Tuesday, October 14, 2008
Tuesday, September 9, 2008
Firehol get-iana scripts
Wow. I just found one of the best scripts out there for cutting down the amount of Iptables commands that Firehol generates using two little Perl scripts.
First off, let me preface this by saying I am not running Debian and getting aggregate-flim setup and running was a little too difficult. But no matter, perl can be used to pull off the same functionality by aggregating the CIDR records. A big thanks to zwitterion.org.
The first script, list-iana-reserved-ranges grabs all of the IANA reserved address ranges and outputs them.
The second script, aggregate-cidr-addresses, aggregates all the addresses into larger subnets, cutting down on the amount of lines fed into iptables.
To put everything together, you just need to replace your get-iana.sh script with something that uses the perl scripts, like the following:
There you have it, updated and compact RESERVED_IPS.
First off, let me preface this by saying I am not running Debian and getting aggregate-flim setup and running was a little too difficult. But no matter, perl can be used to pull off the same functionality by aggregating the CIDR records. A big thanks to zwitterion.org.
The first script, list-iana-reserved-ranges grabs all of the IANA reserved address ranges and outputs them.
#!/usr/bin/perl -Tw
# [MJS 22 Oct 2001] List IANA Reserved ranges (for firewall purposes)
# [MJS 3 Mar 2008] IANA reformated document to use /8s and not ranges
use strict;
use LWP;
#
# Download Official IANA document
#
my $ua = new LWP::UserAgent;
my $res = $ua->get('http://www.iana.org/assignments/ipv4-address-space');
$res->is_success or die "HTTP request failed: " . $res->message . "\n";
#
# Print all the /8s.
#
print map { "$_\n" }
$res->content =~ m{ ( \d{3} \/ 8 ) .+? (?: UNALLOCATED | RESERVED ) }gx;
# $Id: list-iana-reserved-ranges,v 1.2 2008/05/17 07:00:42 suter Exp $
The second script, aggregate-cidr-addresses, aggregates all the addresses into larger subnets, cutting down on the amount of lines fed into iptables.
#!/usr/bin/perl -Tw
# [MJS 22 Oct 2001] Aggregate CIDR addresses
# [MJS 9 Oct 2007] Overlap idea from Anthony Ledesma at theplanet dot com.
use strict;
use Net::IP;
## Read in all the IP addresses from <>
my @addrs = map { new Net::IP $_ or die "Not an IP: \"$_\"."; }
map { /^\s*(.*?)\s*$/ and $1; } <>;
## Sort the IP addresses
@addrs = sort {
$a->bincomp( 'lt', $b ) ? -1 : ( $a->bincomp( 'gt', $b ) ? 1 : 0 );
} @addrs;
## Handle overlaps
my $count = 0;
my $current = $addrs[0];
foreach my $next ( @addrs[ 1 .. $#addrs ] ) {
my $r = $current->overlaps($next);
if ( $r == $IP_NO_OVERLAP ) {
$current = $next;
$count++;
}
elsif ( $r == $IP_A_IN_B_OVERLAP ) {
$current = $next;
splice( @addrs, $count, 1 );
}
elsif ( $r == $IP_B_IN_A_OVERLAP or $r == $IP_IDENTICAL ) {
splice( @addrs, $count + 1, 1 );
}
else {
die "$0: internal error - overlaps() returned an unexpected value!\n";
}
}
## Keep aggregating until we don't change anything
my $change = 1;
while ($change) {
$change = 0;
my @new_addrs = ();
my $current = $addrs[0];
foreach my $next ( @addrs[ 1 .. $#addrs ] ) {
if ( my $total = $current->aggregate($next) ) {
$current = $total;
$change = 1;
}
else {
push @new_addrs, $current;
$current = $next;
}
}
push @new_addrs, $current;
@addrs = @new_addrs;
}
## Print out the IP addresses
foreach (@addrs) {
print $_->prefix(), "\n";
}
# $Id: aggregate-cidr-addresses,v 1.3 2008/05/17 07:00:42 suter Exp $
To put everything together, you just need to replace your get-iana.sh script with something that uses the perl scripts, like the following:
#!/bin/bash
tempfile="/tmp/iana.$$.$RANDOM"
perl -Tw "/etc/firehol/list-iana-reserved-ranges" | perl -Tw "/etc/firehol/aggregate-cidr-addresses" >"${tempfile}"
echo >&2
echo >&2
echo >&2 "FOUND THE FOLLOWING RESERVED IP RANGES:"
printf "RESERVED_IPS=\""
i=0
for x in `cat ${tempfile}`
do
i=$[i + 1]
printf "${x} "
done
printf "\"\n"
if [ $i -eq 0 ]
then
echo >&2
echo >&2
echo >&2 "Failed to find reserved IPs."
echo >&2 "Possibly the file format has been changed, or I cannot fetch the URL."
echo >&2
rm -f ${tempfile}
exit 1
fi
echo >&2
echo >&2
echo >&2 "Differences between the fetched list and the list installed in"
echo >&2 "/etc/firehol/RESERVED_IPS:"
echo >&2 "# diff /etc/firehol/RESERVED_IPS ${tempfile}"
diff /etc/firehol/RESERVED_IPS ${tempfile}
if [ $? -eq 0 ]
then
echo >&2
echo >&2 "No differences found."
echo >&2
rm -f ${tempfile}
exit 0
fi
echo >&2
echo >&2
echo >&2 "Would you like to save this list to /etc/firehol/RESERVED_IPS"
echo >&2 "so that FireHOL will automatically use it from now on?"
echo >&2
while [ 1 = 1 ]
do
printf >&2 "yes or no > "
read x
case "${x}" in
yes) cp -f /etc/firehol/RESERVED_IPS /etc/firehol/RESERVED_IPS.old 2>/dev/null
cat "${tempfile}" >/etc/firehol/RESERVED_IPS || exit 1
echo >&2 "New RESERVED_IPS written to '/etc/firehol/RESERVED_IPS'."
break
;;
no)
echo >&2 "Saved nothing."
break
;;
*) echo >&2 "Cannot understand '${x}'."
;;
esac
done
rm -f ${tempfile}
There you have it, updated and compact RESERVED_IPS.
Tags:
IT
Tuesday, August 26, 2008
OTRS on windows
Today I setup OTRS on a windows server. It's always fun to work with systems designed specifically for *NIX but ported over to be usable on win32 systems.
In all actuality, things went fine and wasn't too difficult to work with. But I did run into a couple problems and thought I'd share them.
Apache config:
The pre-configured apache config that comes with the OTRS windows installer is setup to use /otrs as the home directory and also doesn't use index.pl or customer.pl as the default document. The following are the changes I made to use the base website as the host.
Aspell
Aspell is a nice feature if you aren't using a browser with built in spell checking. This also doesn't work out of the box. First of all, you need to download it. Then you need to install it making sure the path has no spaces. The default is in the "Program Files" folder, so that won't work. Then you need to go into the SysConfig and change the path to the executable.
Sendmail
The default config for the SMTP mailer uses sendmail. Well, Windows doesn't have send mail. So that was an easy fix in the SysConfig changing from sendmail to SMTP and inputting your SMTP server.
I believe those were all the major changes. One thing I am woried about though is upgrading using the installer. I believe that it will overwrite the files. I guess I'll have to worry about that when the next upgrade comes.
In all actuality, things went fine and wasn't too difficult to work with. But I did run into a couple problems and thought I'd share them.
Apache config:
The pre-configured apache config that comes with the OTRS windows installer is setup to use /otrs as the home directory and also doesn't use index.pl or customer.pl as the default document. The following are the changes I made to use the base website as the host.
ThreadsPerChild 250
MaxRequestsPerChild 0
ServerRoot "C:/OTRS/Apache2"
Listen 80
LoadFile "C:/OTRS/Perl/bin/perl58.dll"
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule perl_module modules/mod_perl.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so
<IfModule mod_perl.c>
Perlrequire C:/OTRS/otrs/scripts/apache2-perl-startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec
</IfModule>
ServerAdmin admin@site.com
ServerName otrs.site.com:80
DocumentRoot "C:/OTRS/otrs/bin/cgi-bin"
<Directory />
ErrorDocument 403 /index.pl
Options FollowSymLinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.pl index.html index.htm default.htm
</Directory>
<Directory "C:/OTRS/otrs/bin/cgi-bin">
ErrorDocument 403 /index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options FollowSymLinks ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
Order allow,deny
Allow from all
DirectoryIndex index.pl index.html index.htm default.htm
</Directory>
<IfModule dir_module>
DirectoryIndex index.pl index.html index.htm default.htm
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>
ErrorLog logs/error.log
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog logs/access.log common
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/OTRS/Apache2/cgi-bin/"
</IfModule>
<Directory "C:/OTRS/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
#------------@@Changes for OTRS@@-------------
Include "C:/OTRS/otrs/scripts/apache2-httpd-new.include.conf"
Aspell
Aspell is a nice feature if you aren't using a browser with built in spell checking. This also doesn't work out of the box. First of all, you need to download it. Then you need to install it making sure the path has no spaces. The default is in the "Program Files" folder, so that won't work. Then you need to go into the SysConfig and change the path to the executable.
Sendmail
The default config for the SMTP mailer uses sendmail. Well, Windows doesn't have send mail. So that was an easy fix in the SysConfig changing from sendmail to SMTP and inputting your SMTP server.
I believe those were all the major changes. One thing I am woried about though is upgrading using the installer. I believe that it will overwrite the files. I guess I'll have to worry about that when the next upgrade comes.
Tags:
IT
Monday, July 28, 2008
Creating PDFs through PHP
I have some experience using PDFs through a website. What we basically did was take an application, run it through an FDF generator and the results could be shown through a PDF.
How does that work? Well the FDF just stores the data for the input fields in the PDF.
There are so many problems with doing it this way though. The first being that Adobe no longer supports FDFs through their newest versions. Another is that we went through revisions in the application form in what information we took and stored. This meant that any changes in the PDF would alter the information the original FDF had stored. Thirdly, to keep the changes disparate between revisions, we would have to make a copy of the PDF, edit it, and tie all the new FDFs to the new PDF. Great, another 100+MB file to have to store.
What kept me from changing that? The company wanted to keep the PDF format for layout in printing.
What will be the solution (has not been implemented yet) is to generate real PDF's to store the information. That way the original information is preserved in the way that it was created. The tool I found for doing that is TCPDF. One of the best things I have seen about this tool is a large amount of updates. In the past couple weeks, there have already been more than 5 updates. You just gotta love that support.
I have already installed it and tested out the demos and it seems to work fantastically. The next step is to actually implement it.
I think I'll post up some more PHP tools that I like later. Please comment in on ones that you find useful or ones that you hate.
How does that work? Well the FDF just stores the data for the input fields in the PDF.
There are so many problems with doing it this way though. The first being that Adobe no longer supports FDFs through their newest versions. Another is that we went through revisions in the application form in what information we took and stored. This meant that any changes in the PDF would alter the information the original FDF had stored. Thirdly, to keep the changes disparate between revisions, we would have to make a copy of the PDF, edit it, and tie all the new FDFs to the new PDF. Great, another 100+MB file to have to store.
What kept me from changing that? The company wanted to keep the PDF format for layout in printing.
What will be the solution (has not been implemented yet) is to generate real PDF's to store the information. That way the original information is preserved in the way that it was created. The tool I found for doing that is TCPDF. One of the best things I have seen about this tool is a large amount of updates. In the past couple weeks, there have already been more than 5 updates. You just gotta love that support.
I have already installed it and tested out the demos and it seems to work fantastically. The next step is to actually implement it.
I think I'll post up some more PHP tools that I like later. Please comment in on ones that you find useful or ones that you hate.
Tags:
web
Lexy and The Onion (The princess and the pea?)
About a month ago, two of my favorite sites inked a deal in which Lexy.com will be the distributor of mobile media for TheOnion.com.
Why is this good news?
It means that Lexy is becoming a major player in mobile audio and I get to listen to TheOnion's news shorts on my cell phone.
For those that don't know, TheOnion is where I get all of my real news. Not like those other places like Fox or CNN. Oh wait, did I say real news? I meant real ENTERTAINING news. Anyway, if you haven't checked it out yet, I'd suggest doing that.
Links:
Lexy blog
TheOnion Radio News
Why is this good news?
It means that Lexy is becoming a major player in mobile audio and I get to listen to TheOnion's news shorts on my cell phone.
For those that don't know, TheOnion is where I get all of my real news. Not like those other places like Fox or CNN. Oh wait, did I say real news? I meant real ENTERTAINING news. Anyway, if you haven't checked it out yet, I'd suggest doing that.
Links:
Lexy blog
TheOnion Radio News
Tags:
web
Friday, July 11, 2008
What have we learned from the iPhone
Next year when you want to get the newest version of the "hottest" phone around, it might be a good idea to wait a couple days to go buy it.
With the stories of activation servers being down and long lines to wait in, I think things would go a bit smoother after the hustle and bustle dies down a bit.
With the stories of activation servers being down and long lines to wait in, I think things would go a bit smoother after the hustle and bustle dies down a bit.
Tags:
IT
Tuesday, June 17, 2008
Follow up on AS3 and red5
It is looking like I screwed up and didn't read the documentation properly and I am grabbing the first microphone instead of the default microphone.
I was using
and instead it should be
I think the default should be the default microphone. Doesn't that make sense?
I was using
var mic:Microphone = Microphone.getMicrophone();
and instead it should be
var mic:Microphone = Microphone.getMicrophone( -1 );
I think the default should be the default microphone. Doesn't that make sense?
Tags:
web
Friday, June 13, 2008
RTMP and Red5, how does it work?
This is just a little question I have.
How do RTMP/RTMPT audio streams work with red5 and Flash 9?
I have been searching around the internet looking for how these transport protocols work, and though I've found little snippets, I haven't found definitive answers. The main aspect that I'm looking at is the interaction between a router/firewall, the external red5 server, and the inner Flash 9 client.
I've done packet traces on a working computer and also a non-working computer using wireshark. It doesn't appear to be blocked by the firewall or router which I know have a problem with RTP. What I have come up with so far is that, on the Flash 9 client, the NetConnection will communicate perfectly, the NetStream seems to initiate, but it won't send any audio packets. Is there something I'm missing in the client?
If anyone has any answers, please feel free to post. I will keep this updated with any progress I find.
How do RTMP/RTMPT audio streams work with red5 and Flash 9?
I have been searching around the internet looking for how these transport protocols work, and though I've found little snippets, I haven't found definitive answers. The main aspect that I'm looking at is the interaction between a router/firewall, the external red5 server, and the inner Flash 9 client.
I've done packet traces on a working computer and also a non-working computer using wireshark. It doesn't appear to be blocked by the firewall or router which I know have a problem with RTP. What I have come up with so far is that, on the Flash 9 client, the NetConnection will communicate perfectly, the NetStream seems to initiate, but it won't send any audio packets. Is there something I'm missing in the client?
If anyone has any answers, please feel free to post. I will keep this updated with any progress I find.
Tags:
web
Tuesday, June 3, 2008
Open Source Helpdesk Software
I was looking around for some helpdesk software for just me to use to help me organize my tasks. I came across a few different solutions.
OTRS: This is the one that I ended up with. It is perl based, has many enterprise type features, and seems to be updated quite frequently. Another plus is that it has it's own ubuntu package, making it very easy to install. I did run across one bug during the installation where I just had to aptitude the libperl apache module.
OneOrZero: At first glance this appeared to be the one that I wanted. I tested it out and found a few bugs in a short amount of time. On top of that, it looks as though their free version isn't supported any more.
eTicket: This was actually my second choice after OneOrZero. I decided not to go with this php based software because there seem to be some big changes with their managment. I may go back later and look at this though.
OTRS: This is the one that I ended up with. It is perl based, has many enterprise type features, and seems to be updated quite frequently. Another plus is that it has it's own ubuntu package, making it very easy to install. I did run across one bug during the installation where I just had to aptitude the libperl apache module.
OneOrZero: At first glance this appeared to be the one that I wanted. I tested it out and found a few bugs in a short amount of time. On top of that, it looks as though their free version isn't supported any more.
eTicket: This was actually my second choice after OneOrZero. I decided not to go with this php based software because there seem to be some big changes with their managment. I may go back later and look at this though.
Tags:
IT
Upgrade Fedora Core Through Yum
I just went through upgrading an old machine that wasn't really doing much but didn't want to lose the setup. Found a pretty simple guide that helped me get through it painlessly. Maybe that link can help a few people out.
Recently there was a bug added to the formatting. Hopefully they will fix that soon.
Recently there was a bug added to the formatting. Hopefully they will fix that soon.
Tags:
IT
Subscribe to:
Posts (Atom)