# kernels?



## GermanyEmpty (Oct 5, 2010)

How can I check which kernels are installed? I need an IPFW kernel, how can I check if it is installed?


----------



## Beastie (Oct 5, 2010)

There is only one default kernel, the GENERIC kernel, and it has IPFW as a module (/boot/kernel/ipfw.ko).
Check the handbook for more information.


----------



## SirDice (Oct 6, 2010)

The command `% uname -a` will show you which kernel is currently being used. If you haven't built a custom kernel this will most likely be GENERIC.


----------



## wblock@ (Oct 6, 2010)

GermanyEmpty said:
			
		

> How can I check which kernels are installed? I need an IPFW kernel, how can I check if it is installed?



`# kldload ipfw`

If it gives an error, then IPFW is already built into the kernel.

You could also just load the module in /boot/loader.conf:

```
ipfw_load="YES"
```

Again, that will give an error if IPFW is already in the kernel, but (I think) cause no problems.  So the system will start with IPFW loaded whether the kernel has it or not.


----------



## aragon (Oct 6, 2010)

Do NOT load the ipfw kernel module unprepared.  Upon loading it defaults to denying all traffic to/from your system.  If you want to check if it is enabled do either:

`# ipfw list`

or

`# kldstat -v |grep ipfw`

The first command will print an error if there's no ipfw support.  The second command will print nothing if there's no ipfw support.

If you need to load the module live, do this instead:

`# (kldload ipfw; sleep 1; ipfw add 1 allow ip from any to any) &`


----------

