Linux Firewall With Comcast

I use Comcast to connect to the internet. I use Linux on most of my machines, and on my firewall as well. Comcast does not officially support Linux, so if you want to run Linux on the machine that connects to the internet, you are on your own.

For the installation, you are required to use Windows to run a program that connects your machine to the internet. This does not need to be run on the machine that will function as your firewall. This program seems to register your ethernet card’s Media Access Control address (a unique identifier for each ethernet card) with Comcast’s servers. This means every request from your machine or network must be from a card with that address.

But the address can be faked. You can configure your Linux/BSD firewall to use the registered MAC address. To do this, you must get the MAC address of the card that has been registered. To do this on Windows, you can type “ipconfig /all” in a DOS prompt.

The line that has the information we want is the “Physical Address” line for Local Area Connection 1. Take that information and reformat it slightly and put it into a script that will run on the Linux firewall. You have to deactivate the outgoing ethernet card, and reactivate it with the MAC address from above.

You then need to reboot your firewall, and you should be good to go.

 Image from Wikimedia, assumed allowed under Fair Use. Image from the Roman Vergil, a 5th century manuscript of poems by Virgil.

Switching Network Configurations with netsh

When I use wi-fi at at the coffee shop, I have to set up my laptop to use a dynamic IP address. When I am home, I like to use a static IP address. Going back and forth can be kind of a hassle. I used to have to change it by hand every time. I thought there must be a better way.  (I am not much of a networking expert, and setting up DHCP for one machine seemed like a bit of a hassle.)

I did some searching, and I found out about a tool on Windows called netsh. There is a very long page about is at Microsoft’s site, and a page at Wikipedia. You could make the changes in the GUI, and run the command netsh dump > $SOME_FILE_NAME to put them into a file, and later run netsh exec $SOME_FILE_NAME to set the interfaces.

I did a little bit of messing around, and I figured out all the commands I need to change back and forth. I put them in a text file, and I just copy and paste them into a DOS window when I need to.

To use a dynamic address:

To use a static address at home:

 Image from Wikimedia, assumed allowed under Fair Use. Image from the Roman Vergil, a 5th century manuscript of poems by Virgil.

2010-06-29 Update

I started a new job yesterday. So I may not be posting too much new stuff lately.

However, I may post some old stuff. My desktop came back from Best Buy. They had to replace the motherboard, and I had to re-install Ubuntu. So I lost all of my files. (I have been making DVDs of the really important stuff all along.) So I no longer have an OpenCms server running. I may take all of the files in the static content portion of my site and copy and paste them on the blog portion.

 Image from Wikimedia, assumed allowed under Fair Use. Image from the Roman Vergil, a 5th century manuscript of poems by Virgil.

I may never buy another desktop ever again

For a while I had four systems. One laptop (which is about four years old) and three desktops. I was using one desktop as my main system, and one as a firewall. A week ago, the main desktop stopped working. Sometimes it would boot up and work for about ten minutes and then stop working, and sometimes it would not detect the hard drive.

I took it into Best Buy, and they had to ship it off to the service center. They said the motherboard had to be replaced.

Then my firewall machine stopped working. It is pretty old, so I am guessing it just needs another power supply. So I am now using my remaining desktop as a firewall. If I run X it freezes after a while, but if I do not run X it will run with no problem.

My laptop is a bit old, and I did not want to use it as my main system. So I went out and got another one. I have had some issues with desktops just about every year. The power supply goes out, or I need to reinstall, or it just dies. My laptop has worked without any issue. Then again, my desktops were HP machines, so maybe they just used some cheap parts.

Anyway, I am thinking about just using laptops from now on. This means that at some point I will need to get a router in case my firewall dies.

This also means that my OpenCms server on my desktop is gone. I will start migrating the static content on this site to the blog.

 Image from Wikimedia, assumed allowed under Fair Use. Image from the Roman Vergil, a 5th century manuscript of poems by Virgil.

OpenCMS now working again

I was having some problems with OpenCms on my desktop. The FCKEditor was not working for the xmlpages. It turns out there was an issue with the Javascript engine in Firefox. Someone posted a fix on the mailing list. Here are the steps from the post:

– edit the file /system/workplace/editors/fckeditor/editor_configuration.xml

– replace the line
^Mozilla/5\.0 \(.* rv:1\..*\) Gecko/200\d* .*$</agent>
with
^Mozilla/5\.0 \(.*\) Gecko/20\d* .*$</agent>

– save and publish the file

– reinitialize the workplace or restart the servlet container

I did it, and now everything is great. I plan on adding more pages to the static part of this site soon.

 Image from Wikimedia, assumed allowed under Fair Use. Image from the Roman Vergil, a 5th century manuscript of poems by Virgil.