A Brief Introduction To Regular Expressions

What is a Regular Expression?

Purpose

A regular expression is a flexible way of defining patterns of text. It is a formal language which is interpreted by a regular expression engine (which might be part of an application or a programming language) that parses input text and compares it to the regular expression, and then performs operations on text that matches the regular expression.

Common uses of regular expressions include:

  • Matching text
  • Substituting text
  • Extracting text

Syntax

The basic syntax of a regular expression is /pattern/flags. The main part is the text pattern description, and the flags control the behaviour of the regular expression engine.

Different regular expression engines support different features, and also slightly vary in their syntax. After a overview of general regexp syntax we will look at some common applications and languages and how they support regular expressions.

Continue reading

Net booting a diskless Sun3 from a Linux server

My system consists of a Linux server (basically Slackware-3.6 but with kernel 2.2.10 and various other irrelevant package upgrades) and 2 Sun3’s, only one of which is ever in use at any given time (thus they use the same swap partition on the server – later).

The Sun3’s are diskless and hence boot from the Linux box, and mount all filesystems from it. The Sun’s run NetBSD 1.3.2 largely because the Sun 3 port of Linux was not very stable or mature when I set things up.
Continue reading

Linux firewalls

Linux Firewalls

What is a firewall?

  • A firewall is a controlled gateway between one network and another (i.e. an intranet and the internet).
  • It is not a universal panacea for computer security. You must follow other good security practices.

Why Firewalls?

  • You cannot trust everyone. Some people take pleasure in hacking into machines. Not all are malicious but some are!
  • Your computer holds private/confidential data an you have a duty to protect it.
  • You want to limit access from within your private network to specific external information/services (i.e. not mpeg3’s)
  • You want to monitor/record traffic for audit/security purposes. Beware of privacy laws!

Continue reading

Configuring Email Systems

NELUG, 7/6/2000

Eddy Younger (eddy@shofar.uklinux.net)

Software Components of the Email System

There are principally three classes of software components involved in transfering a mail message from the sender to the recipient:

  1. MUA – mail user agent, used to read, compose and post mail.
  2. MTA – mail transport agent. MTA’s at the source and destination hosts (and possibly also intermediate hosts) pass the messages from one to another
  3. MDA – mail delivery agent. At the ultimate destination host, the MDA receives the message from the local MTA and delivers it to its ultimate destination, usually the recipient’s mailbox file.

In the modern world almost all email transport is achieved using SMTP – the Simple Mail Transport Protocol – or its Extended variant ESMTP. MTA’s speak to each other in (E)SMTP. You can send mail without using a MUA if you wanted to, by talking SMTP directly to the MTA, and it used to be possible to do all kinds of nefarious things by doing so, though thankfully most mail servers are much more secure in these days of Skript Kiddies and Spam.

Continue reading

An Introduction to the Internet Protocols

NELUG meeting 16/2/2000
Richard Mortimer

Overview

  • Internet connects millions of machines around the world.
  • Allows machines to find/talk to each other.
  • No one machine knows the whole of the network (knowledge is distributed).
  • Supports the “languages” (protocols) that various applications use to talk to each other – done in layers.
  • Example:
    applications
    protocol layer – http, ftp, nfs
    tcp udp
    ip icmp
    Hardware layer (ethernet, token ring, ppp)

    Continue reading