I have just released GNU Gatekeeper version 5.17. This is a security
update and you are urged to please update as soon as possible.
Download from https://www.gnugk.org/h323download.html
This release contains about 90 bug fixes, most of them found by
Anthropics OSS-Scanner. Almost all of the bugs are security related,
some critical. There is also an important bug fix for H.460.18 between
neighbors.
Additionally, you should disable unused features in GnuGk to reduce
your attack surface. For example, only enable H.460.17, H.460.23,
H.460.24 and H.460.26 or T.120 if you really use them (which 99% of
users don't).
To help avoid regressions with this large number of fixes, a test
harness has been added to test some common call scenarios, but i
certainly doesn't cover all functionality, so please make sure you do
at least a quick test of the functionality you use after upgrading.
See the full list of changes below.
Regards,
Jan
Changes from 5.16 to 5.17
=========================
- BUGFIX(SoftPBX.cxx) set release source and cause for calls
disconnected by status port commands
- BUGFIX(ProxyChannel.cxx) fix callSignallingAddress in H.460.18 SCI to
traversal client neighbor
- BUGFIX(ProxyChannel.cxx) fix memory leak in call rerouting
- BUGFIX(GkStatus.cxx) limit status port command lines to 2K
- BUGFIX(gksql_redis.cxx) implement GkRedisResult::FetchRow(),report
Redis error replies as query errors
- BUGFIX(GkClient.*) add mutex for aliases
- BUGFIX(GkStatus.cxx) add mutex for libssh sessions
- BUGFIX(gkacct.cxx, gkauth.cxx) fix crash when reloading the config
- BUGFIX(ProxyChannel.cxx) fix race with H.235.6 encryption
- BUGFIX(ProxyChannel.cxx,RasSrv.cxx) fix H.460.17 memory leak
- BUGFIX(*) URL-escaping for HttpAcct, HttpPasswordAuth and HtttRouting
- BUGFIX(GkClient.cxx) check size of H.460.24 probe before reading it
- BUGFIX(ProxyChannel.cxx) better check for H.235.6 key size
- BUGFIX(RasTbl.cxx) fix crash in H.460.9 processing
- BUGFIX(ProxyChannel.cxx) fix socket leak in H.245 multiplexing
- BUGFIX(Routing.cxx) check field types in JSON response of Http policy
- BUGFIX(gksql_*.cxx) fix quoting of SQL commands
- BUGFIX(gksql_*.cxx) fix memory leaks
- BUGFIX(ProxyChannel.cxx, RasTbl.cxx) fix crash for endpoints using
old GnuGk NAT method
- BUGFIX(ProxyChannel.cxx) never select on or read from a signalling
socket that is marked deletable
- BUGFIX(ProxyChannel.cxx) avoid port exhaustion by checking error code
- BUGFIX(ProxyChannel.cxx) remove incorrect check that prevented
CallProceedings from being processed before forwarding
- BUGFIX(ProxyChannel.cxx) never open an H.245 connection to our own
status port
- BUGFIX(*) apply DisabledCodecs= switch to fastStart, too, fix setting
them with Radius
- new switch [RoutedMode] EnableT120=0 to remove T.120 capabilities and
reject T.120 channels (default is 1)
- config check: warn when SimplePasswordAuth tries to check messages an
enabled authenticator (CAT, MD5) never puts a token into
- BUGFIX(ProxyChannel.cxx) fix IPv4-IPv6 conversion bug when not
compiled with LARGE_FDSET
- new GnuGk test harness in test/
- BUGFIX(gkauth.cxx) fix AND (&) in AliasAuth/SQLAliasAuth rules
- BUGFIX(gkauth.cxx) match sigaddr rules in AliasAuth/SQLAliasAuth as
documented in manual
- BUGFIX(ProxyChannel.cxx) ignore H.460.19 RTCP keepAlives when
collecting RTCP statistics
- BUGFIX(amqpacct.cxx) serialize MQLog() with a mutex
- BUGFIX(ProxyChannel.cxx) check RTCP SDES item length against packet
size
- BUGFIX(Toolkit.cxx) keep temporary config files in private directory
(mkdtemp) instead of directly in /tmp
- BUGFIX(radproto.cxx) don't abort pending RADIUS request on an empty
datagram
- BUGFIX(ProxyChannel.cxx) fix NULL deref handling Sorensen source-info
- BUGFIX(ProxyChannel.cxx) better check for H.245 connection when doing
TCS0 transfer
- BUGFIX(Toolkit.cxx) null sql connections to avoid double-delete
- BUGFIX(RasTbl.cxx) lock gateway record while matching prefixes
- BUGFIX(ProxyChannel.cxx) fix double-delete in call failover
- BUGFIX(geoip.cxx) IPs without a database record are now country
'unknown' instead of an empty string
- BUGFIX(h460presence.cxx) fix crash with too long lists
- BUGFIX(h460presence.cxx) fix crash on empty subscription list
- BUGFIX(gksql_firebird.cxx) fix fetching INTs and row count in
Firebird SQL driver
- BUGFIX(forwarding.cxx) forwarding policy should only look at the
number of DB results it could actually fetch
- BUGFIX(yasocket.cxx) bind UDP socket exclusive, so other calls can
detect it is in use
- BUGFIX(RasTbl.*) lock CallRec in more setters and getters
- BUGFIX(RasSrv.cxx) better check for existing aliases on additive
registrations
- BUGFIX(ProxyChannel.cxx) RTP/RTCP proxy sockets hold own call
reference to avoid use-after-free on call cleanup
- BUGFIX(ProxyChannel.cxx) fix crash in call rerouting
- BUGFIX(sigmsg.cxx) check IE size before encoding
- BUGFIX(ProxyChannel.cxx) make sure the saved H.460.18 message is
really a Setup
- BUGFIX(ProxyChannel.cxx) fix crash in H.460.17 endpoint cleanup
- BUGFIX(Routing.cxx) add NULL check in vqueue policy
- BUGFIX(Routing.cxx) make sure we don't skip an alias when DNS policy
deletes one
- BUGFIX(RasSrv.cxx) avoid crash when dns policy removes all
destination aliases from ARQ
- BUGFIX(*) remove insecure support for neighbor access tokens, not
used since GnuGk 2.2
- BUGFIX(*) check ASN.1 array size when adding
- BUGFIX(RasTbl.*) protect access to keep-alive maps with a mutex
- BUGFIX(gkh235.cxx, gkauth.*) fix auth bypass with unknown token OIDs
- BUGFIX(ProxyChannel.cxx) don't crash on H.460.19 OLC without
mediaControlChannel
- BUGFIX(ldap.cxx, gkauth.cxx, Toolkit.cxx) escape LDAP filter
characters in aliases for LDAP and H.350 queries
- BUGFIX(ProxyChannel.cxx) reject Setup with a guessed CRV
- BUGFIX(ProxyChannel.cxx, gkauth.cxx) fix type confusion: index into
array not the array pointer
- BUGFIX(capctrl.*) CapacityControl must consider the CompareAliasCase=
setting
- BUGFIX(ProxyChannel.cxx) fix cleanup of H.460.19 fastStart channels
- BUGFIX(ProxyChannel.cxx) when accepting H.460.18 traversal clients,
make sure not to re-assign sockets
- BUGFIX(ProxyChannel.cxx) fix handling of H.460.18 Facility messages
- BUGFIX(ProxyChannel.cxx) fix race condition when opening a T.120
channel
- BUGFIX(ProxyChannel.cxx) use dynamic_cast in order not to confuse
T120LogicalChannel with RTPLogicalChannel causing crashes
- BUGFIX(RasTbl.cxx) fix crash on too long language list
- BUGFIX(RasSrv.cxx) only accept QoS reports from registered endpoints
(H.460.9)
- BUGFIX(authenticators.cxx) OpenSSL 3 fix for DES-ECB
- BUGFIX(ProxyChannel.cxx) block Connect or CallProceeding without a
call
- BUGFIX(gksql_odbc.cxx) detect if backend needs backslash escaping
- BUGFIX(gkauth.cxx, Routing.cxx, httpacct.cxx) only accept 2xx HTTP
responses as valid
- BUGFIX(ProxyChannel.*) use correct buffer size when acting as
encryption proxy
- BUGFIX(RasTbl.cxx) fix round robin routing (crash)
- BUGFIX(ProxyChannel.cxx) ignore fastStart channel after regular
channels have been established
- BUGFIX(*) safer H.460 parameter handling
- BUGFIX(ProxyChannel.cxx) drop impossibly large TPKT packets
- BUGFIX(RasTbl.*) add copy-ctors for H46019KeepAlive to fix
use-after-free
- BUGFIX(ProxyChannel.cxx) fix use-after-free in call cleanup
- BUGFIX(RasSrv.cxx) fix use-after-free
- BUGFIX(gksql_redis.cxx, gksql_mysql.cxx) fix resource leak
- BUGFIX(gkh235.cxx, gkauth.cxx, lua.cxx) better guard against empty
passwords
- BUGFIX(Routing.cxx) never route calls to our own status port
Monday, November 9, 2026
GNU Gatekeeper 5.17 release (SECURITY UPDATE)
Thursday, October 8, 2026
GNU Gatekeeper 5.16 released
*** This is a security update ***
Download: https://www.gnugk.org/h323download.html
Serveral possibly security related issues have been fixed.
Changes from 5.15 to 5.16
=========================
- BUGFIX(ProxyChannel.cxx) better check for tpkt.length
- BUGFIX(ProxyChannel.cxx) avoid OOB memory read in RTCP packets
- BUGFIX(GkClient.cxx) better check of H.460.24 probes
Thursday, July 2, 2026
GNU Gatekeeper 5.15 released
*** This is a security update ***
Download: https://www.gnugk.org/h323download.html
Serveral issues related to authentication features have been fixed.
Besides the security updates, another bug has been fix to respect the InternalNetworks setting when the ExternalIP setting is active.
Changes from 5.14 to 5.15
=========================
- BUGFIX(authenticators.cxx) small fixes to H235AuthDesECB and H235AuthDesCTS
- BUGFIX(ipauth.cxx) fix checking prefixes
- BUGFIX(sqlauth.cxx) don't accept empty passwords
- BUGFIX(gkauth.cxx) fix in Q.931 authentication
- BUGFIX(gkauth.cxx) fix auth cache expiry
- disable command execution for port notifications unless the feature is explicitely activated by ./configure --enable-port-notification-exec
- BUGFIX(GkStatus.cxx) improve ssh status port authentication
- BUGFIX(ProxyChannel.cxx) make sure we respect InternalNetworks= when using ExternalIP=
Friday, November 7, 2025
GNU Gatekeeper 5.14 released
GNU Gatekeeper version 5.14 has been released.
Download: https://www.gnugk.org/h323download.html
This is mostly a bug fixing release, but it also updates the Amazon AWS IP detection to the current standard.
Changes from 5.13 to 5.14
=========================
- update AWS IP detection to IMDSv2
- BUGFIX(RasTbl.h) fix potential memory leak
- BUGFIX(h323utils.cxx) fix detection of 'site local' and 'unique local' IPv6 addresses
- BUGFIX(Makefile.in) restore compatibility with GCC 4, 5 and 6
- BUGFIX(Toolkit.cxx) restore compatibility with very old versions of OpenSSL
- BUGFIX(h323utils.cxx) fix numeric overflow
- BUGFIX(Toolkit.cxx) fix iterator usage (found by Coverity)
Saturday, October 19, 2024
GNU Gatekeeper 5.13 released
GNU Gatekeeper version 5.13 has been released.
Download: https://www.gnugk.org/h323download.html
This is a bug fix release with a no new features added. It fixes an issue with the RTP port detection and 2 other minor issues.
Monday, February 26, 2024
New release of PTLib
I have just bundeled up the changes and bug fixes of the past 2 years and released PTLib 2.10.9.6.
Most notable in this release is working IPv6 on *BSD, macOSX and Solaris as well as support for newer compilers and many small platform fixes.
Since PTLib is the foundation for the GNU Gatekeeper and many H323Plus projects, all these improvements get propagated into those projects as well.
Changes:
- IPv6 support fixed for *BSD, macOSX and Solaris
- support for newer compiler, eg. gcc 13 and VS2022
- support for C++-17
- support for Win64 builds
- support AIX as platform
- small OpenBSD fixes
- other small fixes
Download from https://www.h323plus.org/source/
Monday, February 19, 2024
GNU Gatekeeper 5.12 released
GNU Gatekeeper version 5.12 has been released.
Download: https://www.gnugk.org/h323downldad.html
This is a bug fix release with a few new features added.
Another important bug in the handling of the ExternalIP switch has been fixed as well as Y2K38 issues.
This release also adds features:
- support for Oracle databases
- easier cloud deployment with IP detection with STUN
- better load scaling by mixing proxied with direct mode endpoints in a single gatekeeper
- Windows 64bit executables with VS2022
- enable more runtime hardening flags from OpenSSF recommendation 11/2023
- fix bug with H.245 address when using ExternalIP= switch without H.460.18/.19
- auto-detect public IP with ExternalIP=STUN and STUNServer=stun.example.com
- compiler support for VS2022
- new database driver for Oracle and new timestamp format 'Oracle'
- new switch [EP::xxx] ForceDirectMode=1 to handle all calls from this endpoint in direct mode
- BUGFIX(RasSrv.cxx, gkauth.cxx) make sure time_t is handled unsigned to avoid Y2K38 issue
- BUGFIX(ProxyChannel.cxx) check for too small packets when acting as encryption proxy
Monday, February 20, 2023
GNU Gatekeeper 5.11 released
GNU Gatekeeper version 5.11 has been released.
Download: https://www.gnugk.org/h323download.html
This is a bug fix release with a few new features added.
An important bug in the handling of the ExternalIP switch has been fixed.
We also added a few features that make it easier to use GnuGk with Graphana and InfluxDB monitoring.
Changes and additions:
- remove non-working command line switch -e / --externalip, use config file to set ExternalIP
- new accounting variables %{registrations}, %{calls}, %{total-calls}, %{successful-calls}, %{allocated-bandwidth}
- new switch [HttpAcct] Authorization= to send authorization headers to support InfluxDB
- replace \r and \n in HttpAcct body with carriage return and line feed characters
- new switch: [RasSrv::LRQFeatures] PreserveDestination=1 (helpful when calling Pexip servers)
Wednesday, August 24, 2022
GNU Gatekeeper 5.10 released
GNU Gatekeeper version 5.10 has been released.
Download: https://www.gnugk.org/h323download.html
This is a bug fix release.
Bugs fixed:
- fix a crash when handling the MasterSlaveDetermination message
- fix the documentation of [RasSrv::LRQFeatures] NeighborTimeout and consistently treat the value as 10th of a second in the program
Tuesday, October 26, 2021
GNU Gatekeeper 5.9 released
GNU Gatekeeper version 5.9 is out with a number of bug fixes and a few new features.
Download: https://www.gnugk.org/h323download.html
New features:
- new switches [Proxy] CachePortDetection=1 and CachePortDetectionDuration= to cache port detection packets for faster media connects when IgnoreSignaledIPs= is active
- new switch: [EP::] ForceTerminalType=
- new place holder for port notifications: %t for port type
- experimental: better error recovery if multiplexed RTP sending fails
Please note that Radius support is disabled by default now. You can enable it with the --enable-radius switch when running configure.
Bug fixes:
- fix bug in port detection with AllowSignaledIPsFrom=
- when DNS name resolves to IP without alias, remove alias from ACF completely (Cisco interop)
- remove RTP session 0 from internal tables once H.245 master has assigned a session ID
- fix compilation of Avaya support
- initialized cmsg struct to zero before using
- fix regression introduced with MatchH239SessionsByIDOnly= switch
Thursday, July 22, 2021
GNU Gatekeeper 5.8 released
GNU Gatekeeper version 5.8 has been released with a number of bug fixes and a few new features.
To stay updated on new releases, please also follow us on Twitter!
Improved interoperability with:
- EdgeProtect
- Avaya
New features:
- experimental support for Avaya's non-standard version of H.323 (./configure --enable-avaya) (thanks Konstantin Prokazov)
- consider RFC 6598 shared network space (100.64.0.0/10) and Zeroconf (169.254.0.0/16) as private IPs
- new switch [Proxy] AllowSignaledIPsFrom= to skip auto-detect for messages received directly from certain IPs when IgnoreSignaledIPs=1
- new switch [Proxy] AllowAnyRTPSourcePortForH239From= to handle incorrect RTCP addresses in H.239 OLC (EdgeProtect interop)
- new switch [RoutedMode] MatchH239SessionsByIDOnly= to never attempt to match a H.239 reverse channel by type for improved interoperability with EdgeProtect
- new switches to set the HTTP Content-Type header in HttpAcct, HttpPasswordAuth and Routing::Http
- new switch [Routing::Http] JSONResponse=1 to send more flexible routing data in the HTML reponses
- many new status port shortcuts (see manual section for details)
Bug fixes:
- fix H.460.18/.19 on multi-homed servers
- fix race condition when handling H.460.19 multiplex IDs
- fix media loop on half port-detected channel when media is very early
- fix Net-SNMP query for total bandwidth
- save RTCP address from OLC for port-detection
- always check AllowSignaledIPs= before applying IgnoreSignaledAllH239IPs or IgnoreSignaledPrivateH239IPs
- handle extensions and CSRC in RTP header with H.235 half-call media
- better endpointIDs on Windows when compiling without OpenSSL
Thursday, March 4, 2021
GNU Gatekeeper 5.7 released
GNU Gatekeeper version 5.7 has some important bug fixes, improves interoperability
with other vendors and also has a few new features.
Several severe crashes and a few memory leaks have been fixed.
Improved interoperability with:
- Lifesize endpoints
- Poly's Microsoft Teams gateway
- Polycom RealPresence Capture Server
New features:
- You get a warning in the GUI / on the status port if one of your endpoints has an incorrect time setting and this password authentication fails. This makes trouble shooting a lot easier.
- Invalid TPKT packets (eg. due to network errors) now don't necessarily take down an otherwise healthy call. Use the new AbortOnInvalidTPKT=0 switch to enable.
- GnuGk will now also return unused memory back to the OS periodically to make it available again to other applications on the same server.
- You have a new %{Vendor} variable for SqlAuth RegQuerys and LuaAuth
Full change log:
- BUGFIX(ProxyChannel.cxx) fix crash on non-standard H.245 Indication from
Polycom RealPresence Capture Server
- BUGFIX(ProxyChannel.cxx) fix possible crashes on non-standard generic information in OLCs
- print warning message on status port when passwords get rejected due to wrong time
- BUGFIX(httpacct.cxx) fix memory leak
- BUGFIX(ProxyChannel.cxx) fix possible crash
- BUGFIX(gk.cxx) avoid crash when terminating in the middle of program startup,
set non-zero exit code so restarter notices error
- return unused memory back to OS periodically
- new switch: [RoutedMode] AbortOnInvalidTPKT=0 for more graceful handling of network errors
- BUGFIX(gk.cxx) fix for running on Alpine Linux (needs updated PTLib, too)
- don't start GnuGk if RTP multiplexing is configured, but we can't start the listener
- new switch: [RoutedMode] MatchH239SessionsByType=0 to fix presentations with
LifeSize endpoints over Poly's Microsoft Teams gateway
- BUGFIX(ProxyChannel.cxx) make sure we don't set RTP address on multiplexed RTCP keepalive
- BUGFIX(RasSrv.cxx) look at all tokens for H.235.TSSM
- add %{Vendor} variable for SqlAuth RegQuery and LuaAuth
Tuesday, February 2, 2021
New releases of H323Plus and PTLib
H323Plus 1.27.2 and PTLib 2.10.9.4 have been released.
Changes in H323Plus:
- support for Alpine Linux for smaller container images
- crash fixed on invalid RTCP packets
- memory leaks fixed
- GetCrytoMasterKey() restored that got lost in 1.27.1
- better support for cross-compiling
- various updates for newer compilers
- some smaller bug fixes
https://www.h323plus.org/source/
Changes in PTLib:
- support for Alpine Linux
- better support for cross-compiling
- various smaller bug fixes
Tuesday, January 19, 2021
H.323: IPv4 to IPv6 migration
Many networks are migrating from IPv4 to IPv6. What can you do if still have H.323 endpoints that only support IPv4 ?
The GNU Gatekeeper can translate IPv4 into IPv6 calls and vice versa.
You can use one GnuGk to IPv6 enable all of your existing IPv4 endpoints.
All you have to do is enable IPv6 in your configuration and GnuGk will automatically
detect the connection type of your endpoints and convert the call.
All it takes is one switch in your config:
[Gatekeeper::Main] EnableIPv6=1
Wednesday, January 13, 2021
Using the GNU Gatekeeper to create TLS tunnels
Most H.323 vendors did not implement encrypting the signaling connection with TLS. They only encrypt the media (RTP). But you can use the two GNU Gatekeepers to encrypt you call signaling even when your endpoints don't support this natively.
Suppose you have 2 locations and want to connect them securely over the public internet.
GnuGk can encrypt call signalling between those locations using TLS and encrypt the media (RTP) using H.235.6 (AES encryption).
Configuration for GNU Gatekeeper 1 (prefix 01)
[Gatekeeper::Main] [RoutedMode] GKRouted=1 H245Routed=1 CallSignalPort=1720 AcceptUnregisteredCalls=1 ; make sure H.245 gets tunneled for TLS H245TunnelingTranslation=1 ; add AES media encryption if the endpoint doesn't encrypt itself EnableH235HalfCallMedia=1 ; only allow encrypted calls RequireH235HalfCallMedia=1 ; change the media key after 2^31 operations EnableH235HalfCallMediaKeyUpdates=1 [Proxy] Enable=1 [ModeSelection] 0.0.0.0/0=PROXY ; only use routed mode for local calls 192.168.0.0/18=H245ROUTED [TLS] EnableTLS=1 PrivateKey=/path/to/server.pem Certificates=/path/to/server.pem CAFile=/path/to/rootcert.pem Passphrase=MySecret CheckCertificateIP=1 [Gatekeeper::Auth] FileIPAuth=required;Setup [FileIPAuth] ; allow all calls from local network 192.168.1.0/24=allow ; only allow TLS encrypted and authenticated calls from elsewhere any=onlyTLS [RasSrv::PermanentEndpoints] ; the GnuGk in the other location, serving prefix 02 1.2.3.4:1300=remote-gw;02 [EP::remote-gw] ; use TLS to call remote GnuGk UseTLS=1
Configuration for GNU Gatekeeper 2 (prefix 02)
[Gatekeeper::Main] [RoutedMode] GKRouted=1 H245Routed=1 CallSignalPort=1720 AcceptUnregisteredCalls=1 ; make sure H.245 gets tunneled for TLS H245TunnelingTranslation=1 ; add AES media encryption if the endpoint doesn't encrypt itself EnableH235HalfCallMedia=1 ; only allow encrypted calls RequireH235HalfCallMedia=1 ; change the media key after 2^31 operations EnableH235HalfCallMediaKeyUpdates=1 [Proxy] Enable=1 [ModeSelection] 0.0.0.0/0=PROXY ; only use routed mode for local calls 192.168.0.0/18=H245ROUTED [TLS] EnableTLS=1 PrivateKey=/path/to/server.pem Certificates=/path/to/server.pem CAFile=/path/to/rootcert.pem Passphrase=MySecret CheckCertificateIP=1 [Gatekeeper::Auth] FileIPAuth=required;Setup [FileIPAuth] ; allow all calls from local network 192.168.1.0/24=allow ; only allow TLS encrypted and authenticated calls from elsewhere any=onlyTLS [RasSrv::PermanentEndpoints] ; the GnuGk in the other location, serving prefix 01 1.2.3.5:1300=remote-gw;01 [EP::remote-gw] ; use TLS to call remote GnuGk UseTLS=1
Other options
You could also configure the remote GNU Gatekeeper as a neighbor, but beware that the RAS traffic between neighbors will show meta data (whois is caling who) in clear text!
See the GnuGk manual section on TLS for more details and examples how to generate the OpenSSL certificates.
Friday, January 8, 2021
Using TCP Keepalive to Detect Network Errors
This is not only a H.323 topic, but since H.323 also uses TCP connections, it applies to H.323 as well:
To detect network errors and signaling connection problems, you can enable TCP keep alive feature. It will increase signaling bandwidth used, but as bandwidth utilized by signaling channels is low from its nature, the increase should not be significant. Moreover, you can control it using keep alive timeout.
The problem is that most system use keep alive timeout of 7200 seconds, which means the system is notified about a dead connection after 2 hours. You probably want this time to be shorter, like one minute or so. On each operating system, the adjustment is done in a different way.
After settings all parameters, it's recommended to check whether the feature works correctly - just make a test call and unplug a network cable at either side of the call. Then see if the call terminates after the configured timeout.
Linux systems
Use sysctl -A to get a list of available kernel variables and grep this list for net.ipv4 settings (sysctl -A | grep net.ipv4). There should exist the following variables:
net.ipv4.tcp_keepalive_time: time of connection inactivity after which
the first keep alive request is sent
net.ipv4.tcp_keepalive_probes: number of keep alive requests retransmitted
before the connection is considered broken
net.ipv4.tcp_keepalive_intvl: time interval between keep alive probes
You can manipulate with these settings using the following command:
sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_probes=3 \ net.ipv4.tcp_keepalive_intvl=10
This sample command changes TCP keepalive timeout to 60 seconds with 3 probes,
10 seconds gap between each. With this, your application will detect dead TCP
connections after 90 seconds (60 + 10 + 10 + 10).
FreeBSD and MacOS X
For the list of available TCP settings (FreeBSD 4.8 an up and 5.4): sysctl -A | grep net.inet.tcp net.inet.tcp.keepidle - Amount of time, in milliseconds, that the (TCP) connection must be idle before keepalive probes (if enabled) are sent. net.inet.tcp.keepintvl - The interval, in milliseconds, between keepalive probes sent to remote machines. After TCPTV_KEEPCNT (default 8) probes are sent, with no response, the (TCP)connection is dropped. net.inet.tcp.always_keepalive - Assume that SO_KEEPALIVE is set on all TCP connections, the kernel will periodically send a packet to the remote host to verify the connection is still up. therefore formula to calculate maximum TCP inactive connection time is following: net.inet.tcp.keepidle + (net.inet.tcp.keepintvl x 8) the result is in milliseconds. therefore, by setting net.inet.tcp.keepidle = 10000 net.inet.tcp.keepintvl = 5000 net.inet.tcp.always_keepalive =1 (must be 1 always) the system will disconnect a call when TCP connection is dead for: 10000 + (5000 x 8) = 50000 msec (50 sec) To make system remember these settings at startup, you should add them to /etc/sysctl.conf file
Solaris
For the list of available TCP settings: ndd /dev/tcp \? Keepalive related variables: - tcp_keepalive_interval - idle timeout Example: ndd -set /dev/tcp tcp_keepalive_interval 60000
Windows 2000 and Windows NT
Search Knowledge Base for article ID 120642: http://support.microsoft.com/kb/120642/EN-US Basically, you need to tweak some registry entries under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Thursday, October 29, 2020
GNU Gatekeeper 5.6 released
Today GNU Gatekeeper version 5.6 has been released.
Download: https://www.gnugk.org/h323download.html
It contains an important bug fix to H.460.19 multiplexing and H.460.26 (media over TCP) when using GnuGk's internal call forwarding (ForwadOnFacility).
I have also added an interop tweak to be able to call video services that don't understand H.323 URL aliases (eg. videobutler.nl). You can enable it with
Here is the full changelog:
- new switch: [Routing::SRV] ConvertURLs=1 to convert URL_IDs into H323_IDs
- BUGFIX(ProxyChannel.cxx) fix RTP multiplexing and H.460.26 when ForwardOnFacility is used
- BUGFIX(ProxyChannel.cxx) remove H.460.19 feature from Setup when using ForwardOnFacility=1
- new switch: [Gatekeeper::Main] GrantAllBRQ=1 to accept any BRQ, even if the conferenceID is invalid
Tuesday, June 30, 2020
GNU Gatekeeper 5.5. released
This release has new features and bug fixes when you run clustered gatekeepers. It also improves the port detection feature and we have a complete and up to date Chinese documentation.
You can download it from https://www.gnugk.org/h323download.html
New features:
- new feature GnuGkAssignedGatekeeper to push endpoints back to their intended home gatekeepers in the cluster, even if the endpoints don't support assigned gatekeepers
- support new PBKDF2 password hashes for ssh logins to the status port
- new switches to fine tune port detection for H.239 channels (IgnoreSignaledPublicH239IPsFrom=x and IgnoreSignaledAllH239IPs=1)
- new Chinese manual
Bug fixes:
- select correct source IP for neighbor pings
- set altGKisPermanent=true when redirecting endpoints
- fix RRJ to include alternates when RedirectGK=Endpoints limit is reached
- fix reading of AllowSignaledIPs= switch
- don't complain about [Neighbor::xxx] SendAliases switch when using--strict
Enjoy!
Tuesday, January 7, 2020
GNU Gatekeeper 5.4 released
You can download it from https://www.gnugk.org/h323download.html
New features:
- new accounting module to send accounting data to an MQTT server
- support for redis as database (eg. as backend for password storage)
Bug fixes:
- important fix for H.245 tunneling translation with H.460.18 endpoints
- fix for snmpwalk in PTLib-SNMP implementation
- fix sending alternate gatekeeper list to endpoints with assigned gatekeeper
- improved DRQ from child gatekeepers
- fix TLS with neighbor gatekeeper
Please also note that a bug has been found in PTLib that can cause a crash in any GnuGk version if you use the status port (manually of from an application). Please upgrade to PTLib 2.10.9.3!
Monday, August 12, 2019
Howto block H.323 spam calls with fail2ban
But that alone doesn't stop the load on the server, because often these bots keep on making calls.
Fail2ban to the rescue!
With this filter definition in /etc/fail2ban/filter.d/gnugk.conf you can check fro rejected calls:
[Definition]
failregex = Dropping call CRV=[0-9]+ from <HOST>:[0-9]+ due to Setup authentication failure
ignoreregex =
And then you can add this jail definition to /etc/fail2ban/jail.local to block the IP:
[gnugk]
enabled = true
logpath = /var/log/gnugk.log
filter = gnugk
bantime = 6000
maxretry = 2
action = iptables[name=GnuGk, port=1720, protocol=tcp]
Voila!

