News: This forum is now permanently frozen.
Pages: [1]
Topic: M0n0wall Kernel Configuration  (Read 947 times)
« on: January 04, 2015, 09:13:33 »
vasiqmz *
Posts: 16

I had changed the core firewall of M0n0wall from ipf to ipfw. And to enable the Logging feature of it, I modified the Kernel Configuration file of it. But when I check the dmesg it says Logging is Disabled. I don't know why it doesn't enable itself then I was looking for the Kernel Config file in m0n0wall and since in FreeBSD it's located in /usr/src/sys/../conf .. but I don't see these folders in the m0n0wall directory at all.

Where is the Kernel Config located in m0n0wall ?
« Reply #1 on: January 04, 2015, 09:42:10 »
azdps **
Posts: 63

When you first download the m0n0wall source code you should end up with a folder called freebsd8 if you download the freebsd8 branch. Anyways, there are 2 config files that are nested within the freebsd8 folder. Look for M0N0WALL_GENERIC.amd64 or M0N0WALL_GENERIC.i386. Modify the one you need. This whole freebsd8 source code folder will be copied over to the /usr/m0n0wall/build84  folder after executing go.sh, etc scripts.
« Reply #2 on: January 04, 2015, 13:31:42 »
vasiqmz *
Posts: 16

Yes I know that and I did some changes in the Kernel Config in those two files only and I don't see them working in the m0n0wall which is why I thought i'll have a look at the current kernel config and see if the changes were applied or not.
I activated the IPFW firewall with the logging in the Kernel Config, the ipfw enables but the the Logging doesn't start.
« Reply #3 on: January 04, 2015, 21:53:55 »
azdps **
Posts: 63

If you are using the scripts provided with the m0n0wall source code, 1makebuildevn.sh, 2makebinaries.sh etc, then the M0N0WALL_GENERIC config file located in the following directory is the config file that will be used:

/usr/m0n0wall/build84/tmp/sys/i386/conf/

I'm not sure if your using the doall.sh script or not. I wouldn't but instead execute each of the scripts in order.

1makebuildenv.sh
2makebinaries.sh
3patchtools.sh

Stop here, then check the M0N0WALL_GENERIC config file located at /usr/m0n0wall/build84/tmp/sys/i386/conf/. Make sure the config file contains your changes because that is what the next script will use. After verifying your changes execute the next 2 scripts.

4buildkernel.sh
5makeimage.sh

I'm just trying to assist you to make sure your building m0n0wall with changes you made to the config file. You might want to post your kernel config file. Maybe someone can spot something potentially wrong.
« Reply #4 on: January 05, 2015, 07:43:46 »
vasiqmz *
Posts: 16

I checked the configuration of the kernel in the /usr/m0n0wall/build84/tmp/sys/i386/conf/ and the config file contains my modified changes. Here's my modification that I had made in the kernel configuration.

I had added these lines in the end of the file. Rest of the file is same.
Code:
#IPFW Firewall
options    IPFIREWALL         # enables IPFW
options    IPFIREWALL_VERBOSE # enables logging for rules with log keyword
options    IPDIVERT         # enables NAT

And when I start m0n0wall and I checked the dmesg.boot file and this is what it says about ipfw

Code:
ipfw2 (+ipv6) initialized, divert enabled, nat loadable, rule-based forwarding enabled, default to deny, logging disabled

I even tried to add rc.conf file in the system with settings but still it didn't start the logging.
Code:
firewall_logging="YES"

Did I go wrong somewhere or is there any file that's missing ?
« Reply #5 on: January 05, 2015, 08:04:16 »
vasiqmz *
Posts: 16

It works now .... I made a huge mistake because I was looking for SECURITY file in /var/log because that's where the FreeBSD by default writes all the logging of the firewall but instead it was writing all of that in system.log

I guess now I'll have to change the settings in syslog.conf to write the firewall log in SECURITY file.

Anyways thanks for your help.

 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines