Commit b167fd39 authored by Seblu's avatar Seblu
Browse files

add ferm

up kernel


git-svn-id: https://seblu.net/s/archpkg@3 02741741-5192-46b8-8916-7152b19231d9
parent aba080e1
Loading
Loading
Loading
Loading

ferm/PKGBUILD

0 → 100644
+39 −0
Original line number Diff line number Diff line
# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>
# Contributor: Marti Raudsepp <marti@juffo.org>
# Contributor: Manuel Mazzuola <origin.of@gmail.com>
pkgname=ferm
pkgver=2.0.7
pkgrel=2
pkgdesc="Easy iptables wrapper for mantaining complex firewalls"
arch=('any')
url="http://ferm.foo-projects.org/"
license=('GPL')
depends=('iptables' 'perl')
source=(
  http://ferm.foo-projects.org/download/2.0/$pkgname-$pkgver.tar.gz
  rc.d
  conf.d
  ferm.conf
  ) 

md5sums=('3446f96a19c579cc628ac66dc7cd81ba'
         'b88448c62f37d6400fdde412467ceefc'
         'beac7f5a6e44094637954161b2786dd4'
         '314ebaf66abbe754850449359620e2d8')

package() {
  # software setup
  cd "${srcdir}/$pkgname-$pkgver"
  make PREFIX="${pkgdir}/usr" install || return 1

  # setup rc.d script
  install -D -m 755 "${startdir}/rc.d" "${pkgdir}/etc/rc.d/ferm"
  
  # setup conf.d file
  install -D -m 644 "${startdir}/conf.d" "${pkgdir}/etc/conf.d/ferm"

  # setup default config
  install -D -m 644 "${startdir}/ferm.conf" "${pkgdir}/etc/ferm.conf"
}

# vim:set ts=2 sw=2 ft=sh et:

ferm/conf.d

0 → 100644
+8 −0
Original line number Diff line number Diff line
#
# Arguments to be passed to ferm
#

FERM_CONFIG="/etc/ferm.conf"
FERM_ARGS=""

# vim:set ts=2 sw=2 ft=sh et:

ferm/ferm.conf

0 → 100644
+40 −0
Original line number Diff line number Diff line
# -*- shell-script -*-
#  Configuration file for ferm(1).

table filter {
    chain INPUT {
        policy DROP;

        # connection tracking
        mod state state (ESTABLISHED RELATED) ACCEPT;

        # allow local packet
        interface lo ACCEPT;

        # allow icmp is a good idea
        proto icmp ACCEPT; 

        # allow SSH connections
        proto tcp dport ssh ACCEPT mod state state NEW;
    }
    chain OUTPUT policy ACCEPT;
    chain FORWARD {
        policy DROP;

        # connection tracking
        mod state state (ESTABLISHED RELATED) ACCEPT;
    }
}

# IPv6:
#domain ip6 {
#    table filter {
#        chain INPUT {
#            policy ACCEPT;
#            # ...
#        }
#        # ...
#    }
#}

# vim:set ts=2 sw=2 ft=sh et:

ferm/rc.d

0 → 100644
+38 −0
Original line number Diff line number Diff line
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

FERM="/usr/sbin/ferm"

[ -f /etc/conf.d/ferm ] && . /etc/conf.d/ferm

case "$1" in
  start)
    stat_busy "Starting ferm"
    $FERM $FERM_ARGS $FERM_CONFIG
    if [ $? -gt 0 ]; then
      stat_fail
    else
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping ferm"
    $FERM -F $FERM_ARGS $FERM_CONFIG
    if [ $? -gt 0 ]; then
      stat_fail
    else
      stat_done
    fi
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0

# vim:set ts=2 sw=2 ft=sh et:
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ package() {
  cd ${srcdir}/linux-$_srcver

  # get compiled kernel version
  _compver="$(make kernelrelease)"
  _compver="$(make kernelrelease 2>/dev/null)"

  # installing modules
  mkdir -p ${pkgdir}/{lib/modules,boot}
Loading