Archive

Archive for the ‘Linux’ Category

Use an SSH proxy to access the internet around a firewall

May 7th, 2009 No comments

I was using an ESX Server as an SSH tunnel to access the webpage of one of my VMs that was on a different network than my laptop today and I thought it might be useful for people.  Particularity if you want to set up a proxy server to access the internet via a Linux system you might have running outside of your corporate firewall. This would be very useful to access sites that are blocked by your company or use it to download bittorrents etc.

What you need is

  • A Linux system on the internet (running at home, a cheap VM (like this site is running on rapidvps.com, or maybe one running on VMware Workstation at home), or maybe your home router)
  • Putty (or a console shell if using Linux)
  • A Web Browser (or any application you want to access the internet, like bittorrent or whatever).

Windows:

  1. First you need to have SSH access to your Linux system. Not necessarily root.
  2. Use Putty to create a connection to your system. But before you connect look at the options on the left.
  3. Select SSH > Tunnels
  4. Here enter a source port of 1080 and select the Dynamic Radio button.
  5. Select add.tunnelport
  6. Next open your session to your linux system
  7. Configure your application to use a Socks proxy over port 1080. For example in Firefox  select Tools > Options > Advanced > Network > Settings and configure it to use a SOCKS proxy as below.

Linux:

  1. First you need to have SSH access to your Linux system. Not necessarily root.
  2. Open an SSH session to your system using the following syntax ssh -D 1080 user@mylinux
  3. Configure your application to use a Socks proxy over port 1080. For example in Firefox select Tools > Options > Advanced > Network > Settings and configure it to use a SOCKS proxy as below.

firefox

X Forwarding:

Also Linux has a cool feature called X Forwarding. If you open a session to a Linux server from a Linux server (or using a program like Exceed in Windows) using the X flag i.e. ssh -X user@mylinux then you can simply open the GUI of the web browser on the remote machine. I use this for bittorrent.

For example there is not much use in proxying bittorroent to my machine in work. I’d mush rather have it downloaded at home. So I ssh -X to my server at home. Run the command ktorrent & and hey presto the Ktorrent GUI opens on my machine in work, but is running at home. So anything I download will be saved at home. Cool eh?

Categories: Linux, VMware Tags:

Images missing after moving WordPress folder

April 29th, 2009 No comments

wpfordummiesI have a few websites running in this server. One of them is the Riverside Crew MCC site my brother runs. I moved it from one folder to the other on my server. When I did a lot of the images no longer worked. It turns out that you need to manually specify the folder that stores images in wordpress. Since I moved all of the blog to a new folder that location no longer existed. So obviously I updated the location in Settings > Miscellaneous (Not Settings > Media as you would expect). However that didn’t work either.

Looking at the links where the images used to be I can see that it still points to the old location. So it looks like when you change that settings it is for any images you are going to upoad. It doesn’t update old links. After a bit of Googling a figured out that you will have to update each link in the database individually. It explains how this is achieved on the WordPress site.

However I found an easier solution. I simply created a shortcut in the old location pointing to the new location. For example I moved the wp-contents/images folder from /var/www/html/site/wp-content/images to /var/www/html/site/blog/wp-content/images. So all I needed to do was create a link in the old location pointing to the new location. Once that was done everything worked fine again. Without having to mess around in the database!

First I recreated the wp-content folder in the old location

mkdir /var/www/html/site/wp-content

Then I changed to this directory

cd /var/www/html/site/wp-content

Then I created the link to the new images folder

ln -s  /var/www.html/site/blog/wp-content/images images

And voilá!

Categories: Blog, Linux Tags:

Disabled Pop Up Image

October 14th, 2008 No comments

I had to disable the pop up images on the main page as they were messing with Internet Explorer. Every time you tried to access the main page you got an error saying that Internet Explorer could not open the page. Even though it clearly opened in the background. I am not sure why that happened as it works fine in the Gallery section and also in Firefox, Opera etc.

I think there is a patch out there to fix IE but I can’t really expect everyone to install that just to view my site. So I’ve disabled pop up images. Which is a pity because I really liked them. Ah well, maybe if I can spend a little time looking into it I might find a workaround.

Anyway to all you IE users, welcome back (and use Firefox!) :) Sorry it took so long for me to discover that there was a problem but I use Linux.

After a little looking around I found a Microsoft IE Bug explaining the issue. It looks like it’s an issue with putting the Java script in a Div container.Unfortunately I use them to display entries (such as this one) so that’s not easy to workaround.

Categories: Blog, Linux Tags:

Success M1530

April 18th, 2008 6 comments

KUbuntu LogoJust got all of my hardware working on my new laptop under KUbuntu,  fingerprint reader logins, Webcam, sound, media buttons, remote control, microphone everything. Also stopped the dreaded media button from overwriting Grub everytime it’s pressed.

I am disappointed that the sepakers and the microphone on the laptop are such terrible quality, especially for a “multimedia” laptop.

I’ll post the steps I took to get everything working as soon as possible. But when KUbuntu comes out in a few days with KDE4 I don’t know how much will be relevant. Maybe I’ll just wait until then.

Categories: Linux Tags:

New Laptop

April 9th, 2008 7 comments

Got my new laptop today! A very shiny Dell XPS M1530. It looks good so far. Click here for a good look at it.

It came with Vista (yuck) pre-installed. Seems wicked fast so far. The only thing I am still trying to get the hand of is the finger print reader. It doesn’t like me. Oh and it has no modem so when I am back in Millstreet it looks like surfing the net is out of the questions.

I think I am going to leave Vista on a partition so I can play games and maybe use some of the Media Centre functions but as all of my Music and Videos are going to be in a soon to be install KUbuntu partition I don’t know how useful that is going to be. Maybe there is a way Vista can read ext3 so I can use them. We’ll see.

I am going to install KUbuntu on it soon and I’ll update the blog with any issues I have in the hope it may help someone else.

Categories: Linux Tags:

ESX – Find large files in the Service Console

April 9th, 2008 No comments

ESX BoxGot a few cases in work over the last few week where people are finding the root file system full in VMware ESX Server. This causes lots of issues with connectivity to VirtualCenter etc. The problem is that often it is difficult to find the large files that are causing the file system to fill up. I’ve been sending people this handy little script to help them so I thought I’d share it with everyone.

find / -path '/vmfs/*' -prune -o -size +10240000c -exec du -h {} \;

This searches the ESX ignoring the VMFS file system. For standard Linux you can put whatever you want in place of VMFS and it will ignore that folder.

Categories: Linux, VMware Tags:

Funny Linux Beep Prank

April 1st, 2008 3 comments

BeepHere’s one for Aprils Fools. install the “beep” program on your Linux box and then run this while you are out to lunch. It will play a series of random beeps over random intervals and will drive your co-workers mad!

while true; do sleep $(($RANDOM/1000)) && beep -f 2000 -l $(($RANDOM/100)) ; done

Categories: Funny, Linux Tags:

Convert wma to mp3

March 25th, 2008 4 comments

iPod ShuffleThis is a little script I use to convert wma to mp3 in Linux. Thought I would share it with the world.

for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader "$i" && lame -m j -h --vbr-new -b 160 audiodump.wav -o "`basename "$i" .wma`.mp3"; done; rm -f audiodump.wav

Categories: Linux Tags:

Music firms take Eircom to court over downloads

March 11th, 2008 5 comments

Pirate BayI read the following in the Examiner and on Digg today about the Music Industries trying to force Eircom to filter my internet connection and limit my bandwidth.

A) Why should any ISP monitor traffic. I don’t want anybody monitoring any of my activies be they on the internet or elsewhere. I value my privacy. Not that I have anything to hide mind I just don’t trust the competence of the people holding this data.
Also I download legal files using torrents etc. so why should I suffer downloading these files because people choose to use that technology to download copyrighted material?

B) Why is downloading movies “hogging bandwidth”? I paid for my DSL line. Why shouldn’t I use it. I think this is why this action will never win. If Eircom limit the bandwidth you can use for torrents etc. people won’t need bigger, and more expensive connections, and Eircom will lose money.

So to save this money Eircom will fight tooth and nail. Which is good news for the rest of us.

From The Examiner:
——————
As CD sales on the Irish market continue to plummet, showing losses of €44 million in the past six years, four of the largest record companies have taken Eircom to the High Court over illegal music downloads.

In the first case of its kind, the record companies are taking on the primary internet service provider rather than individual so-called pirates.

The music industry estimates that for every single legal download there are 20 illegal ones. Latest figures show that on a global scale 20 billion music files were illegally downloaded in 2006.

Because of illegal downloading and other market factors, the Irish music industry is experiencing “a dramatic and accelerating decline” in income, said Willie Kavanagh, managing director of EMI records (Ireland) and chairman of the Irish Recorded Music Association.

The Irish market for sound recordings suffered a decline in total sales from €146m in 2001 to €102m last year, a fall of 30%, he said.

A substantial portion of the decline in sales could be attributed to illegal downloading services and the increasing availability of broadband internet access here, said Mr Kavanagh.

He said legal actions brought against persons with the highest numbers of illegal files on their computers at specific times had proven very costly and time consuming. The companies believed selective legal action was not sufficient to safeguard their property rights.

The four leading record labels — EMI, Sony, Universal and Warner — have brought the High Court action aimed at compelling Eircom, as the largest broadband internet service provider in the state, to take specific measures to prevent its networks being used for the illegal free downloading of music.

The companies are challenging Eircom’s refusal to use filtering technology or other appropriate measures to voluntarily block or filter material from its network, which is being used to download music in violation of the companies’ copyright and licensing rights.

The proceedings arose after Eircom told the companies last October it was not in a position to run the filter software on its servers.

In his affidavit, Mr Kavanagh outlined measures by the record industry aimed at discouraging record piracy, including public awareness campaigns and legal actions against individuals engaged in piracy.

Mr Kavanagh said illegal downloaders come from all walks of life and the reality for many young people was that they have never known a position where they actually have to pay for sound recordings.

From Digg:
——————

It looks like the IFPI has shifted its focus from the individual filesharer to the ISPs. Last month, the IFPI won a court case in Denmark, and the ISP “Tele2″ was ordered to block all access to The Pirate Bay. Tele2 announced later that it will fight the decision.

Banning illegal filesharing from their network, voluntary or not, is in the best interest of ISPs according to the IFPI: “Illegal P2P file-sharing may have helped drive broadband subscriptions in the past, yet today these activities, particularly in respect of movies, are hogging bandwidth,” they state.

Categories: Ireland, Linux, Music, Opinion Tags:

Webex Player on Linux

March 10th, 2008 20 comments

WebexWe use an application called Webex in work to remotely access peoples machines. These sessions can be recorded and therefore we often use this to view sessions from other Engineers and to record training sessions that may have been given elsewhere. One place to see a lot of  trainings is from the VMWorld website which has a webex recording of each presentation in VMWorld, including mine.

Up until recently I have been able to access peoples machines from my Linux box but I haven’t been able to play recordings. However I have finally figured it out so I am posting the instructions for anyone else who may be interested.

  • Login to your webex account
  • On the left menu, select “download”
  • Click on “recording and play back”
  • Click in “Create a URL for a Recording page” at the bottom of the page
  • Copy and paste http://www.webex.com/wrf/test.wrf in the “URL for recording” field,
  • Click submit and then click test playback.

This will install webex player in ~/.webex/atrecply

If you do not have a Webex account I am not sure how you can download this software. However looking at the site I see that you can download the Windows and Mac versions for free so I assume Webex do not mind if I include a link here to the Linux executables for anybody who might be interested.

Download a compress copy of the files here.

Categories: Linux Tags: