JRW's Technology Homepage
  Main Page  |   Contact Me  |     THE POWER! THE POWER! MUAHAHAHAHAHA!
  Sections:
 Entertainment
 Fanfics
 Feedback
 Geek Humor
 Photo Gallery
 Technology

  Tech links:
 Husker Linux Users Group - LUG I helped start in Lincoln, NE
 Linux to Migration Case Histories
 Microsoft SQL to PostgreSQL Migration

Powered by Apache
Subsections
Debian Internet Install
Encryption PGP Key
Linux Firewall and CBQ Scripts
Presentations


Encryption with PGP

My public PGP key, created with GnuPG. Feel free to send me encrypted mail with it. To use with Kmail just install gpg in your distro, most likely though you already have it. Evolution works the same way. If you are in Windows, you can use one of the many plugins available for Outlook, Mozilla, Eudora, and ICQ to name a few.

CLICK HERE FOR KEY
Linux Firewall and CBQ Example Scripts

Some example scripts that I used once upon a time with the 2.2 and 2.4 kernels. Nice to get an idea on custom writing your own scripts. I put these at /etc/rc.d/rc.firewall or elsewhere where it is run during startup. IP masquerading and port forwarding is used in these.

Linux 2.2 IP Chains
Linux 2.4 IP Tables

As another bonus, I use CBQ on my firewall with the 2.4 kernel. After searching the net for advanced scripts with CBQ, I finally had to end up making my own. Here is a diagram showing my setup, with multiple segments branching off them. It controls bandwidth both ways.

The outside of the firewall is eth0, while the inside is eth1. The eth0 part of the diagram controls stuff going out of my network, and the eth1 controls what goes in. For each block, the class is the cbq class number. Next is the rate limit I have for each. If it is unbounded, if there is available bandwidth in it's parent block it will use it. The lower the priority number, the more bandwidth it will get from its sibling blocks should the bandwidth start to grow short. The mark is related to how I have iptables mark out each packet to be divided up.

Here are all my cbq scripts that I put in /etc/sysconfig/cbq/ of my firewall:
cbq-1000.eth0_out
cbq-1500.eth0_servers_total
cbq-1501.eth0_other
cbq-1502.eth0_gaming
cbq-1503.eth0_ssh_personal
cbq-2000.eth0_gnutella_out
cbq-2001.eth0_web_out
cbq-2002.eth0_web_download_out
cbq-5000.eth1_out
cbq-6000.eth1_web
cbq-7000.eth1_streaming
cbq-8000.eth1_gaming
cbq-9000.eth1_other_protocols

This is the cbq init script I copied to /etc/rc2.d/S50cbq. CBQ Init

Now, the next trick is to divide the packets up. I didn't use the cbq rules, but instead used iptables to mark the packets since I was more familiar with its use. Here is a copy of the section of my firewall rules that does the marking. Since I use IP masquerading, the few lines are for the eth1 rules and the bottom ones are for the eth0 rules. Perhaps later I'll add some more description on how I came up with these, but it will give you a start for the meantime. Have fun!

Linux Advocacy Central


Debian Net Install

Debian is my Linux distro of choice. It is not the easiest to get working but after that it is very easy to install patches, install new software, and use the latest greatest out there. Dealing with rpm dependency hell in the past was the main reason I use Debian for apt-get. I originally got this at Ian Eure's netinst images that was given on Debian's site, but it was quite slow (only 14kps download, and I'm on a T1!).

Woody NetInst 20020626 i386 iso - 31 megs
MD5 be075ea935730093724b73586c645ebd

Now, after you boot off the cd, you will need up-to-date apt sources to install the rest of the software and patches. Use these for your apt-get sources:

deb http://http.us.debian.org/debian woody main contrib non-free
deb http://non-us.debian.org/debian-non-US woody/non-US main contrib non-free
deb http://security.debian.org/ woody/updates main contrib non-free

For other instructions on installing Debian, visit the online manual.
Technology Presentations by myself unless otherwise noted

Google