Saturday, November 12, 2011

Host Firewall - Level 1

I know there are a ton of websites out there talking about firewalls, especially iptables, however I wanted to just take a minute to create a basic, but very functional firewall. So, here it is.

1) backup your current config file

sudo cp /etc/sysconfig/iptables /etc/sysconfig/iptables.orig


2) Edit the file /etc/sysconfig/iptables with your favorite editor (vi) and add the following lines

*filter
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -j DROP
COMMIT


3) Restart the iptables firewall

sudo service iptables restart


4) Enjoy

Note: This testing was done on CentOS 6.0

Friday, August 26, 2011

The History of Linux

So to get a better understanding of Linux let's start by examining where Linux comes from and why.

(Here's the short version)

In the early 70's there was UNIX. UNIX systems were not (and are still not) cheep and fall under a lot of the same licensing issues that a Microsoft box does. (i.e. you're not allowed to distribute or modify the code without their permission). So there was this guy by the name of Richard Stallman who came up with this idea to create an open source, freely distributed operating system. So in the 80's Richard started working on his "free" OS. At first he was the sole member of his team and began to write code and publish it on bulletin board systems (BBS). Soon Richard's team grew and he has people all over the place helping him write the code.

This was good news since building an operating system from scratch is no small task. If you've ever looked at building your own OS from the ground up, or even explored an OS in depth, you know there are a lot of moving parts that need to be taken into account. Things like the compiler, hardware support, libraries to support applications, text editors and tons of over things; oh, and don't forget about the kernel (you're going to need one of those).

So in 1985 Richard founded the "Free Software Foundation" to help with the GNU project. By 1990 Richard either found or had written most (if not all) of the components of the operating system; minus one, the kernel.

On a side note: coming up with the name for the project started one of the more odd phenomena in open source software; creating wired but meaningful names / acronyms for products. Richard came up with the acronym of GNU, which stands for "GNU's Not Unix". Yes, the G in GNU stands for GNU. This is known as a recursive acronym. Odd I know but people have been having fun with acronyms ever since.

Now back to our story. Around the same time the GNU project was being built, Linus Torvalds created a kernel (oddly enough, it was just what the GNU project needed). So joining Linus's kernel into the GNU project finished the puzzle and an open source, free operating system was born.

Going back to names for a second, since the OS is often referred to as Linux, most people think Linus created it. Of course he played a vital role in building it, but it's important to remember all the work the GNU team put into the OS as well. So to be correct, it should be referred to as "GNU/Linux".

Tuesday, August 9, 2011

Building a Digital Picture Frame in 10,542 Easy Steps



I know this project has been done before, but I have added a few tweaks along with tips and tricks to make it easier. This is the presentation I gave at UAT on November 4th 2009. If you would like more information, please E-mail me.

I have converted the PowerPoint to a PDF for your viewing pleasure. It can be found here.

Also, in this post I talk about using my custom image of DSL Linux. I have yet to get that on the Internet, but it is coming...

Introduction

Welcome to the Linux-How-2 blog.

The goal of this blog is to educate people in the use of the Linux operating system. I will try to be as general as possible, but my main OS's are CentOS (Red Hat) and Fedora. I will be talking about other OS's and I welcome all questions.

In this blog we will go over using and learning Linux in a practical way. In short, what that means is I will be providing and demonstrating real world scenarios with Linux. For ease of education, I have divided this blog into I've sections; beginner, intermediate, advanced, scripts and projects.

The beginner section will be for basic overviews, explanations as to "why" things are done the way they are and some of the history behind Linux. The goal will be to give the learner the background and foundation to start using Linux.

In the intermediate section, I will start to go over more elaborate uses of commands, basic software configuration & usage and some system tuning techniques.

Under the advanced section the plan is to go more in-depth of system configuration and examine some of the more rare commands and their usage. I would also like to get some of your questions and add them to this section.

As you would expect scripts will be under the scripts section. Like other sections, I would like your questions or requests on what you would like to see.

In the project section you will find any of the projects I use Linux for. Again, all ideas are welcome.

I hope you enjoy this blog and I look forward to hearing from you.

Michael