Archive for April, 2008

Mount your Flickr account as regular Linux drive

flickr logoFlickr is an extremely popular image/video hosting website, web services suite and an online community platform. It was one of the earliest Web 2.0 applications. In addition to being a popular Web site for users to share personal photographs, the service is widely used by bloggers as a photo repository. It hosts more than two billion images.

Now it is possible to mount your Flickr account on Linux PC as a virtual filesystem, allowing you to browse through your photos as if they were on a locally connected drive.  It can be now easily done with Flickrfs:

Once mounted, it retrieves information about your photos hosted on your flickr account, and shows them as files. You can now easily copy photos from your local machine to this mount, and it will automatically upload them to your flickr account. Similary, you can copy the files from your mount to your local machine, and it will download your images from flickr.

All the files in the mount have a meta file attached to them, which provides access to title, description, tags, and license information. Modifying any of these fields and saving the meta file, will update them on the server as well.

You are lucky if you chose Ubuntu as detailed step-by-step installation guide is available at author’s site for Ubuntu users. Of course you are welcome to use it under other Linux distributions e.g. Slackware ;)

Install Ubuntu as Windows XP/Vista Application (with Wubi)

wubi logoToday it is possible to install Ubuntu Linux 8.04 (Hardy Heron) under Windows XP or Vista without necessity to create separate partition for it. The tool that allows to do it is called Wubi. Actually it is Ubuntu installer for Windows helping you ro install and uninstall Ubuntu with few clicks. Here is nice brief article on how to set it up under Vista:

Wubi adds an entry to the Windows boot menu which allows you to run Linux. Ubuntu is installed within a file in the Windows file system (c:\wubi\disks\system.virtual.disk), as opposed to being installed within its own partition. This file is seen by Linux as a real hard disk.

Sweeet! :)

OpenBSD: Secure Mail Server with Postfix, MySQL, ClamAV, SpamAssassin, Amavis-new

openbsd logoFew days ago I started configuring corporate mail server that should be deployed on OpenBSD and comprise the following features:

  1. Easy to configure and powerful MTA (Postfix)
  2. Virtual domains and user accounts (this information is stored in MySQL database)
  3. Antispam and antivirus checking for all accounts (spamassassin and clamav via amavis-new)
  4. Secure access to mailboxes through POP3, IMAP and HTTP (squirellmail)
  5. Secure SMTP server
  6. Extremal Stability and Security

Actually OpenBSD 4.2 was chosen because of it’s “security by default”. Thankfully Daniele Mazzocchio from friendly site www.kernel-panic.it wrote an excellent article about how to build such mail server on this operating system:

Offering a reliable and secure email service is probably one of the top priorities of most system administrators; therefore, in the next chapters, we will build a full-featured mail server, based on open-source software and focusing on security. Read more…

The only thing that is not covered by it is mail content filtering with maildrop and vacation messages that users often ask to set while they are out. Working on it! :)

ptunnel: send/receive TCP traffic via ICMP reliably

Yes, it can be useful sometimes. For example, you have access to Wi-Fi network but you’re not allowed to access Internet via TCP/UDP as these protocols are blocked. At the same time ICMP is opened and you can ping everything alive in Internet. So, to check your email just have ptunnel installed and work around the restrictions set by the Wi-Fi network sysadmin easily.

Ptunnel is an application that allows you to reliably tunnel TCP connections to a remote host using ICMP echo request and reply packets, commonly known as ping requests and replies. It is not a feature-rich tool by any means, but it does what it advertises. So here is what it can do:

  • Tunnel TCP using ICMP echo request and reply packets
  • Connections are reliable (lost packets are resent as necessary)
  • Handles multiple connections
  • Acceptable bandwidth (150 kb/s downstream and about 50 kb/s upstream are the currently measured maximas for one tunnel)
  • Authentication, to prevent just anyone from using your proxy

1. Install ptunnel in Ubuntu or Debian
apt-get install ptunnel

2. Start ptunnel proxy:

ptunnel -p proxy_address -lp listen_port -da destination_address -dp dest_port [-c network_device] [-v verbosity] [-u] [-x password] [-f file]

The following example assumes that ptunnel is run as root, both on the proxy and client. To tunnel ssh connections from the client machine via a proxy running on proxy.pingtunnel.com to the computer login.domain.com, the following command line would be used:

ptunnel -p proxy.pingtunnel.com -lp 8000 -da login.domain.com -dp 22

An ssh connection to login.domain.com can now be established as follows:

ssh -p 8000 localhost

P.S. A brief manual on how to use ptunnel can be got here.
P.P.S. If you are sysadmin and have to forbid Internet access to some user in LAN, don’t forget to block ICMP! :)

Tiny perl script for UDP flooding

Sometimes it is necessary to perform UDP flood towards some network device(s) in order to test its behavior in stress… Actually I am sure that every system administrator might use this small perl script for this purpose. Certainly there are many special programs for this but believe me that it is much more easier to do the following:

1. #touch > /tmp/flood.pl
2. #chmod +x /tmp/flood.pl
3. Copy the this code to /tmp/flood.pl:

4. Then /tmp/flood.pl 192.168.0.1 0 0 0, where 192.168.0.1 is IP you would like to flood with huge amount of UDP datagrams.

Thanks to Ivan Pepelnjak from http://ioshints.blogspot.com/.




Pages: 1 2 Next
Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
TuxArena: The arena of Tux | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››