summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2000-05-11 07:55:44 +0000
committerBrian Somers <brian@FreeBSD.org>2000-05-11 07:55:44 +0000
commit44d127bc34416d5fe72c3efb0a2fc52b88987552 (patch)
tree10de62552da0f166793e22069d88619898c85023
parent151682eadc41fc610ef4d25daf5ec935f9443c63 (diff)
Notes
-rw-r--r--usr.sbin/ppp/nat_cmd.c8
-rw-r--r--usr.sbin/ppp/ppp.811
-rw-r--r--usr.sbin/ppp/ppp.8.m411
3 files changed, 19 insertions, 11 deletions
diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c
index baa53503604d..2c4274f39957 100644
--- a/usr.sbin/ppp/nat_cmd.c
+++ b/usr.sbin/ppp/nat_cmd.c
@@ -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]);
diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8
index a9c16373717f..32bb448ba55c 100644
--- a/usr.sbin/ppp/ppp.8
+++ b/usr.sbin/ppp/ppp.8
@@ -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
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index a9c16373717f..32bb448ba55c 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -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