User Tools

Site Tools


freebsd_firewall

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

freebsd_firewall [2023/06/20 05:19] – created chrisfreebsd_firewall [2026/02/08 02:37] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== FreeBSD IPFW Firewall ======
 +
 +This is a base service so all you need is a few rc.conf vars
 +Download this conf and add it to /etc/rc.conf.d and run service ipfw start
 +
 +<code txt rc.conf>
 +firewall_enable="YES"
 +firewall_type="WORKSTATION" 4
 +firewall_trusted="xx.xx.xx.xx" 1
 +firewall_myservices="22/tcp 53/tcp 53/udp 80/tcp 443/tcp 20/tcp 21/tcp 1984/tcp 25/tcp 143/tcp 993/tcp" 2
 +firewall_allowservices="any" 3
 +</code>
 +
 +  - 1. your personal IP is always trusted
 +  - 2. List of ports that will have services running
 +  - 3. allow all from the services, this setup you can't do this per port so allow all
 +  - 4. this is 1 computer so we use the workstation
 +
 +<code>
 +sysrc blacklistd_enable="YES"
 +touch /etc/ipfw-blacklist.rc
 +vim /etc/blacklistd.conf #edit the default and add some whitelists for IP's
 +</code>
 +
 +Basic firewall using IPFW
 +
 +I don't use PF on FreeBSD as it lacks a lot of features from OpenBSD and I believe each OS should stick to it's own firewall and either add in options to it, we really dont need 3 firewall's in a OS. Each firewall has it's pros and cons.
 +
 +
  

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki