[ale] ipfwadmin rules?
Jeremy T. Bouse
undrgrid at undergrid.net
Fri Jun 5 18:05:17 EDT 1998
-----BEGIN PGP SIGNED MESSAGE-----
On Fri, 5 Jun 1998, Nomad the Wanderer wrote:
> Date: Fri, 5 Jun 1998 15:47:58 -0600
> From: Nomad the Wanderer <nomad at orci.com>
> To: Atlanta Linux Enthusiasts <ale at cc.gatech.edu>
> Subject: [ale] ipfwadmin rules?
> If I wanted to block all incoming connections, except ssh and ftp what
> rules would I use? I read the manpage but for some reason, it's just not
> sinking in...
Try these rules for ipfwadm right from my /etc/init.d/netbase on
my home computer:
echo "Flush tables..."
ipfwadm -I -f
ipfwadm -O -f
echo -n "Setting incoming filters: "
ipfwadm -I -p deny
echo -n "ICMP "
ipfwadm -I -a deny -b -o -P icmp -S 0.0.0.0/0 -D 0.0.0.0/0
echo -n "ftp "
ipfwadm -I -a accept -b -P tcp -S 0.0.0.0/0 -D 0.0.0.0/0 20
ipfwadm -I -a accept -b -P tcp -S 0.0.0.0/0 -D 0.0.0.0/0 21
echo -n "ssh "
ipfwadm -I -a accept -b -P tcp -S 0.0.0.0/0 -D 0.0.0.0/0 22
That should work for you... will only allow FTP and SSH
connections to ports 20-22 while all Outgoing traffic would be able to go
out without a problem... You could expand this to any other service by
duplicating the lines and changing the port number.
Jeremy T. Bouse
Jeremy T. Bouse - SouthNet TeleComm Services, Inc - www.STSI.net
PGP ID/Fingerprint: 1024/E83D9AE5/4ACC03F098D78198 19D0593E50E597E9
Public PGP key availble by sending email with 'send pgpkey' in subject
undrgrid at UnderGrid.net - NIC Whois: JB5713 - undrgrid at STSI.net
/earth is 98% full ... please delete anyone you can.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the Ale