[Solved] Firewall

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
christophe60_fr
Posts: 48
Joined: Thu Oct 29, 2015 3:05 pm
Has thanked: 0
Been thanked: 0

[Solved] Firewall

Post by christophe60_fr »

Hello,

How to enable - and disable - the firewall ?
(GhostBSD 10.3 XFCE 64-bit).

Thanks.
Last edited by christophe60_fr on Thu Sep 15, 2016 6:38 am, edited 1 time in total.

ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm
Has thanked: 0
Been thanked: 1 time

Re: Firewall

Post by ASX »

GhostBSD doesn't ship with a firewall, (you can choose among several available in FreeBSD),
pf is one commonly used in FreeBSD

place in /etc/rc.conf:

Code: Select all

pf_enable="YES"
and customize your filters as fit your needs, below an example from pf.conf man page, that basically allow any traffic going outside and only traffic on port 25 inward.

Code: Select all

           ext_if = "kue0"
           all_ifs = "{" $ext_if lo0 "}"
           pass out on $ext_if from any to any
           pass in  on $ext_if proto tcp from any to any port 25
Hope that help, even if I'm not sure this is what you would have read. ;)

christophe60_fr
Posts: 48
Joined: Thu Oct 29, 2015 3:05 pm
Has thanked: 0
Been thanked: 0

Re: Firewall

Post by christophe60_fr »

Yes, that's exactly what I needed.
But in what file to put these rules ? Should I create a pf.conf ?

ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm
Has thanked: 0
Been thanked: 1 time

Re: Firewall

Post by ASX »

christophe60_fr wrote:Yes, that's exactly what I needed.
But in what file to put these rules ? Should I create a pf.conf ?
Yes, /etc/pf.conf, sorry, seems I forgot to mention that.

moonraven
Posts: 1
Joined: Sun Nov 03, 2019 1:51 pm
Has thanked: 0
Been thanked: 0

Re: Firewall

Post by moonraven »

ASX wrote:
Mon Sep 12, 2016 7:28 pm
GhostBSD doesn't ship with a firewall, (you can choose among several available in FreeBSD),
pf is one commonly used in FreeBSD

place in /etc/rc.conf:

Code: Select all

pf_enable="YES"
and customize your filters as fit your needs, below an example from pf.conf man page, that basically allow any traffic going outside and only traffic on port 25 inward.

Code: Select all

           ext_if = "kue0"
           all_ifs = "{" $ext_if lo0 "}"
           pass out on $ext_if from any to any
           pass in  on $ext_if proto tcp from any to any port 25
Hope that help, even if I'm not sure this is what you would have read. ;)
My /etc/pf.conf file was empty so i just added those rules to the empty /etc/pf.conf file and save it. Was it right or is it another way to add the rules?

Leveret
Posts: 2
Joined: Thu Aug 31, 2017 7:52 pm
Has thanked: 0
Been thanked: 0

Re: [Solved] Firewall

Post by Leveret »

I don't see firewall rules loaded message on screen when booting up. I did place the firewall_enable="YES" in /etc/rc.conf. I ask because this shows up on FreeBSD. Is there a way to test and make sure the firewall is active?

Post Reply