The D-Link DNS-323 home NAS device has a few nice features. Once of which that I wanted to test, was its print serving capabilities and various OS's.
Turns out, to test this is only a 5 minute job! By connecting a USB printer to the DNS-323, the NAS recognizes the printer instantaneously. At this point, it is only a matter of having your networked computers to see the printer through windows networking or Bonjour services on OS X.
While it was VERY easy on Leopard, Tiger was a bit more confusing. I started with Tiger, so I will here as well.
Both OS X 10.4 and 10.5 start by going system preferences to reach the printer and fax setup options. By clicking the "+" to add a new printer, the next step is where it gets different.
On Tiger, while it asks for IP addresses and information about the printer, I actually had to choose "More Printers..." to find it. Once this was done, It displays a "browser" of printers found over Windows Networking workgroup shares, Bluetooth, and AppleTalk printer shares. It also has options for connecting to various manufacture’s printers via IP (Canon, HP, EPSON, Lexmark) but this option didn’t work for me. However, under Windows Printing located by workgroup. I believe this works in this manor due to the fact that the DNS-323 is associated with a windows networking workgroup, and basically exposes the connected printer as a service that can be connected to. The process of connecting to it requires a userid/password that should be setup on the DNS-323. The only thing left to do is select the model of printer to locate the driver needed for it.
While this isn’t such a big deal, it was a bit easier on Leopard. On Leopard, simply choose to add a printer the same manner as above. Once that is done, it will have a much better way to "browse" various printer service shares, and find the printer you are looking for. Choose the "Windows Printing" tab at the top, and then browse the workgroup to see the shared printer. If you select to locate a driver, you can type in a search string for your printer model, and be shown the correct driver to use.
Recap:
The DNS-323 shares printers over windows networking via workgroups. As long as your OS can locate devices in this manner, you use that method to locate the printer directly. It is possible to share the printer from a PC that can see it, but if you do this, it sort of defeats the purpose of a print server. At that point, the PC that is sharing the printer has to be on to allow printing to occur. If all clients connect via the networked printer and not through a PC that is sharing the printer, nothing except the router and DNS-323 have to be on to print documents on that printer.
Saturday, December 15, 2007
Yet another project...
Posted by S.G. at 6:58 PM 0 comments
OpenVPN on OS X
If you have ever messed with any open source projects, you are missing out on some great experimentation. Sometimes these lead to frustration, but more often than not, they lead to great solutions for free, except for a bit of your time.
Today I spent a good portion of the day messing with such a project called OpenVPN. The purpose of this project is to allow VPN over a SSL UDP IP connection, instead of IPSec, L2TP, or PPTP. Therefore, it is not compatible with your run-of-the-mil VPN clients. You may think that you could use your browser, but alas the only way to participate as a client is by running the openvpn client to connect to the openvpn server.
It is still pretty secure, going over SSL and using a PSK system makes it fairly reliable. That makes it a pretty good (and cheap) option for home users, and perhaps small businesses. After a few hours today (not taking my full attention), I was able to get this up and running. I have tried to do this in the past without much luck, partly because the documentation is quiet large and detailed. In addition, I have been doing this on Darwin and there are a few things here and there that can cause a bit of frustration.
However, today I tackled the situation with diligence and managed to get up and running. Here is how.
First, I concentrated on the server. I downloaded the latest source package for the project. Secondly, you will notice that it may not be as easy as the typical configure, make, make install instructions. There are a few dependant programs that you will have to find darwin ports for. OpenVPN requires openssl, lzo, and pam. The best way to deal with all this is to do one of 2 things.
1. get each program’s source packages from the various project homes via the internet and compile/install them individually.
2. use pre-packed binaries for your OS. Linux users can take advantages of RPMs, and Darwin users can use Darwin Ports or an equivalent package manager such as Fink. Windows users can get a self contained .EXE, but who uses Windows?
Once all the required dependencies are handled, a simple configure, make, make install cycle should do the trick. Once everything is built, there are still many things to do, but all are outlined in the HOW TO. The basic steps remaining are to generate the certificate, public and private keys (for clients and servers), and this other file that is specified in the how to doc. This entire build/install process has to be duplicated on the client, however the keys and certificates only need to be generated once.
Once you have all the software on both client and server installed, and keys generated, the client keys need to be placed on the client. This needs to be done over a secure remote connection, or preferably via local network or some other rudimentary file transfer between two computers.
By modifying the client.conf file on the client, and server.conf file on the server, one has a complete setup that is ready to run. The directions for doing all this are outlined in the how to doc, but the configuration files themselves are well documented. To start the client or server pieces on each machine, it is only required to issue "openvpn
OS X gets a great benefit of having a nifty GUI to manage and connect to networks, or modify the configuration files in Tunnelblick. In fact, all I had to do on my client was to copy the generated files required on the client to the client, and run Tunnelblick to setup the client. Tunnelblick takes care of installing the TUN driver for OS X during its install. I think the only reason I had to get the actual source code on the server was to generate the keys and configuration files to start from. One of these days, I may wipe out my current openvpn setup and test this theory. Until then, I do not plan to modify any of it haha.
NOTE: Above I mentioned that I disabled LZO when I configured openvpn. Due to that fact, I disabled the LZO directive in the server.conf file which forced me to do the same in the client.conf.
Posted by S.G. at 5:57 PM 0 comments
WAS 6.1 and Session Persistance
For the passed few weeks, I have been trying to come up with a way to persist some data across web applications deployed under WAS 5.1. We have discussed many options, but had narrowed the choices down to two. Since those were chosen, I have been implementing one of them, despite it being something we may not want to do ultimately. It would work, but it does not really attack the problem at hand.
Friday it came to my attention that in WAS 6.1, if you deploy web apps under a single EAR, a simple change in the deployment descriptor of the applications will allow the session information to persist across the applications in each ear.
This is a good thing, but would require some rethinking about the organization structure of our applications. Despite that, it would solve a good chunk of the problems we have been trying to figure away around. The bad news is that it completely voids what I have been developing for the passed few weeks. Ill trade it if it works...
This comes at a good time as well because we are preparing to migrate to WAS 6.1 anyway. Soon, I will be testing this, and will put more information up here when it becomes available.
Posted by S.G. at 5:49 PM 0 comments
Wednesday, December 12, 2007
Bobby Petrino
So it is not new news that Arkansas managed to pull Bobby Petrino from the NFL to become the head football coach.
- Well established coaching record
- Offensive Minded Coach, but believes in balanced attack
- Can develop a quarterback
- Wants to get back to college football
- Has experience in all levels as OC, QB Coach, and Head Coach
- Arkansas has plenty of money budgeted to allow him to pick quality assistants
- Under media attack for the way he left the Falcons
- No proven ability to honor contracts or stay in one place for more than a short period of time
- Set on being his own SEC Offensive Coordinator (sounds like Nutt)
- Reported as untrustworthy, which could effect recruiting
- Not from region - could hurt recruiting as he does not know the region or have established regional relationships
Posted by S.G. at 1:28 PM 0 comments
Monday, December 10, 2007
Another Lesson for Today
whew.
So the above cookie stuff was not 100% of my problem, although a good
piece of info. Today I learned more in depth facts on how and what the
struts action "redirect" attribute is used for. If you want to chain
actions (despite it being something that is not advised) and you want
to have the client get a response and create a new request with your
desired action, you should add ' redirect="true" ' to your actions.
The default value of false, makes your desired action complete in the
same request/response cycle as the original action instead of two
separate ones.
The pros about having the same request/response cycle for the two
actions is that your request data is preserved across them. The con is
that things (like cookie deletion) require that the client be told to
remove the cookie via a response from the server, which would never
get there until after BOTH actions have ran. In my case, that was not
what I needed. By the time the client was told to delete the cookie,
it was too late. We had already tried to process other needless code
based on that cookie still being in existence. Therefore, forcing each
chained action to have its own request/response cycle fixed this
problem, because the client was being told to delete its cookie before
the server ran that second bit of code. However, that caused other
problems. Now I see why the struts spec does not encourage action
chaining :D. This same problem held for updating the cookies' value to
something useless as well, because again, the client must be told from
a response to change/delete its cookies.
Solution:
In addition to checking to see if the cookie exists, I am going to
check to see what the cookie's age is. The way things work out, we
only have 2 possibilities for the age, so that will work just fine.
Again, not the prettiest solution probably, but it gets the job done.
Posted by S.G. at 1:24 PM 0 comments
Xmas Cookies!
Well, I have stumbled across something very interesting today. I have been working with browser based cookies to keep track of a user's activities and found the need to delete them upon logout. After much headache, it was brought to my attention on another blog (http://blogs.bytecode.com.au/glen/2006/03/31/1143750630535.html) that it is not sufficient to just set the max age of a cookie to 0. The reason being that your "delete cookie" routine has to be aware of the correct domain/path settings on that cookie. If you call your creation routine to recreate the cookie (with a known path/domain) and then set the max age to 0 on that cookie object before setting the cookie on the response, you can be sure that the cookie will truly be immediately removed.
Posted by S.G. at 9:19 AM 0 comments
Friday, December 7, 2007
iWeb Issues
So to continue my rant before on iWeb.
I have been a web developer for almost 4 years, and my least favorite activity is making the actual web pages. I really enjoy the designing and coding of the Java pieces involved, but the actual HTML/JSP code is what I hate the most. This is all going to change in my favor soon, but technically already has. I have accepted a promotion to the framework development team. My job responsibilities will not be pure developing of applications, but rather I will be developing, maintaining, and supporting the Java code and standards that all Java developers are required to follow. This also means that I will be evaluating new technologies and how they would or could apply to Dillards. If Dillards wants to pursue them, I will do the initial research followed by the design, implementation, and standards that we will follow. Its a great step for my career, and is more in the direction that I would like to do. I have been working under this new title for a few weeks now and I really enjoy it.
However, I think i have gotten off topic.
Like I was saying, I like to use templates for web development stuff whenever I can. I really love the UI of iWeb, despite it being slightly crippled. The only problem is that you cannot easily create custom templates. Templates are themes that carry through the entire "site" you are going to be building. That is to say, its not impossible to make custom stuff. You can easily take a template theme and in each of the types of pages (blogs, photo pages, movie page, about me, etc) you can manually edit the way the original template looks. The small problem of manually editing the pages is the headache of making sure all the pages match the same general design. The worst part is the fact that outside of changing basic things like colors and fonts, you really cannot rearrange page elements to much or modify page functions of certain things. The only other option for manually editing of templates is to break down the application resources - that is the various XML files. While I am not scared of this at all, the problem is that when you pull the XML files into an editor they are completely all on one line. Its so jumbled it would be terribly hard to edit. I may eventually look back into this, but for now, I thought I would try to use Blogger. So far, I am pretty happy. After a few hours of manual editing of this template, I have something that looks non-cheesy and a tad more original - I THINK ha.
Anyway, so my goal here is to talk about all sorts of things. I want to talk about pretty much anything, work and personal. If you are not careful, I will be back later tonight.
Posted by S.G. at 5:29 PM 0 comments