I needed to return all the members of an object as an XML document in Python. I used the ElementTree library to do this. The class in question is pretty basic: It has a constructor, member variables, getters and setters for the member variables, and now this new function. Every Python class has a built-in …
Often times, in your Squid proxy, you may have a redirector configured – such as SquidGuard:
redirect_program /usr/local/bin/squidGuard -c /usr/local/etc/squid/squidGuard.conf
I ran into a problem tonight with my Roku box where SquidGuard was seeing Roku’s NetFlix access as a security threat. So, to make Squid bypass the redirector, add an ACL and a redirector-access rule:
acl netflix dstdomain .netflix.com
redirector_access deny netflix
There you …
By default, Squid sends HTTP headers on every request that can give away information about your internal network. Here’s an example of these headers:
HTTP_VIA:1.1 proxyserver.local (squid/3.1.16)
That’s three pieces of information you may not want to give away: The host name of your proxy server, the version of Squid it’s running, and the IP address of …
Apparently, it’s necessary to use separate CSS properties for each browser.
If you have a switch, access point or other piece of network hardware that supports 802.1q VLAN tagging, and you’d like to your FreeBSD system to recognize them, it’s a pretty straight-forward configuration. I’ll use examples from my network to illustrate. My goal in this case, which I may write about in a separate post, …
Most of us don’t have native IPv6 Internet connections at home. Fortunately, it’s easy (and free) to get connected to the IPv6 Internet. Here’s how to get your FreeBSD box connected.
I spent some time thinking about backup strategy, and I decided for my purposes, I’d like to handle the staging process (getting all the files put together), and I’d like the backup solution itself to simply upload the files – but since I want to do nightly backups, I’d like the backup solution to have …
The FreeBSD console is colorless by default – but most terminals and SSH clients these days support color. The benefits of colorizing your console should be pretty obvious. It makes your life a little easier – you don’t have to do as much mental processing.
The Duke URLGrabber package for Python makes it incredibly easy to retrieve files from remote servers, and it abstracts urllib2 for you in a protocol-independent way, so you can focus on your application instead of spending time working with Python’s built-in urllib2. On Windows and Mac OSX, by default, urllib2 (and therefore URLGrabber) will use …
Whether you’re using FreeBSD for your workstation, a simple home server, or in a complex IT environment where reliability is critical, losing the data on your hard disk(s) is probably the worst type of failure you can have. I’ve already gone over a backup strategy for FreeBSD, but it’s best to try to prevent data …