Click to See Complete Forum and Search --> : about IPFW


aeav
03-20-2005, 05:09 PM
well, I have a mistake, when I try to execute these commands:

cmd="ipfw -q add"
interface="em0"

# bloqueiar o netbios
$cmd 0021 deny tcp from any to any 137 in via $interface
$cmd 0022 deny tcp from any to any 138 in via $interface
$cmd 0023 deny tcp from any to any 139 in via $interface
$cmd 0024 deny tcp from any to any 81 in via $interface


the system give-me it:

root@server01:~$sh firewall.sh
ipfw: getsockopt(IP_FW_ADD): Protocol not available
ipfw: getsockopt(IP_FW_ADD): Protocol not available
ipfw: getsockopt(IP_FW_ADD): Protocol not available
ipfw: getsockopt(IP_FW_ADD): Protocol not available
ipfw: getsockopt(IP_FW_ADD): Protocol not available
ipfw: getsockopt(IP_FW_ADD): Protocol not available
ipfw: getsockopt(IP_FW_ADD): Protocol not available

How can I resolve it?

thank you

bwkaz
03-20-2005, 05:15 PM
ipfw?

em0?

Is this Linux, or some other OS? Linux's firewall tool is "iptables", not "ipfw", and its Ethernet interfaces are named "ethX", not "emX".

Just so we know what we're dealing with...

aeav
03-20-2005, 05:40 PM
hum.. ok...
I'll search in another place...
thank you..

I'm configurating a machine with FreeBSD

X_console
03-20-2005, 06:00 PM
This might be of some help. (http://lists.freebsd.org/pipermail/freebsd-ipfw/2004-September/001356.html)

Gertrude
03-20-2005, 06:09 PM
You most likely never compiled support for it into your kernel. This is all covered in the FreeBSD handbook..

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls.html