Mention that the default is to let external traffic route to
the internal network when NAT is enabled. Allow ``set target MYADDR'' to stop packets at the gateway.
This commit is contained in:
parent
b8a9bbd08b
commit
ba5219342d
@ -345,7 +345,7 @@ nat_SetTarget(struct cmdargs const *arg)
|
||||
struct in_addr addr;
|
||||
|
||||
if (arg->argc == arg->argn) {
|
||||
addr.s_addr = INADDR_NONE;
|
||||
addr.s_addr = INADDR_ANY;
|
||||
PacketAliasSetTarget(addr);
|
||||
return 0;
|
||||
}
|
||||
@ -353,6 +353,12 @@ nat_SetTarget(struct cmdargs const *arg)
|
||||
if (arg->argc != arg->argn + 1)
|
||||
return -1;
|
||||
|
||||
if (!strncasecmp(arg->argv[arg->argn], "MYADDR")) {
|
||||
addr.s_addr = INADDR_ANY;
|
||||
PacketAliasSetTarget(addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
addr = GetIpAddr(arg->argv[arg->argn]);
|
||||
if (addr.s_addr == INADDR_NONE) {
|
||||
log_Printf(LogWARN, "%s: invalid address\n", arg->argv[arg->argn]);
|
||||
|
@ -2995,13 +2995,14 @@ connections to come from a well known port.
|
||||
.It nat target Op Ar address
|
||||
Set the given target address or clear it if no address is given. The target
|
||||
address is used by libalias to specify how to NAT incoming packets by default.
|
||||
If a target address is not set, the alias address (that of the tun interface)
|
||||
is used.
|
||||
If a target address is not set or if
|
||||
.Dq default
|
||||
is given, packets are not altered and are allowed to route to the internal
|
||||
network.
|
||||
.Pp
|
||||
The target address may be set to
|
||||
.Dq default ,
|
||||
in which case libalias will not alter the destination address of new
|
||||
incoming data.
|
||||
.Dq MYADDR ,
|
||||
in which case libalias will redirect all packets to the interface address.
|
||||
.It nat use_sockets yes|no
|
||||
When enabled, this option tells the network address translation engine to
|
||||
create a socket so that it can guarantee a correct incoming ftp data or
|
||||
|
@ -2995,13 +2995,14 @@ connections to come from a well known port.
|
||||
.It nat target Op Ar address
|
||||
Set the given target address or clear it if no address is given. The target
|
||||
address is used by libalias to specify how to NAT incoming packets by default.
|
||||
If a target address is not set, the alias address (that of the tun interface)
|
||||
is used.
|
||||
If a target address is not set or if
|
||||
.Dq default
|
||||
is given, packets are not altered and are allowed to route to the internal
|
||||
network.
|
||||
.Pp
|
||||
The target address may be set to
|
||||
.Dq default ,
|
||||
in which case libalias will not alter the destination address of new
|
||||
incoming data.
|
||||
.Dq MYADDR ,
|
||||
in which case libalias will redirect all packets to the interface address.
|
||||
.It nat use_sockets yes|no
|
||||
When enabled, this option tells the network address translation engine to
|
||||
create a socket so that it can guarantee a correct incoming ftp data or
|
||||
|
Loading…
x
Reference in New Issue
Block a user