seanl

Simple Configuration of iptables on Debian

leave a comment »

I do not use any GUI application to configure the network interfaces on my Linux machines. Instead, I simply edit the configuration files.

The simplest way, among many solutions found on the web, was to write a script that runs iptables with various command line switches.

So I wrote a simple script, /etc/network/if-up.d/iptables, as follows. Whenever a network interface is brought up, the scripts in /etc/network/if-up.d are executed. If the file does not exist, you can create one.

#!/bin/sh

# Flushing all rules
iptables -F
iptables -X
# Setting default filter policy
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
# Block the use of http://www-proxy:3128
iptables -A OUTPUT -p tcp --dport 3128 -j DROP

Please, refer to the man page if you desire to know what each iptables command does.

Now, all you need to do is run chmod to set the right permission.

chmod a+x /etc/network/if-up.d/iptables

Written by seanl

21/10/2009 at 18:15

Posted in system administration

Tagged with , ,

NVIDIA Research Summit

leave a comment »

  • September 30 – October 2, 2009 – The Fairmont Hotel, San Jose, California

The NVIDIA Research Summit is a cross-disciplinary forum during the GPU Technology Conference. The Research Summit is intended for researchers and students interested in using GPUs in science and engineering. Attendees new to GPU computing will learn how GPU computing can drastically increase computational power and dramatically reduce time-to-discovery; attendees already using GPU computing can learn advanced topics in GPU computing, discuss their work with NVIDIA engineers and researchers and network with each other.

For more information, visit http://www.nvidia.com/researchsummit

Written by seanl

03/08/2009 at 17:15

Posted in gpgpu

Tagged with ,

The Slides from Workshop on High Performance GPU Computing with NVIDIA

leave a comment »

The slides from Workshop on High Performance GPU Computing with NVIDIA are available at:
http://www.cse.unsw.edu.au/~pls/cuda-workshop09.

Thanks to Mark Harris, Manuel Chakravarty and Dragan Dimitrovici for the great talks, and NVIDIA and Xenon Systems for sponsoring the workshop.

Written by seanl

21/04/2009 at 16:54

Posted in gpgpu

Tagged with , ,

Workshop on High Performance GPU Computing with NVIDIA CUDA

leave a comment »

It is now open for registration.
Level 1 Seminar Room, K17, CSE, UNSW, Sydney
April 17, 2009
http://www.cse.unsw.edu.au/~pls/cuda-workshop09.

Written by seanl

02/04/2009 at 22:21

Posted in gpgpu

Tagged with , ,

xmobar battery plugin using sysfs, not procfs

with 4 comments

As the lastest kernel image (2.6.29-1) on Debian Sid did not have CONFIG_ACPI_PROCFS_POWER enabled by default, the battery plugin of xmobar, a status bar application for xmonad, stopped working.

I could easily think of two options: (1) recompile the kernel image with CONFIG_ACPI_PROCFS_POWER enabled, or (2) write a xmobar plugin that does not depend on procfs. After giving a bit of thought to it, I decided to write a xmobar plugin that does not depend on procfs. It seemed that procfs was deprecated and, in a long run, sysfs would be preferred over procfs.

The plugin, SysfsBatt.hs, has been written, and Monitors.hs has been modified.

In order to recompile xmobar with the above files, you could simply follow these steps, assuming that you are in the xmobar source directory:

  • cd Plugins/Monitors
  • wget http://www.cse.unsw.edu.au/~seanl/misc/SysfsBatt.hs
  • cd ..
  • wget http://www.cse.unsw.edu.au/~seanl/misc/Monitors.hs
  • runhaskell Setup.lhs configure
  • runhaskell Setup.lhs build
  • runhaskell Setup.lhs install

My .xmobarrc uses SysfsBatt in case an example is needed.

Written by seanl

30/03/2009 at 01:01

Posted in system administration

Tagged with , , ,

GPU Kernels as Data-Parallel Array Computations in Haskell

leave a comment »

The final version of the paper, “GPU Kernels as Data-Parallel Array Computations in Haskell”, has been sent to EPHAM 2009, which willl be held in conjunction with CGO 2009 between 22 Mar 2009 and 25 Mar 2009.

The paper can be found at http://www.cse.unsw.edu.au/~chak/papers/gpugen.pdf.

Written by seanl

18/03/2009 at 02:40

Posted in gpgpu

Tagged with , , ,