ipfw: opcode 51 size 1 wrong
Juliao Braga - PegasusR
juliao at braga.eti.br
Sat Jan 15 16:00:22 PST 2005
Hi,
FreeBSD Release 5.3 don´t recognize NAT. I'd search the list and found
nothing about. The response is: "ipfw: getsockopt(IP_FW_ADD): Invalid
argument" over the following divert rules:
...
inti="rl0"
...
# Nat
${cmd} 00300 divert natd all from 192.168.1.0/24 to any out via ${inti}
${cmd} 00310 divert natd all from any to 192.168.100.7 in via ${inti}
...
This is the other box parameters:
1. Kernel:
...
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100
options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPDIVERT
options IPSTEALTH
options DUMMYNET
options HZ=1000
...
2. Nat (/usr/local/etc/rc.d):
#!/bin/sh
natd -interface rl0
3. # dmesg | egrep divert:
ipfw2 initialized, divert enabled, rule-based forwarding disabled, default
to accept, logging limited to 100 packets/entry by default
4. Last 2 lines of # dmesg:
ipfw: opcode 51 size 1 wrong
ipfw: opcode 51 size 1 wrong
5. # uname -a:
FreeBSD gustavo.funec.br 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Dec 16
19:10:55 BRST 2004 root at gustavo.funec.br:/usr/obj/usr/src/sys/GUSTAVO
i386
6. rc.conf:
defaultrouter="192.168.100.1"
gateway_enable="YES"
hostname="gustavo.funec.br"
#ifconfig_rl0="inet 192.168.100.7 netmask 255.255.255.0"
ifconfig_rl1="inet 192.168.1.1 netmask 255.255.255.0"
linux_enable="NO"
sshd_enable="YES"
sendmail_enable="NONE"
natd_enable="YES" # Enable NATD function
natd_interface="rl0" # interface name of public Internet NIC
natd_flags="-dynamic -m" # -m = preserve port numbers if possible
Thank you for any help!
Juliao
---
Rede PegasusR
http://www.redepegasus.com.br
More information about the freebsd-ipfw
mailing list