[Serusers] Problem with NatHelper Module
Steven Kokinos
steve at kokinos.com
Tue Mar 30 01:14:10 CEST 2004
Hello-
I'm in the process of implementing my first SER server, and am running
into some issues with the nathelper module. I'm using 0.8.12, compiled
locally. I set the debug level to 7, and am seeing the following
errors, any help is greatly appreciated:
Mar 29 16:06:49 east ser: set_mod_param_regex: parameter
<ping_nated_only> not found in module <nathelper>
Mar 29 16:06:49 east ser: parse error (88,43-44): Can't set module
parameter
Mar 29 16:06:49 east ser: parse error (113,22-23): unknown command,
missing loadmodule?
Mar 29 16:06:49 east ser: parse error (225,32-33): unknown command,
missing loadmodule?
Relevant config file entries:
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/lib/ser/modules/mysql.so"
loadmodule "/lib/ser/modules/sl.so"
loadmodule "/lib/ser/modules/tm.so"
loadmodule "/lib/ser/modules/rr.so"
loadmodule "/lib/ser/modules/maxfwd.so"
loadmodule "/lib/ser/modules/usrloc.so"
loadmodule "/lib/ser/modules/registrar.so"
loadmodule "/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/lib/ser/modules/auth.so"
loadmodule "/lib/ser/modules/auth_db.so"
# !! Nathelper
loadmodule "/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters ---------------
Followed by lines 85-88:
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping only clients
behind NAT
Section around line 113 (113 is the nat_uac_test):
# !! Nathelper
# Special handling for NATed clients; first, NAT test is
# executed: it looks for via!=received and RFC1918 addresses
# in Contact (may fail if line-folding is used); also,
# the received test should, if completed, should check all
# vias for rpesence of received
if (nat_uac_test("3")) {
# Allow RR-ed requests, as these may indicate that
# a NAT-enabled proxy takes care of it; unless it is
# a REGISTER
if (method == "REGISTER" || ! search("^Record-Route:"))
{
log("LOG: Someone trying to register from private
IP, rewriting\n");
Section around line 225 (failing on nat_ua_test again):
# !! Nathelper
onreply_route[1] {
# NATed transaction ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") {
fix_nated_contact();
force_rtp_proxy();
# otherwise, is it a transaction behind a NAT and we did not
# know at time of request processing ? (RFC1918 contacts)
} else if (nat_uac_test("1")) {
fix_nated_contact();
};
}
More information about the sr-users
mailing list