Layered Tech Support Forums  

Go Back   Layered Tech Support Forums > Operating Systems. > BSD Based Operating Systems

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2004, 04:10 AM
delo- delo- is offline
Unix Monkey and Head Chimp
 
Join Date: Feb 2004
Location: Dallas Texas
Posts: 7
delo- is on a distinguished road
Default FreeBSD Firewall Host Based Firewalls

FreeBSD supports 3 firewall systems in 5.x and 2 in 4.x they are.

5.x
IPFW2 native freebsd firewall.
IPF http://coombs.anu.edu.au/~avalon/
PF http://www.openbsd.org/faq/pf/index.html

4.x
IPFW
IPF

As for sample scripts you can use the one located in /etc/rc.firewall. By default there is a 3 types. "open" "simple" "client" If you view the rc.firewall file with a text edit you can read the comments for more information on each type. The one you will want to use on a FreeBSD server is "simple". You can use the script /usr/share/examples/ipfw/change_rules.sh to modify and reload the IPFW firewall. You will need to be familar with 'vi' to use the change_rules script unless you have changed your default editor to something else.

IPFW is a pretty nice firewall with some built in traffic shaping tools that are availble with 'dummynet' The syntax is pretty easy to understand and write yourself.

For more information on ipfw read

man firewall
man ipfw

http://www.allneo.com/freebsd/rc.firewall

You can download a 'simple' firewall that I use on some of my WWW hosting servers. This is a good basic firewall and could be tuned to make it much more secure and fine grained control. READ THE COMMENTS IN THE rc.firewall there is a few settings you need to change to match your host.

IPF is another firewall package that is written by Darren Reed. Its a very nice firewall package and the next release will have features like 'altq' for traffic shapping and other class of service tools. I use to run IPF on my gateway firewalls until I found 'pf' and never turned back.

PF so far from what I have found is a swiss army knife of firewalls. You can do everything from traffic shapping and packet filters, Load balancing with rdr, Failover support (CARP), builtin nat support, firewall failover tools with 'pfsync' and other nice features to piss off spammers with 'spamd'. If you have 5.x installed and are experienced with firewalls I would compile my kernel to support the 'pf' port and use it. The syntax is very easy to understand and has great features like $macros, $lists and <tables> and a similar syntax to 'ipf' but shorter and easier to write.

Using $macros, $liists and <tables> allows you to write the same rules for 1 host or 100000 hosts and store the IP or Port and other rules information in txt files to include. This has 2 advantages. 1 it allows you to keep your pf.conf really neat and tidy and 2 using tables instead of multiple rules speeds up things quite a bit.
Reply With Quote
  #2  
Old 12-01-2004, 06:39 AM
dunxd dunxd is offline
I Got A BANANA Today!
 
Join Date: Nov 2004
Location: London, UK
Posts: 31
dunxd is on a distinguished road
Default

I would really like to implement this on my server, but don't really know where to start.

I ran change_rules.sh script, which opened up rc.firewall in vi. However, this file also mentions rc.conf which requires configuring too.

I am unclear about what to put for net, mask and IP - where would I find this information about my server? I know the IP address(es) but not net or mask for local network.

For newbies like myself, is there anything simpler which will get me up and running faster?

Dunx
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Update Your FreeBSD 4.x / 5.x Server delo- BSD Based Operating Systems 21 02-04-2008 03:51 PM


All times are GMT -5. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright, 2003 - 2007 Layered Technologies