2/ Modification du fichier de configuration OoklaServer :
Activation d'IPv6, désactivé par défaut :
sed -i -e "s/# OoklaServer.useIPv6/OoklaServer.useIPv6/g" /home/speedtest/bin/OoklaServer.properties
Désactivation du port 5060, inutile quand le port 8080 est ouvert :
sed -i -e "s/5060,8080/8080/g" /home/speedtest/bin/OoklaServer.properties
Sécurisation pour limiter les requêtes aux seuls test de débit SpeedTest :
sed -i -e "s/# OoklaServer.allowedDomains/OoklaServer.allowedDomains/g" /home/speedtest/bin/OoklaServer.properties
Par défaut, il va y avoir des centaines de Mo de log dans /var/log/syslog. On va limiter les log aux erreurs (commenter ne va pas désactiver les logs) :
sed -i -e "s/logging.loggers.app.level = information/logging.loggers.app.level = error/g" /home/speedtest/bin/OoklaServer.properties
Sortir de l'utilisateur speedtest :
exit
Vérifier que tout est ok en éditant le fichier, voici un exemple de ce que vous devriez avoir :
nano /home/speedtest/bin/OoklaServer.properties
Vous devez avoir ce fichier :
#
# This is a sample configuration file for OoklaServer
#
#
# OoklaServer Options
#
# The server listens to TCP port 5060 and 8080 by default. These ports are required for
# speedtest.net servers, although more can be added.
#
# For Speedtest Custom, this can be changed to other ports if desired; you will need to
# contact support to update your server record.
#
# At least one port is required for this setting.
#
OoklaServer.tcpPorts = 8080
# The server listens to UDP port 5060 and 8080 by default. These ports are required for
# speedtest.net servers, although more can be added.
#
# For Speedtest Custom, this can be changed to other ports if desired; you will need to
# contact support to update your server record.
#
# At least one port is required for this setting.
#
OoklaServer.udpPorts = 8080
# Uncomment to bind OoklaServer to IPv6
#
OoklaServer.useIPv6 = true
OoklaServer.allowedDomains allows you to limit access to your OoklaServer.
#
# The default ("*") allows all domains access.
# Uncomment to allow access from ookla.com, speedtest.net, and simply add your
# own domain(s):
#
OoklaServer.allowedDomains = *.ookla.com, *.speedtest.net
# Uncomment this to enable filtering of known bad user agents. This can help alleviate traffic
# from non-official client sources.
#
# OoklaServer.userAgentFilterEnabled = true
# Max size of worker thread pool. Might be smaller if the number of open files allows
# is smaller (i.e it is at most `ulimit -n -H`).
#
# OoklaServer.workerThreadPool.capacity = 30000
# Thread stack size for worker threads.
#
# OoklaServer.workerThreadPool.stackSizeBytes = 102400
# Enable auto updates (default)
#
# OoklaServer.enableAutoUpdate = true
#####
# IP Tracking / Blocking settings
#####
# Time between garbage collecting ip statistics.
#
# OoklaServer.ipTracking.gcIntervalMinutes = 5
# Max amount of time to keep statistics for a specific ip address after its last connection was recorded.
#
# OoklaServer.ipTracking.maxIdleAgeMinutes = 35
# Size in minutes of the buckets used to collect ip statistics. This is used to keep a
# sliding window of statistics for an ip when accumulating data. Max number of
# buckets is maxIdleAgeMinutes / slidingWindowBucketLengthMinutes.
#
# OoklaServer.ipTracking.slidingWindowBucketLengthMinutes = 5
# Number of ip's to include when upload metrics.
#
# OoklaServer.ipTracking.metricTopIpCount = 5
#
# Max concurrent connections allowed for a single ip address. The actual number
# is at least 50, and at most 10% of OoklaServer.workerThreadPool.capacity.
#
# OoklaServer.ipTracking.maxConnPerIp = 500
# SSL Options
#
# Enable Let's Encrypt certificate generation (default)
#
# OoklaServer.ssl.useLetsEncrypt = true
# To use a custom certificate, create a certificate and private key and set the path to them here:
# (Note, this will disable Let's Encrypt certificate generation)
# openSSL.server.certificateFile = cert.pem
# openSSL.server.privateKeyFile = key.pem
#
# Logging Options
#
# Log to the Console
#
logging.loggers.app.name = Application
logging.loggers.app.channel.class = ConsoleChannel
logging.loggers.app.channel.pattern = %Y-%m-%d %H:%M:%S [%P - %I] [%p] %t
logging.loggers.app.level = error
# Log to files
#
#logging.loggers.app.name = Application
#logging.loggers.app.channel.class = FileChannel
#logging.loggers.app.channel.pattern = %Y-%m-%d %H:%M:%S [%P - %I] [%p] %t
#logging.loggers.app.channel.path = ${application.dir}/ooklaserver.log
#logging.loggers.app.level = error
#
# Optional access log for HTTP and Websocket requests
#
# logging.loggers.access.name = AccessLog
# logging.loggers.access.channel.class = FileChannel
# logging.loggers.access.channel.pattern = %[client] - %[session] [%d/%b/%Y:%H:%M:%S %Z] "%t" %[status] %[size] "%[referer]" "%[useragent]"
# logging.loggers.access.channel.path = ${application.dir}/ooklaserver-access.log