summaryrefslogtreecommitdiffstats
path: root/sbin/natd
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/natd')
-rw-r--r--sbin/natd/natd.88
-rw-r--r--sbin/natd/natd.c25
2 files changed, 33 insertions, 0 deletions
diff --git a/sbin/natd/natd.8 b/sbin/natd/natd.8
index 92a2656..d8c7bf8 100644
--- a/sbin/natd/natd.8
+++ b/sbin/natd/natd.8
@@ -31,6 +31,7 @@
.Op Fl log_denied
.Op Fl log_facility Ar facility_name
.Op Fl punch_fw Ar firewall_range
+.Op Fl skinny_port Ar port
.Op Fl log_ipfw_denied
.Op Fl pid_file | P Ar pidfile
.Ek
@@ -483,6 +484,13 @@ rules starting from the rule number
.Ar basenumber
will be used for punching firewall holes.
The range will be cleared for all rules on startup.
+.It Fl skinny_port Ar port
+This option allows you to specify the TCP port used for
+the Skinny Station protocol.
+Skinny is used by Cisco IP phones to communicate with
+Cisco Call Managers to set up voice over IP calls.
+By default, Skinny aliasing is not performed.
+The typical port value for Skinny is 2000.
.It Fl log_ipfw_denied
Log when a packet cannot be re-injected because an
.Xr ipfw 8
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index ec123f7..f8ba6a6 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -99,6 +99,7 @@ static int StrToProto (const char* str);
static int StrToAddrAndPortRange (const char* str, struct in_addr* addr, char* proto, port_range *portRange);
static void ParseArgs (int argc, char** argv);
static void SetupPunchFW(const char *strValue);
+static void SetupSkinnyPort(const char *strValue);
/*
* Globals.
@@ -838,6 +839,7 @@ enum Option {
LogDenied,
LogFacility,
PunchFW,
+ SkinnyPort,
LogIpfwDenied,
PidFile
};
@@ -1059,6 +1061,14 @@ static struct OptionInfo optionTable[] = {
"punch_fw",
NULL },
+ { SkinnyPort,
+ 0,
+ String,
+ "port",
+ "set the TCP port for use with the Skinny Station protocol",
+ "skinny_port",
+ NULL },
+
{ LogIpfwDenied,
0,
YesNo,
@@ -1258,6 +1268,10 @@ static void ParseOption (const char* option, const char* parms)
SetupPunchFW(strValue);
break;
+ case SkinnyPort:
+ SetupSkinnyPort(strValue);
+ break;
+
case LogIpfwDenied:
logIpfwDenied = yesNoValue;;
break;
@@ -1705,3 +1719,14 @@ SetupPunchFW(const char *strValue)
PacketAliasSetFWBase(base, num);
(void)PacketAliasSetMode(PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW);
}
+
+static void
+SetupSkinnyPort(const char *strValue)
+{
+ unsigned int port;
+
+ if (sscanf(strValue, "%u", &port) != 1)
+ errx(1, "skinny_port: port parameter required");
+
+ PacketAliasSetSkinnyPort(port);
+}
OpenPOWER on IntegriCloud