Commit aa4e6224 authored by anonym's avatar anonym
Browse files

Add option to allow LAN connections.

parent 4e7658b7
...@@ -5,6 +5,12 @@ MUMBLE=${PERSISTENCE}/mumble-server ...@@ -5,6 +5,12 @@ MUMBLE=${PERSISTENCE}/mumble-server
ONION=/var/lib/tor/mumble-server ONION=/var/lib/tor/mumble-server
CONFIG=/etc/mumble-server.ini CONFIG=/etc/mumble-server.ini
# Ad-hoc option handling
if echo "${@}" | grep -qw -- '--listen-on-lan'; then
# Install mumble-server # Install mumble-server
apt-get --yes --quiet --quiet install mumble-server apt-get --yes --quiet --quiet install mumble-server
...@@ -19,7 +25,11 @@ PASSWORD=$(cat ${MUMBLE}/password) ...@@ -19,7 +25,11 @@ PASSWORD=$(cat ${MUMBLE}/password)
sed -i "s%^database=/var/lib/mumble-server/mumble-server.sqlite%database=${MUMBLE}/mumble-server.sqlite%" ${CONFIG} sed -i "s%^database=/var/lib/mumble-server/mumble-server.sqlite%database=${MUMBLE}/mumble-server.sqlite%" ${CONFIG}
sed -i "s%^serverpassword=$%serverpassword=${PASSWORD}%" ${CONFIG} sed -i "s%^serverpassword=$%serverpassword=${PASSWORD}%" ${CONFIG}
sed -i "s%^#host=$%host=" ${CONFIG} if [ -n "${MUMBLE_LISTEN_ON_LAN}" ]; then
sed -i "s%^host=%#host=%" ${CONFIG}
sed -i "s%^#host=$%host=" ${CONFIG}
# Extract fingerprint from SQLite database # Extract fingerprint from SQLite database
...@@ -56,6 +66,16 @@ systemctl reload ferm ...@@ -56,6 +66,16 @@ systemctl reload ferm
iptables -I OUTPUT --out-interface lo --protocol tcp --dport 64738 --jump ACCEPT iptables -I OUTPUT --out-interface lo --protocol tcp --dport 64738 --jump ACCEPT
# Allow LAN connections if requested
if [ -n "${MUMBLE_LISTEN_ON_LAN}" ]; then
for range in; do
for proto in tcp udp; do
iptables -A INPUT --source "${range}" --protocol "${proto}" --dport 64738 --jump ACCEPT
# Output connection information # Output connection information
echo "Hostname: ${HOSTNAME}" echo "Hostname: ${HOSTNAME}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment