Tutorial Index Page

Understanding the GhostBSD Firewall

GhostBSD uses PF (Packet Filter) as its built-in firewall. PF is a powerful and flexible firewall system originally developed for OpenBSD, and it's also used in FreeBSD (which GhostBSD is based on).

What Does a Firewall Do?

Is the Firewall Enabled by Default?

Yes, GhostBSD enables PF by default with a basic configuration that protects your system while allowing common network activity.

Where Is the Firewall Configuration?

The main configuration file is located at:

/etc/pf.conf

This file contains rules that control which traffic is allowed or blocked.

Viewing the Current Rules

To see the active firewall rules, open a terminal and run:

sudo pfctl -sr

Restarting the Firewall

If you make changes to pf.conf, you can reload the firewall with:

sudo pfctl -f /etc/pf.conf

Example Rule

Here's a simple rule that allows all outgoing traffic and blocks incoming traffic:

set skip on lo
block in all
pass out all keep state

Tips for Beginners

Conclusion

The GhostBSD firewall is a powerful tool for keeping your system secure. With a little practice, you can customize it to suit your needs and feel confident about your network safety.

Feedback & Suggestions

If you spot any typos, unclear instructions, or areas for improvement, I’d love to hear from you. This project is built for GhostBSD users, by GhostBSD users—and your input helps shape it.