mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-21 02:08:48 +02:00
Handle DNAT with no port correctly.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
252dd9b676
commit
8960f72532
@ -634,7 +634,7 @@ sub handle_nat_rule( $$$$$$$$$$$$ ) {
|
|||||||
#
|
#
|
||||||
# Isolate server port
|
# Isolate server port
|
||||||
#
|
#
|
||||||
if ( $dest =~ /^(.*)(?::(.+))$/ ) {
|
if ( ( $family == F_IPV4 && $dest =~ /^(.*)(?::(.+))$/ ) || ( $family == F_IPV6 && $dest =~ /^\[(.*)]:(.+)$/ ) ) {
|
||||||
#
|
#
|
||||||
# Server IP and Port
|
# Server IP and Port
|
||||||
#
|
#
|
||||||
|
@ -882,7 +882,7 @@
|
|||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>Example:</term>
|
<term>Example 1:</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis
|
<para><emphasis
|
||||||
@ -891,6 +891,16 @@
|
|||||||
on port 3128.</para>
|
on port 3128.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>Example 2:</term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para><emphasis role="bold">loc:[]:3128</emphasis> specifies
|
||||||
|
that the destination port should be changed to 3128 but the IP
|
||||||
|
address should remain the same.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The <emphasis>port</emphasis> may be specified as a service
|
<para>The <emphasis>port</emphasis> may be specified as a service
|
||||||
|
Loading…
x
Reference in New Issue
Block a user