zaterdag, december 31, 2005

How to play Windows Media files on Linux

It's a sad fact that many audio and video files are distributed in Windows Media formats. Windows users don't have any much trouble playing them and even Mac users can download Windows Media Player, but what about Linux users? Well, for them there's this tutorial at AllYourTech.com. It describes how to add Windows Media support to your Linux box using the Xine media engine, the Totem movie player, and MPlayer's Essential Codecs Package. As with many things Linux, it requires a bit of typing, but looks pretty straightforward.

vrijdag, december 30, 2005

Nokia codes !

Firewall script for Linux

Hi, I managed to answer my own questions and have posted the results below in case anyone else is interested.

1) Kde/gnome locking up at their start-up screens.
Searching around it appears that X needs access to port 9000 to work correctly. I guess this must be a throwback to its client server origins. I could have opened port 9000 explicitly but in the end just gave localhost 127.0.0.1 full access. All now works as it should. I have posted the updated script at the end of this message in case anyone is interested.

2) How to configure the script for standard system startup.
A fould a very useful article from PCPlus.co.uk at:
http://davidcoulson.net/writing/pcp/167/masterclass-linuxhelp.pdf

On Red Hat systems the scripts which start or stop the various services are located in /etc/rc.d/init.d/. On other systems they may be in /etc/init.d/. These scripts are fairly straightforward and take simple ‘start, stop, restart, status’ arguments. If you take a simple example, such as the one that launches atd, you could hack it to load or kill whichever service you’re interested in. To make the service run at start-up you need to set it up to start when the machine enters the default runlevel (usually 5 if you have a graphical login under Red Hat). If you look in /etc/rc.d/rc5.d/ you’ll notice a lot of files with names like S10atd which is symlinked to ../init.d/atd. Rather than duplicating the whole script or putting a command in a script, the init process looks in /etc/rc.d/rc5.d for everything beginning with a K, in numerical order, and does filename stop. If you had K10atd and K40crond, it would stop atd first, then crond. It then looks for everything beginning with an S and does filename start.

****
iptables script:
#!/bin/bash

# block_internet_access script
# Control internet access using IPTABLES rules

case "$1" in
start)
# Apply firewall restrictions
# First set up so default policy is set to DROP
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
# Now flush out any existing rules and non-default chains
iptables -F
iptables -X
# Now allow full access to local lan only
iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
iptables -A OUTPUT -s 192.168.0.0/24 -j ACCEPT
# Allow full access for localhost, need access
# to at least port 9000 for X windows to be able
# to function
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A OUTPUT -s 127.0.0.1 -j ACCEPT
;;

stop)
# Now remove all rules and allow full access
# firewall is ineffect disabled. This is safe
# when behind a hardware firewall interface
# to the internet

# Now flush out any existing rules and non-default chains
iptables -F
iptables -X
# Set up default policy to ACCEPT
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
;;

restart)
# First set up so default policy is set to DROP
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
# Now flush out any existing rules and non-default chains
iptables -F
iptables -X
# Now allow full access to local lan only
iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
iptables -A OUTPUT -s 192.168.0.0/24 -j ACCEPT
# Allow full access for localhost, need access
# to at least port 9000 for X windows to be able
# to function
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A OUTPUT -s 127.0.0.1 -j ACCEPT
;;

*)
echo 'Only start, stop and restart arguments with this script'
exit 1
;;
esac
exit 0
;;

donderdag, december 29, 2005

Free Online Web Proxy

Hide My Ass is a free online web service which offers users to browse the web anonymously. If you are at work and need to access a filtered web site, simply use our free service to bypass the network filter.
http://www.hidemyass.com/
http://www.securetunnel.com/

woensdag, december 28, 2005

HOWTO Change Windows XP Home to Windows XP Pro

yes indeed, you can’t change an installed Windows but only your Installation CD (or even a recovery CD in case the manufacturer had not left out important parts)

Here’s the detailed breakdown you asked for.

1. Copy the root directory and the i386 directory of the WindowsXP CD
to your harddisk
2. Extract the Bootsector of your WindowsXP CD
3. Change 2 Bytes in i386\Setupreg.hiv :
a) Open Regedit
b) Highlight HKEY_LOCAL_MACHINE
c) Menu: File -> Load Structure -> i386\Setupreg.hiv
d) Assign an arbitrary name to the imported structure e.g. “Homekey”
e) Goto HKEY_LOCAL_MACHINE\Homekey\ControlSet001\Services\setupdd
f) edit the binary key “default” and change “01” to “00” and “02” to
“00”
g) Highlight “Homekey” and select menu: File -> unload structure
4. Burn your new XP Pro CD
5. Install WindowsXP as usual. Your XP Home Key will work.

Note: You cannot apply SP2 to such a WindowsXP Pro, so step 1.b)
might be to integrate SP2 in your Installation CD

Please check the menu-entries as I don’t owe an English copy of
XP and have to guess them.

dinsdag, december 27, 2005

List of open source software packages

This is a list of open-source software packages: computer software licensed under an open-source license. Software that fits the Free software definition may be more appropriately called free software; the GNU project in particular objects to their works being referred to as "open source"
http://en.wikipedia.org/wiki/List_of_open-source_software_packages

donderdag, december 22, 2005

Making files immutable on Linux !

Here’s a pretty cool and quick Linux tip. There may come a time when you have some files on your Linux box which you would like not to be able to delete for whatever reason, even by the root user. If so, open a shell window, log in as root and type chattr +i file where file is the name of the file you’d like to make immutable (read: undeletable). If you ever want to reverse this, just follow the same process but replace +i to -i. Please note this only works if you’re using the Ext2 or Ext3 filesystems.