libalias defect (PR 269770)

Peter <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
Folks,

  after suffering frequent network outages for quite some time, I
finally hunted them down to a libalias issue.

'man 8 natd' suggests this for a port-forward:

                 For example, the argument

                       tcp inside1:telnet 6666

                 means that incoming TCP packets destined for port 6666 on
                 this machine will be sent to the telnet port on the inside1
                 machine.

While this may work for TCP, it does not work well for UDP
(evidence is in the PR).

With a static alias IP there are two ways to describe such a
portforward:

(1)
ipfw nat 1 config log same_ports unreg_only ip 203.0.113.1 \
        redirect_port udp 192.168.1.12:5006 5006 \
        redirect_port tcp 192.168.1.12:5006 5006

(2)
ipfw nat 1 config log same_ports unreg_only ip 203.0.113.1 \
        redirect_port udp 192.168.1.12:5007 203.0.113.1:5006 \
        redirect_port tcp 192.168.1.12:5007 203.0.113.1:5006

While there seems no obvious difference between both, there is
a difference insofar as (2) appears to work, while (1) does not.

The other difference is that (2) obviousely cannot be used with
a dynamic alias (parameter 'if' instead of 'ip'), so there exists
no working configuration in that case. Therefore I consider this
not just a documentation flaw, but a defect.

cheerio,
PMc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.