Tuesday, January 6, 2009

SSH RDP Client Admin


Example of the admin piece within the portal. Admin is setting up a new published app.

Here he enters in the app information that will be generated into xml and sent to portal clients by client group.

Information such as term server ip or name, rdp settings such as compression or full screen, or drive mappings.

RDP encapsulated SSH client


Well I've been coding all night and have a new version of the portal application.

Key features:
SSH enabled RDP session to Term servers.
LAVA SSH gateway listening at port 80 for clients to connect to via SSH.
Once they connect, they pull in some port forwarding information which is tied to their user id.
The SSH embedded client reads the xml information and then port forwards to their internal terminal server and sets up the port onto their local machine at port 3390
The client then generates an RDP file that is run on the localmachine and connects the MS RDP client to port 3390 on the localmachine. Voila - the client is using SSH and RDP without knowing it.

Beautiful part is the EXE is under 8 mb and runs entirely in ram. No install. Just run it off a usb and connect to your published apps via SSH and no port opening on firewalls cause the SSH server is listening on 80.

I might expand the published apps to include X servers and imbed an X client in the portal app , I could also add a vnc client embedded in the portal so you could vnc into servers via ssh.

I have a screenshot above:

Monday, January 5, 2009

SSH gateway for RDP

SO I am building a SSH gateway to place in between some terminal servers we have at the office. The cool thing about the SSH server is that it will compress the RDP traffic and redirect the client to the internal RDP server.

What I am envisioning is a to build a small python app which will allow a user to login to a mysql database which will have some published app information, this information will be sent back to the client upon successfully logging in and tell the client which ssh server to connect to and which internal terminal server the client should call the rdp client to.

In essence the client connects to the ssh server and port forwards RDP to the local machine and then creates an RDP file that is autostarted by the localmachine which tells it to connect to itself at port 3389. That port will be forwarded automatically to the server running in the datacenter via ssh.

This way the only port that needs to be opened at the client end would be port 80 which is just web traffic port- I am going to have the SSH server listen on that port. Everything will be sent thru SSH so no RDP configuration on router.

I have tested it and file transfers work faster from RDP as well as screen refreshes. PDF rendering is alot smoother and I also like the fact that it is using SSH security and the data is encrypted.

Just another way opensource, ubuntu, python, ssh is helping me out.

Sunday, January 4, 2009

Preload

Along with playing with the 64bit os this weekend, I decided to mess with sysctl.conf and preload again.

For those who do not know /etc/sysctl.conf controls your kernel parameters - it's a nice way to adjust your operating system's running kernel without rebuilding the kernel from source and preload is a program you can install via 'sudo apt-get install preload' which preloads dlls and binaries into memory. It watches which programs you use and trys to load parts of the program into memory so when you launch the program it runs faster.

Still trying to find the best ratios for performance. I really like preload but you have to tweak it out a bit and also tune your system to be a little more aggressive with virtual memory garbage collecting via sysctl.conf. Preload obviously would not be too beneficial in a server environment but on the desktop it does make things pop up faster.

The whole test was to see if I could really shave openoffice and firefox launch times. And preload worked very well after I tricked out my sysctl.conf file.

Here are some of the changes I made in /etc/sysctl.conf
vm.swappiness=15
vm.vfs_cache_pressure=50
net.core.rmem_default = 256288
kernel.shmmax = 268435456
net.core.optmem_max = 57344
kernel.threads-max = 16379
fs.file-max = 16384
vm.page-cluster = 3

Then I adjusted my /etc/preload.conf
minsize = 1500000
memtotal = 30

Openoffice and firefox both noticiably increased in launch times. I don't have too many firefox extenstions but it does take a couple seconds for it to pop up - with preload and my new sysctl it comes up almost instantly. Openoffice runs faster also, it loads in about 10 secs and then each load afterwards is like instant. For Openoffice I changed some settings in it's preferences also, I increased the memory Openoffice could use to 64MB so it can load more of itself in the background. Now both come up fast.

64bits of power

So I have been playing with Ubuntu 8.10 64bit this weekend.

I like it.

My home test machine an AMD 3400+ seems to run faster with it than the 32bit ubuntu I have been using. I was worried about alot of the third-party software i use as they come in debs already for ubuntu but building some from source was not too bad and I then make the newly built binaries debs for 64 so it worked out. I was really worried about my game library - panda3d - but the folks at panda3d started making 64 bit versions and they had a premade deb so it all worked out. I loaded it and ran the source code of my developing game and voila - it worked without any changes.

I'm going to start building a new pc for my home and since I am going to have more than 4gb it was important to me to see if the 64bit version was going to be any trouble but i have been running it for 2 days and burned some cds, played my music, hooked up my ipod, wrote some python, panda3d, and django code and even did some rails and everything worked well. YIPPPEEE!!! Who says computers are a pain?

Friday, January 2, 2009

8.10 build

Almost done with CD version of 8.10 build. I've been doing alot of python programming lately with my game as well as my websites and haven't been developing lava for the last 2 months. I decided to replace my extra home development computer in the next month, so I am going to finish up my 8.10 build of lava and lavalite so I can load it onto the new machine.

As I am going to build my pc, I have been looking around for my new machine parts and found an Intel i7 920 Core chip and motherboard which I am eyeing. The motherboard allows for up to 24GB :) oh my! Obviously I am not going to buy all the memory at once but over time. 4 GB here, 4 GB there. Anyways, it made me think about the native 4GB limit in the Ubuntu 32bit kernel and how I would need to either install the 32bit server kernel or rebuild the 32bit kernel to get that extra memory. I haven't used the 64bit version and was wondering if anyone has and what their experience has been with it? Maybe I will build a 64bit version of my LAVA and LavaLite so the native 64bit kernel can see past 64bit without having to recompile or load a server kernel. Are there any downsides to install the server kernel as opposed to the desktop? Maybe I should just try the 64bit version out? I do alot of programming in panda3d now and it ships as a deb for 32bit ubuntu on their site. Not sure if there will be any issues with running it in a 64bit os. Also I have a bunch of other software not in the repos which are all 32bit. I guess the only way to know for sure it to install it and see.

Friday, December 12, 2008

Rsync Heaven

In the last month I have had to rescue some pc data from family members computers. The PCs would not boot - they would die at the login screen. I grabbed my version of lavalite which I loaded onto a usb using UNETBOOTIN and voila - had a desktop where I could mount their NTFS drive, my external TB usb drive.

Once I mounted the drives all with clicks in xfce, I jumped to a command prompt and began to rsync the data they had under 'Document and Settings'

They had tons of photos, some home movies they ripped from their camcorder and lots and lots of ipod stuff. Total 68 GB.

Well Rsync worked like a champ: here is the command I ran
rsync -arvgzi --bwlimit=4096 --delete --itemize-changes "/media/HD/Document and Settings" /media/LACIE/backup/ > /home/ubuntu/rsync.txt

This command backed up all the files under Document and Settings and replicated them on my removable USB drive under a sub folder called backup and then it logged the files it backed up to a log file in my livecd ubuntu home folder.

I set the command to run at a bandwdith limit of 4096, which was about 4MB a sec, so I could also use Firefox and use their internet while the backup ran in the background.

After about half an hour, one of the kids needed to use the pc for homework so I showed her where her .DOCs were and she opened her assignment in OpenOffice and began to update it. After an hour the rsync was still going and she finished her assignment. She opened firefox and began to email herself the updated file so she could print it out at school.

After she finished, she asked me how she would chat. I showed her Pidgin and off she went, added her account and begain chatting. In between, she opened another instance of firefox and went to myspace and facebook and was there running off the livecd for another hour or so.

Once I had their data and she gave me back the keyboard I ran it thru CLAMAV and then restarted their pc and began reluctantly to install Windows XP Home Edition. After talking to the parents and her other sister, they had alot of video games that I was not sure would run under linux.

If anything this experience made me realize that even this 5th grader could get work and have fun on linux without windows. She realized everything looked different but she was able to learn how to bold, underline, click here, click there and got her work done and found time to have fun all off a live usb linux boot. Amazing.

They are now back on Windows XP Home Edition. They do not have their original install cds that came with the PC so I installed with an OEM disc and entered their key and activated Windows. Unfortunately they had Office 2003 which was preinstalled on the pc and now they can not find the software so I loaded OpenOffice and they were fine with that. I think it helped that the 5th grader was able to use it previously when she was using my livecd. They also had a bundled NERO install - again they did not have any of their original software so I loaded a fresh new install of InfraRecorder and they found it easier and faster than nero. I added 7 Zip for their compressing needs, I added defraggler and setup defrag schedules. I also added VLC and set it up to be their default player. Threw in firefox and added some extensions: Tab Mix Plus, Adblock Plus, Google Preview, URL Text. Added Foxit for PDF reading, Unlocker for unlocking files, and Antivir for Antivirus protection.

So in the end, they have their pc back with a Microsoft OS but they lost all of their bundled purchased software. It's funny cause they commented on how much faster the computer felt and I completely think it is cause all the apps they have on their system now run lighter and faster and they are free.

Although I could not convert them to Linux, I think I made them very aware of the value of free software which I think is a step in the right direction.