kern/157689: ipfw nat config does not accept nonexistent interfaces

Viktor Štujber viktor.stujber at
Tue Jun 7 15:00:24 UTC 2011

>Number:         157689
>Category:       kern
>Synopsis:       ipfw nat config does not accept nonexistent interfaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 07 15:00:21 UTC 2011
>Originator:     Viktor Štujber
>Release:        8.2-PRERELEASE
FreeBSD poring 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #4: Sun Feb 20 13:15:15 CET 2011     umage at poring:/usr/obj/usr/src/sys/PORING  i386

ipfw accepts rules for interfaces that do not (yet) exist, and makes them work seamlessly as the interfaces come and go. However, the 'ipfw nat' addon feature is not compatible with ipfw's interface handling philosophy.
# ipfw add 60000 allow via foobar
60000 allow ip from any to any via foobar
^-- works

# ipfw nat 100 config if foobar
ipfw: unknown interface name foobar
^-- doesn't work
A workaround using cloned_interfaces was suggested. This preemptively creates a dummy interface to satisfy ipfw.


More information about the freebsd-bugs mailing list