snabbr http://snabbr.com Pioneered in 2008 and headed up by Arthur Fruchtman, snabbr provides result-driven solutions to the customer looking for a new approach to daily viability. Our goal is to do work that makes a difference in people's lives. en-US snabbr http://www.snabbr.com/images/logo.gif http://snabbr.com 144 29 Cisco Configuration for Branch Networks http://snabbr.com/articles/cisco-configuration-for-branch-networks This article outlines the various commands needed to configure a Cisco router used for home, small business, or branch office networks. A Cisco 861 was used to prepare the configurations, but they will work on most any Cisco router. Also please be advised that K9 license is required to enable VPN configuration commands.

Router Authentication

!
! Set the router’s administrator password to ‘mypassword’
!
enable secret mypassword
!
! Create a new user ‘snabbr’ with password ‘mypassword2’
!
username snabbr privilege 15 secret mypassword2
!
! Use the ‘aaa new-model’ to allow the local username above to be
! used on the router
!
aaa new-model
!
! Now we enable SSH over the virtual terminal
! SSH requires that hostname and domain be set.
!
hostname c861
ip domain name snabbr.com
!
! While we’re at it, lets also add global DNS servers
!
ip name-server 167.206.112.138
ip name-server 167.206.7.4
!
! Generate your SSH keys
!
crypto key generate rsa
!
! Enable SSH over the vtys’
!
line vty 0 4
transport input telnet ssh

WAN Configuration

We will be using the 24.187.228.122/29 subnet for the WAN, with 24.187.228.122 as the local WAN IP address.

!
! Select the router interface connecting to the internet (your ISP)
!
interface FastEthernet4
!
! Configure your WAN IP address and subnet mask
!
ip address 24.187.228.122 255.255.255.248
!
! Enable the interface
!
no shutdown

Security with ACL’s

!
! Access Control List 101
!
access-list 101 remark Traffic leaving home network
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq ftp
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq ftp-data
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 22
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq smtp
access-list 101 permit udp 24.187.228.120 0.0.0.7 any eq domain
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq www
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 123
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 587
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 993
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 443
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 3689
access-list 101 permit tcp 24.187.228.120 0.0.0.7 any eq 5223
access-list 101 permit udp 24.187.228.120 0.0.0.7 any eq 5353
!
! Access Control List 102
!
access-list 102 remark Traffic entering home network
access-list 102 permit tcp any 24.187.228.120 0.0.0.7 established
access-list 102 permit tcp any host 24.187.228.122 eq 22
access-list 102 permit udp any eq domain any
!
! We are going to enable these access lists on our WAN link
!
interface FastEthernet4
!
! ACL 101 defines what access users behind router c861 have. They have
! been given access to SSH, SMTP, DNS, HTTP/S, mail services, and common
! ports required by Apple (ie. Apple Store, push notifications, etc.). ACL 101 will
! need to be applied on all traffic leaving the WAN.
!
ip access-group 101 out
!
! ACL 102 defines what can be accessed on the internal network from the Internet.
! any established connections as defined in ACL 101 are allowed as specified
! with the ‘established’ keyword, as well as internal SSH and DNS services.
! ACL 102 will need to be applied on all traffic coming in from the Internet
!
ip access-group 102 in

LAN and NAT Configuration

We will need to configure NAT to allow internet users to access the internet. Internal users will be set up with the 10.0.0.0/24 subnet.

!
! Set up a VLAN with an IP of 10.0.0.1 on the 10.0.0.0/24 subnet
!
interface Vlan1
ip address 10.0.0.1 255.255.255.0
!
! Define VLAN 1 as a NAT inside interface
!
ip nat inside
!
! Configure DHCP pool ‘vlan1pool’
!
ip dhcp pool vlan1pool
import all
network 10.0.0.0 255.255.255.0
default-router 10.0.0.1
dns-server 167.206.7.4
!
! Reserve some IP address to be configured statically
!
ip dhcp excluded-address 10.0.0.1 10.0.0.30
!
! Define your WAN port as a NAT outside interface
!
interface FastEthernet4
ip nat outside
!
! Configure an access list that specifies the subnet to be NAT’d
!
access-list 103 remark NAT
access-list 103 permit ip 10.0.0.0 0.0.0.255 any
!
! Enable any packets received on the inside interface that match access list 103
! to have their source address translated to the IP configured on the WAN interface.
! The overload option allows for multiple inside IP addresses to be translated into
! the same outside public IP.
!
ip nat inside source list 103 interface FastEthernet4 overload

IPSec VPN

!
! Configure a pool of IP’s to be distributed to VPN connections, called ‘vpn-pool’
!
ip local pool vpn-pool 172.16.1.1 172.16.1.65
!
! Configure an access list to identify which traffic is to be encrypted
!
access-list 104 remark VPN
access-list 104 permit ip 10.0.0.0 0.0.0.255 any
access-list 104 permit ip 10.0.0.0 0.255.255.255 any
!
! Configure isakmp policy
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
!
crypto isakmp policy 2
encr 3des
authentication pre-share
group 2
!
! Configure the ISAKMP client with a group name of ‘vpn’
!
crypto isakmp client configuration group vpn
!
! Set the ISAKMP pre-shared key as ‘mypsk’
!
key mypsk
!
! Configure the DNS servers to use for VPN connections
!
dns 167.206.112.138 167.206.7.4
!
! Configure the domain
!
domain snabbr.com
!
! Apply the local vpn pool
!
pool vpn-pool
!
! Apply ACL 104
!
acl 104
!
! If you want users to be able to save their login info in their VPN clients,
! add this line
!
save-password
!
! Configure the IPSec transform-set called ‘ESP-3DES-SHA’
!
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
!
! Configure a crypto dynamic-map
!
crypto dynamic-map crypto-dynmap 1
set security-association lifetime seconds 3600
set transform-set ESP-3DES-SHA
qos pre-classify
!
! Configure a crypto map to tie in the ISAKMP pre-shared key, IPSec
! transform-set, and the ACL.
!
crypto map crypto-map client authentication list vpn-xauth-fa4
crypto map crypto-map isakmp authorization list vpn-group-fa4
crypto map crypto-map client configuration address respond
crypto map crypto-map 65535 ipsec-isakmp dynamic crypto-dynmap
!
! Add the authentication, authorization, and accounting
!
aaa authentication login default local
aaa authentication login rtr-remote local
aaa authentication login vpn-xauth-fa4 local
aaa authorization network rtr-remote local
aaa authorization network vpn-group-fa4 local
!
! Define new user ‘remote’ with limited privileges to be used for VPN access
! identified by password ‘mypassword3’
!
username remote privilege 0 secret mypassword2
!
! Apply the crypto map to the external WAN interface
!
interface FastEthernet4
crypto map crypto-map
!
! We also need to unblock vpn in our ACL
!
access-list 102 permit esp any host 24.187.228.122
access-list 102 permit udp any host 24.187.228.122 eq isakmp
access-list 102 permit udp any host 24.187.228.122 eq non500-isakmp

Default Route

!
! Configure traffic destined to an unknown location to leave the
! FastEthernet4 interface
!
ip route 0.0.0.0 0.0.0.0 FastEthernet4
!
! Configure traffic destined to an unknown location to hop over to the next hop IP
! address
!
ip route 0.0.0.0 0.0.0.0 24.187.228.121

Save your work!

copy running-config startup-config

Please leave some comments and let me know how this worked out for you.

]]>
Sun, 22 Jan 2012 23:57:11 -0500 http://snabbr.com/articles/cisco-configuration-for-branch-networks
How To Jailbreak An iPad 2 http://snabbr.com/articles/how-to-jailbreak-an-ipad-2 The long awaited iPad 2 jailbreak has finally been released on July 6th, 2011, courtesy of comex. First I'll show you how to actually jailbreak your iPad. Then I will briefly explain some of the apps I've gotten to experiment with.

Jailbreaking your iPad

Before you begin, I strongly recommend restoring your iPad to factory settings. This jailbreak requires your device to be at iOS version 4.3.3 or below. If possible, do not upgrade your device to 4.3.4, as the primary purpose of this update would be to patch the possibility of jailbreaking. Once your iPad has been restored, open up safari and navigate to jailbreakme.com.

Tap on Free

…and Cydia will begin installing on your iPad.

Cydia is like the App Store app on your iPad. Its your hub for all jailbreak apps. Next, tap the Cydia app when it finishes installing and you will be asked if you are a User, Hacker, or Developer. Whichever option you select determines which apps you will be able to install. I tend to go for Hacker, as it provides you with a greater selection of apps than User, and they're generally more stable than Developer apps.

After that, you will be taken to the Home layout of Cydia. Your iPad is officially Jailbroken!

Now it is important to note that it was possible to jailbreak your iPad due to a vulnerability in the way PDF's are viewed. This, if exploited maliciously, can cause some serious damage, and should be patched immediately. While in Cydia, tap on the Search icon on the bottom menu bar and search for PDF Patcher 2. Installing this will fix this vulnerability for you.

App Suggestions

SBSettings

The first jailbreak app I installed on my iPhone and iPad is SBSettings. It gives you a little menu on the top of your iPad to control the various services you have running. You can quickly enable/disable wifi, 3g, Edge, GPS, Bluetooth, SSH, and more (adjust brightness, kill running processes, etc.). I also like it because it allows you to show/hide your applications. This can be useful with the apps like Calendar and Maps that come preloaded and cannot be removed, and also with jailbreak apps that serve a simple purpose, yet [for whatever reason] place an app on you iPad (e.g.: MakeItMine - described later). To get into these other settings, open up SBSettings by swiping the top of the top bar on your iPad, a tapping More.

One other cool feature with SBSettings is your quick access to rebooting, powering off, and locking your iPad. Bring SBSettings up and tap the little icon for Power. You will be presented with this popup:

OpenSSH

This is for you geeks out there. If you don't know what SSH is, skip down to the next app. OpenSSH turns your iPad into an SSH server. It even adds a toggle switch to SBSettings. Pair this app up with iSSH app on the iTunes store, and you have a sweet little UNIX pad.

Open up iSSH and create a new connection for Localhost (your iPad). The user is root and the default password is alpine. Be sure the change the root password once you log in. You can also search for the other typical UNIX packages to install in your environment (e.g.: Vi iMproved).

...and make the connection:

iFile

iFile is pretty self explanatory. It's graphical interface to exploring your iPad's filesystem. When you locate a file and tap to open, you get prompted for the app you want to open it with. I haven't used this app much, as I prefer the command line method described above in the OpenSSH section.

MakeItMine

MakeItMine lets you modify your carrier name from AT&T or Verizon to whatever you like. It's pretty self explanatory. Once you set your name, the app is pretty useless, so hide it with SBSettings. No screenshot for this app. I'm sure you can imagine what it looks like.

Barrel

Barrel is purely a visual effects app. It lets you modify the effects you see when swiping between different pages of apps. I have my mode set to "Page Squeeze". No image for this guy since I wasn't able to take a screenshot while changing pages. Search YouTube for demos.

Graviboard

Another purely visual app. This one is more of something to woo your friends with. I thought it was cool when I first tried, but it really doesn't have a practical use. You set a toggle in your Activator to initialize the app (I set my iPad to toggle Graviboard by holding the Home button), and then watch all your apps loose bearing and drop down in disarray.

Suggestions

Although I just recently jailbroke my iPad 2, I've jailbroken other iPods and iPhones in the past. One of the biggest reasons people jailbreak is the ability to add themes to their iDevice. I love the themes, and messed around with many of them. However, I found nearly all of them to be really buggy and end up crashing my device. I also strongly recommend only downloading apps you see as Featured by Cydia, or other recommended online. The same goes for apps on Apple's App Store. Many developers aren't very good coders, and you can be stuck with an app that will consume all your system's resources and eventually crash.

Legality of Jailbreaking

U.S. declares jailbreaking legal, however Apple may void your warranty. Revert your iDevice back to factory settings if you ever have to turn it over to an Apple representative. Read the Wired article.

]]>
Tue, 12 Jul 2011 17:40:28 -0400 http://snabbr.com/articles/how-to-jailbreak-an-ipad-2
How to Delete Your Facebook Account http://snabbr.com/articles/how-to-delete-your-facebook-account There is no doubt that Facebook can be a great tool for promoting your business, to get in touch with old friends, and even meeting new ones. The social networking behemoth helps you share pictures, remember birthdays, and keep track of social events. However, there are several reasons one would consider deleting their account:

    o
  • Facebook owns ALL your data as specified in their Terms of Service. Even if you delete a picture you uploaded, it still exists in Facebook backup copies, which can potentially be sold to third parties. They claim they won’t sell your private data, but due to Mark Zuckerberg's unethical history, you never know.
  • o
  • Many employers are now looking at Facebook profiles to get the "inside scoop" on potential candidates. Even "hidden" profiles can be discovered in a Google search.
  • o
  • Nothing is deleted. Any wall post, comment, or picture is stored in Facebook forever. When you delete something from your wall, it is simply hidden from view.
  • o
  • The average Facebook user has 130 friends. How many of these friends have you met with in the past year? When Facebook alerts you to a buddy's birthday, did you call them to wish them a happy birthday? Take them out for drinks? ...Or just post your wishes to their wall. As a social networking site, Facebook is killing many of our social lives — this was my primary reason for deleting my account.

One may argue that you can update your privacy settings to fix many of the aforementioned privacy issues, but the data you share is still on Facebook, and at Facebook's discretion.

So how do you delete your account? Facebook seems to make it incredibly difficult to do so; they only give you the option of deactivating your account, which is the same as not using your account for a while (as soon as you log in again, everything is restored — all friends, posts, pictures, apps, etc.). You will also see articles online telling you that an inactive account will be deleted after three weeks. These are false claims. To delete your account, click this link.

Click “Submit” to start the deletion process.

Enter your password and complete the Captcha.

Your account has been scheduled for deletion.

You will receive an email from the Facebook team, notifying you that your account will be deleted in 14 days. Does this mean all your private data is deleted too? I hope so, but who really knows for sure…

]]>
Sun, 03 Jul 2011 19:05:17 -0400 http://snabbr.com/articles/how-to-delete-your-facebook-account
Basics of Computer Networking http://snabbr.com/articles/basics-of-computer-networking This article covers the basics of computer networking and is a brief introduction into how data is routed between networks.

The OSI Model

The Open Systems Interconnection model (OSI model) is a way of dividing computer communications between layers. Each layer is a grouping of similar services that provides service to the layer above and requests service from the layer below. The OSI model, brought forth by the Internato, how does the Internet work?

The Internet is a global network of computers. Each computer connected to the Internet must have a unique address, called an IP address in the form of xxx.xxx.xxx.xxx. Just like your address may be 123 Main Ave., snabbr.com, at the time of writing, resides at 74.208.81.115.

If you are connected to the internet through an Internet Service Provider (ISP), you are usually assigned a temporary IP address. If you are connected to a router on an internet network, you may be dynamically assigned a temporary IP address via Dynamic Host Configuration Protocol (DHCP). Static IP addresses can also be assigned. In any case, IP addresses are used to identify hosts on a Layer 3 (refer to the OSI model) network.

IP addresses can sometimes have a domain name assigned to them. For example "snabbr.com" resolves to 74.208.81.115. The domain is a human-readable format. When you enter an address into your web browser, a series of Domain Name Service (DNS) servers are queried for an IP resolution to the domain. Once a domain is resolved, we have the address and your connection is initiated.

The global Internet is broken down into several sub-networks. This is done with the use of routers and switches in a network topology. Down at the base, an IP is a 32-bit address split up into four 8-bit blocks.

The IP address:
  74.208.81.115
can be represented in binary dotted decimal notation as:
  01001010.11010000.01010001.01110011

IP Subnetting

IP addresses were originally defined by one of five classes (A through E). This classful addressing was used to determine the potential size of a network, but is no longer commonplace as classless addressing now allows for any netmask to be assigned to any IP address range. Consider the following table for a list of these different address classes:

Class Prefix 1st Octet # of Networks # of Hosts Dotted Decimal Range
A /8 1-126 128 16,777,216 1.0.0.1 to 126.255.255.254
B /16 128-191 16,384 65,536 128.1.0.1 to 191.255.255.254
C /24 192-223 2,097,152 256 192.0.1.1 to 223.255.254.254
D   224-2p;   224.0.0.0 to 239.255.255.255
E   240-254     240.0.0.0 to 254.255.255.254

Classes A through C are used for normal IP addresses, class D is used for multicast groups, and class E is reserved for future use. Now consider a class C address: you are allowed 2,097,152 networks and 256 hosts. A subnet mask is used to define a block of IP addresses (subnet) and can be rewritten in the form a prefix - a class C address has a prefix of /24, meaning 8 (32 - 24 = 8) bits available for hosts.

A /24 prefix means that the first 24 bits of an IP segment are already used and can be written out like 11111111.11111111.11111111.00000000.

IP address:              11000000.10101000.00000001.01100101 (192.168.1.101)
Subnet mask:             11111111.11111111.11111111.00000000 (255.255.255.0)
First available address: 11000000.10101000.00000001.00000001 (192.168.1.1)
Last available address:  11000000.10101000.00000001.11111110 (192.168.1.255)

Refer to the cheat sheet below for a list of classless networks in an IP network:

  Netmask Subnets Hosts
Class C
/32 255.255.255.255 256 1
/31 255.255.255.254 128 2
/30 255.255.255.252 64 4
/29 255.255.255.248 32 8
/28 255.255.255.240 16 16
/27 255.255.255.224 8 32
/26 255.255.255.192 4 64
/25 255.255.255.128 2 128
/24 255.255.255.0 1 256
Class B
/24 255.255.255.0 256 256
/23 255.255.254.0 128 512
/22 255.255.252.0 64 1,024
/21 255.255.248.0 32 2,048
/20 255.255.240.0 16 4,096
/19 255.255.224.0 8 8,192
/18 255.255.192.0 4 16,384
/17 255.255.128.0 2 32,768
/16 255.255.0.0 2 65,536
Class A
/16 255.255.0.0 256 65,536
/15 255.254.0.0 128 131,072
/14 255.252.0.0 64 262,144
/13 255.248.0.0 32 524,288
/12 255.240.0.0 16 1,048,576
/11 255.224.0.0 8 2,097,152
/10 255.192.0.0 4 4,194,304
/9 255.128.0.0 2 8,388,608
/8 255.0.0.0 1 16,777,216

Routing

A host with an IP address in one network can only communicate with other hosts in that same network. For example, a host at 10.24.32.19/8 can communicate with a server at 10.98.1.37/8, but has no route to a VoIP telephone on the 172.16.1.0/16 network - unless a router is present. Routing is the process of directing an IP data packet through a series of networks that stand between its source and destination.

A router can be used to define a set of rules for directing traffic between networks: To get to network B from network A, send traffic through router C. Router C, in this case, would have to have knowledge of both networks A and B. Routes can be configured as either static or dynamic routes. Static routes are more common in smaller networks and define a single next hop for a particular destination network, while dynamic routes are implemented with routing protocols like RIP, OSPF, EIGRP, IS-IS, BGP, etc. Routing protocols are beyond the scope of this article, as this is a network primer.

Switching

Just as a router routes packets by IP address at layer 3, switches switch packets by MAC address at layer 2. Some switches can process data at layer 3 or layer 4, but this is beyond the scope of this article. A switch operating at layer 2 connects multiple hosts in a particular network, and learns the MAC address of each connected device. Switches (also known as bridges) then forward data to their connected devices based on MAC address.

Networking Roundup

This article is a very brief overview of the vast world of networking and is intended for individuals who want to understand the very basics of how hosts are connected and how data traverses between networks in a very general manner.

]]>
Sun, 27 Feb 2011 15:18:24 -0500 http://snabbr.com/articles/basics-of-computer-networking
Resources for Web Developers http://snabbr.com/articles/resources-for-web-developers Web developers, especially those starting out, rely heavily on external resources to help them grow. In order to keep up with the latest technologies and trends, I have composed a list of resources that I have found useful. Hopefully you will too.

Inspiration

I will start off with my favorite - one that has helped me a great deal - Smashing Magazine. Smashing Magazine is an all-around blog and a gold mine of information for the web developer of any stature. With daily articles on the latest web design trends, beautiful wallpaper for your Mac, PC, iPhone, iPad, Droid, etc., icons, graphics and more, you're bound to get a feel for your next great design.

Graphics

Another obstacle plaguing my professional web design was procuring relevant images for my project. That is, until I discovered Dreamstime. Dreamstime provides the consumer with countless images searchable by keyword or phrase, costing as little as $1/graphic. This will also give you full rights to the image to use in as many projects as you like. Go to dreamstine now and search for free.

Domain Names

OK, so you have a great idea for a web application, but you need a clever domain name for it. Shout Domains should do the trick. Even if you have a perfect name for your site, you will notice that everything is taken! - This can be incredibly frustrating, however there is no need to fall prey and spend $20,000 on the domain you wish you had. Shout Domains allows the user to select keywords from a dropdown, and even enter in his or her own, and watch all the possibilities scroll before his or her eyes. It will even give you pricing from various hosting companies. I have used this app a few times to generate domain names for previous project, and I love it!

]]>
Thu, 17 Feb 2011 22:13:44 -0500 http://snabbr.com/articles/resources-for-web-developers
Easy Web Development with Coda and Versions http://snabbr.com/articles/easy-web-development-with-coda-and-versions This article covers the setup and configuration of Coda (one-window web development for OS X) and Versions (Mac subversion client). I have been using Coda for quite some time now, but just discovered Version, and needed to write about it.

Versions

Versions prides itself as being "the first easy to use Mac OS X Subversion client." and can be downloaded from their website. It costs about $53, but has a trial period so you can test before you buy. Once the app has been downloaded and installed, open it up and you will see something like the following:

The first thing you want to do here is create a new local repository. Click the "Create Local Repository" button, and fill out a name for it, as well as a location. In my case, I am calling my repository (repo) "snabbr", and placing it in my dropbox/SVN-Repositories directory in my home directory. Next, you will see your repo show up in the main window after you created it. Right click the name and navigate to "Import...".

An SVN import allows you to bring in existing code, which I have. When you select the source of the code you wish to import, you will be asked for Commit Message:

This can be anything you like; it's use is so that you can identify your changes when you need to roll back code in the future.

The last step, for now, is to "checkout" your code to a new directory (I store all my projects in the ~/Sites/ directory). You should still have your repo open in the main window of Versions. Right click the repository itself and select "Checkout". This will create your project in the location you specify. You should also notice that a ".svn" directory was created within your project (OS X hides files and folders starting with a "." by default, but it’s there). Coda will see this directory and will automatically kick in it’s SVN capabilities. Now that we have our repository set up, and code within it, lets jump over to Coda.

Coda

Coda is a "one-window web development" IDE provided by Panic. It will set you back about $99, but you have 14 days to decide if you like it or not. I personally love Coda. It’s got that great Mac OS X feel we all love. Get Coda here and install it like any other Mac app.

Open Coda up and you will see a navigation pane on the left, and display window on the right. Click the "Sites" icon above the main window and you should be greeted by a screen like this:

Click "Add Site..." and enter your information in the window that pops up. You will notice that once you've filled in the details in the "Site" section, your Repository URL will be filled in automatically. Coda read the ".svn" directories within your project's filesystem to procure this data.

Verify that all the information is correct and click the Save button. You shall now see a screen like the following:

Double-click on the site's image you have there and Coda will automatically bring forth that project's files. In the following example, I modifed my about.php page to show off how Coda's built-in SVN works.

As you can see, a little "M" shows up to the right of the filename indicating that this file was modified. You should also notice that a button to "Publish All" appears. This lets you upload any modified files into their perspective directories on the remote server. Cool, huh?

So now that you have a file that's been modified, flip over to the Remote tab in the left pane to connect to your remote server. On the bottom of the left pane, you will see an icon that looks like a black box. This brings up the Source Control Status window where you can update your code live on your production machine:

Congratulations! You are now all set up with an efficacious development environment on your Mac. For more information on Versions and how to properly manage your repositories, visit Versions – Support.]]> Sun, 13 Feb 2011 12:34:06 -0500 http://snabbr.com/articles/easy-web-development-with-coda-and-versions Postfix Message Filtering and Archiving http://snabbr.com/articles/postfix-message-filtering-and-archiving This article outlines the information needed to set up content filtering and archiving of your emails, assuming you have a fully configured Postfix setup on your Linux server.

First off, open up the postfix master configuration file:

# vi /etc/postfix/master.cf

Look for this line and append the following text to it:

smtp inet n - n - - smtpd -o content_filter=spamfilter:dummy -o receive_override_options=no_address_mappings

The first option line tells any smtp packets to pass through the "spamfilter" content filter which will be defined next. The second option is only really needed if your postfix is configured for virtual email aliases. The receive_override_options directive will prevent from duplicating emails. Now on to the spamfilter content filter. Add this somewhere in your master.cf file:

spamfilter unix - n n - - pipe flags=Rq user=spamfilter argv=/usr/local/bin/mailfilter.sh -f ${sender} -- ${recipient}

"spamfilter" is the content filter you issued before. Specify the script you want to run against every email coming in and out of the system, and the user to run. In this case, we will be running the mailfilter.sh file with the options "-f ${sender} -- ${recipient}" by the user "spamfilter".

Now create the mailfilter script:

# touch /usr/local/bin/mailfilter.sh

I'll leave the creativity up to you, but you can really do whatever you want here. You can grep out specific strings in email messages and forward/archive/whatever, depending on specific rules. You need to make sure you forward the mail on with sendmail, or else your mail will just die there. I use spamassassin to handle all the tagging of my emails, and then i look for specific rules flagged by spamassassin in the header and work with my mail from there. For example, if there is a message that matches my profanity rule, I send it to a sideline directory, bounce the message back to sender, and CC it to the appropriate supervisor of said employee.

I uploaded a sample mailfilter script for you to analyze: mailfilter.sh

]]>
Fri, 02 Apr 2010 00:00:00 -0400 http://snabbr.com/articles/postfix-message-filtering-and-archiving
SNMP / NetFlow Setup on a Cisco / Linux Network http://snabbr.com/articles/snmp-netflow-setup-on-a-cisco-linux-network For this article, I will be demonstrating a way for you to set your router up for NetFlow, and a Linux server (Debian, in this case) to capture the flows. NetFlow is a network protocol developed by Cisco Systems to run on Cisco IOS-enabled equipment for collecting IP traffic information.

o

First, on the Cisco end, we need to enable NetFlow, and tell it where to send its flows.

o # Configure SNMP
snmp-server community snabbr RO
snmp-server ifindex persist
snmp-server location NJ
snmp-server contact Arthur

# Configure NetFlow Globally
ip flow-export version 5
ip flow-export destination 10.0.0.2 2056
ip flow-top-talkers
  top 10
  sort-by bytes

# Configure NetFlow on the interfaces
interface Multilink1
  ip flow ingress
  ip flow egress
  ip route-cache flow
interface FastEthernet0/1
  ip flow ingress
  ip flow egress o
o

Keep in mind that "snabbr" above is the SNMP community, and that the same must be configured for snmpd on your Linux server. The default community, I believe, is "public". Also assume that 10.0.0.2 is the IP address of your Linux server, and 2056 is the port you want the server to listen in on for the NetFlow packets. Now on to setting up NetFlow Analyzer on Debian Linux.

o # Install flow-tools
apt-get update
apt-get install flow-tools

# Edit the configuration file
vi /etc/flow-tools/flow-capture.conf

# Change the line in there to look like the following:
-V 5 -E 5G -N 0 -w /var/flow/router 0.0.0.0/10.0.0.1/2056 o
o

Here, we're binding on 0.0.0.0, and listening on the router's IP (10.0.0.1) on port 2056, as configured on the router earlier. Now restart flow-capture...

o /etc/init.d/flow-capture restart o o

...and watch the flows being generated in the /var/flow/router/ directory. You can use the flow-print command to see them better:

o # flow-print < /var/flow/router/ft-v05.2010-03-29.171501-0400 | more o o

If you see flows, great! If not, make sure your router is producing them. Try

o # show ip cache flow o o

...and verify that it is sending the data to the correct IP address. Also remember to check your logs.

]]>
Tue, 30 Mar 2010 08:17:04 -0400 http://snabbr.com/articles/snmp-netflow-setup-on-a-cisco-linux-network
Connecting to a Cisco Console with a MacBook http://snabbr.com/articles/connecting-to-a-cisco-router-with-a-macbook This article outlines procedures for setting your MacBook up for a console connection to your Cisco device using ZTerm.

This is a very simple setup. You'll need two files off the internet:

o
    o
  1. You will need software that is capable of talking to the router's console port: ZTerm does the trick well. Get ZTerm here.
  2. o
  3. Assuming you already have a console cable, and a USB to Serial adapter, you will need drivers for said adapter, or ZTerm won't be able to find the router. Get the PL2303 USB to Serial drivers here.
  4. o
o

The installation procedure for both is like any other Mac app. Just drag to your applications, or follow the README/INSTALL files if they exist.

o

Once installed, open up ZTerm, and navigate to Settings->Connection in the menu bar. Click OK, and you can connect by navigating to Dial->Local.

]]>
Sat, 27 Mar 2010 13:47:58 -0400 http://snabbr.com/articles/connecting-to-a-cisco-router-with-a-macbook