You are not logged in.

#1 2004-05-14 16:49:31

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

[network: security] gShield (firewall builder)

gShield is an iptables firewall for use with the modern series of the Linux kernel. It is easily configurable, and supports a wide range of features.

Features:
- configurable public service access
- access control lists
- routable protection
- port-forwarding
- transparent proxies
- and more!

This package just wraps this very usefull bash script (together with  configuration files).

PKGBUILD:

# Maintainer: Mircea Ionut Bardac <dev [at] mircea (dot) bardac (dot) net>
pkgname=gshield
pkgver=2.8
pkgrel=2
pkgdesc="gShield is an iptables firewall script tool for use with the modern series of the Linux kernel."
url="http://muse.linuxmafia.org/gshield/"
backup=(etc/firewall/gShield.conf 
        etc/firewall/conf/{NATS,client_hosts,global_content_drop,no_log_ports,black_listed_hosts,
        client_services,highport_access,open_ports,blocked_addresses,closed_ports,http_string_drop,
        pptp_allowed_hosts,blocked_outgoing,forwards,multicast,reserved_addresses} 
        etc/firewall/routables/{routable.rules,routable_hosts,routables.conf} 
       )
depends=('iptables' 'perl' 'bash')
install=$pkgname.install
source=(ftp://muse.linuxmafia.org/pub/gShield/v2/gShield-$pkgver.tgz)
md5sums=('46521eb1ffef68d5a9c45727a99e2baa')

build() {
  cd $startdir/src/gShield-$pkgver
  chmod +x tools/gforward.pl
  chmod +x tools/gshield.pump
  chmod +x tools/tracker.pl
  mkdir -p $startdir/pkg/etc/firewall
  cp -r * $startdir/pkg/etc/firewall
}

gshield.install:

# arg 1:  the new package version
post_install() {
  echo
  echo "HOWTO:"
  echo "1. edit 'gShield.conf' in /etc/firewall"
  echo "2. (optional): edit files in '/etc/firewall/conf/' and in '/etc/firewall/routables/' appropriately"
  echo "3. run '/etc/rc.d/iptables stop' if you're running 'iptables' daemon that comes with Arch"
  echo "4. run 'gShield.rc' in /etc/firewall to generate the firewall rules"
  echo "5. run 'iptables-save > /etc/iptables/iptables.rules' to save the rules"
  echo "6. run '/etc/rc.d/iptables start' to start the firewall"
  echo "7. add 'iptables' to the DAEMONS=('...') line in '/etc/rc.conf' if it isn't already there"
  echo
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  echo
  echo "HOWTO:"
  echo "1. edit 'gShield.conf' in /etc/firewall"
  echo "2. (optional): edit files in '/etc/firewall/conf/' and in '/etc/firewall/routables/' appropriately"
  echo "3. run '/etc/rc.d/iptables stop' if you're running 'iptables' daemon that comes with Arch"
  echo "4. run 'gShield.rc' in /etc/firewall to generate the firewall rules"
  echo "5. run 'iptables-save > /etc/iptables/iptables.rules' to save the rules"
  echo "6. run '/etc/rc.d/iptables start' to start the firewall"
  echo "7. add 'iptables' to the DAEMONS=('...') line in '/etc/rc.conf' if it isn't already there"
  echo
}

# arg 1:  the old package version
pre_remove() {
  /bin/true
}

# arg 1:  the old package version
post_remove() {
  /bin/true
}

op=$1
shift

$op $*

The built package can be found here here.
The sources can be found here.

It installs in /etc/firewall, according to the README. It can called directly on boot, but I preffer to save the iptables generated by it with 'iptables-save' and load them with the default iptables daemon.

Any comments are welcomed.

Fixed: pkgname must be all lowercase (also, gShield.install was renamed to gshield.install)

Offline

#2 2004-06-09 09:42:06

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [network: security] gShield (firewall builder)

Updated the previous post for PKGBUILD-2.
I've changed the .install file by adding a usefull HOWTO.

Enjoy.

Offline

#3 2004-06-09 19:05:03

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: [network: security] gShield (firewall builder)

thanks IceRAM. have you tried firestarter? is this better
thx

Offline

#4 2004-06-09 22:32:47

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [network: security] gShield (firewall builder)

THE difference:
- gShield is a console script.
- firestarter needs gnome...

I haven't looked at the firestarter config files, but... as far as I can see from the webpages.. I think that gShield is more complete.

Offline

#5 2004-06-10 18:30:34

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [network: security] gShield (firewall builder)

P.S. I wouldn't use graphical apps to configure important parts of my system (such as the firewall) - I need to have control even if X does not work, etc.

Note: gShield is now in <incoming>.

Offline

#6 2004-10-17 12:50:35

alkat
Member
Registered: 2004-10-16
Posts: 27

Re: [network: security] gShield (firewall builder)

hi,

i tried installing gshield using what i found here:
http://mircea.bardac.net/packs/gShield-2.8-2.pkg.tar.gz
http://mircea.bardac.net/packs/src/gshield

but it doesn't work. it stop saying:
==> Validating source files with MD5sums
    gShield-2.8.tgz ... FAILED
==> ERROR: One or more files did not pass the validity check!


what am i doing wrong?

note that this is the first time i try installing a package without using pacman from the net...

.a.

Offline

#7 2004-10-17 13:25:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,914
Website

Re: [network: security] gShield (firewall builder)

check package md5 sum with

md5sum <package.tar.gz>

then edit PKGBUILD....

Give it another go .....

HTH


Mr Green

Offline

#8 2004-10-17 20:40:48

alkat
Member
Registered: 2004-10-16
Posts: 27

Re: [network: security] gShield (firewall builder)

Mr Green wrote:

check package md5 sum with

md5sum <package.tar.gz>

then edit PKGBUILD....

Give it another go .....

HTH

ok, now i have this problem:
/usr/bin/makepkg: line 552: build: command not found

sad

.a.

Offline

#9 2004-10-18 08:15:15

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,914
Website

Re: [network: security] gShield (firewall builder)

Check PKGBUILD have you got a } on the end ?


Mr Green

Offline

Board footer

Powered by FluxBB