# Problem With IPFW



## Slash93 (Dec 29, 2010)

Hallo,

When I install the firewall IPFW,  I go to /usr/src/sys/1386/conf/ to change the file GENERIC. But the problem is I haven't the files in /usr/src/sys/1386/conf/.

How do I get them? 

I use FreeBSD 7.1 32 bit 

Thanks.


----------



## DutchDaemon (Dec 29, 2010)

Either extract the kernel sources from the installation CD/DVD, or use csup(1) to grab a copy from the net. Use the relevant chapter from The Handbook (also available in Italian). There's too much to explain about building and installing a customized kernel, so make sure you read the handbook.


----------



## Slash93 (Dec 29, 2010)

I don't have the CD of installation, I Buy the server with FreeBSD from a holding.

I Pay The server Only month


----------



## DutchDaemon (Dec 29, 2010)

I don't see the relevance. Get the kernel sources from the Internet, as described earlier.


----------



## vand777 (Dec 30, 2010)

Slash93 said:
			
		

> I don't have the CD of installation, I Buy the server with FreeBSD from a holding.
> 
> I Pay The server Only month



To download/sync kernel source code:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html


----------



## codeWarrior (Dec 30, 2010)

You don't need to rebuild the kernel to enable ipfw UNLESS you need to do NAT...  Just enable ipfw in rc.conf 
	
	



```
ipfw_enable="yes"
```

create your firewall rules

and reboot... 

but be careful: the default ipfw configuration will lock you out because the default rule is to deny all... so make sure you know what you are doing BEFORE you lock yourself out of the box...


----------



## phoenix (Jan 4, 2011)

Correction: you can load the libalias module and use *ipfw nat* rules for NAT.


----------

