From e26161a754ece64c0133afea66c77c981b8784b9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 24 Aug 2015 08:20:34 +0100 Subject: [PATCH] Open zeronet port on client when using mesh --- src/freedombone | 4 ++++ src/freedombone-client | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/freedombone b/src/freedombone index f187a0e7..e60bb586 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1991,6 +1991,8 @@ function mesh_batman_bridge { echo ' iptables -A INPUT -p udp --dport 5353 -j ACCEPT' >> $batman_script echo ' iptables -A INPUT -p tcp --dport 5354 -j ACCEPT' >> $batman_script echo ' iptables -A INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script + echo " iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script + echo " iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script echo '' >> $batman_script echo ' systemctl restart avahi-daemon' >> $batman_script echo '}' >> $batman_script @@ -2024,6 +2026,8 @@ function mesh_batman_bridge { echo ' iptables -D INPUT -p udp --dport 5353 -j ACCEPT' >> $batman_script echo ' iptables -D INPUT -p tcp --dport 5354 -j ACCEPT' >> $batman_script echo ' iptables -D INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script + echo " iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script + echo " iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script echo '' >> $batman_script echo ' systemctl restart network-manager' >> $batman_script echo '}' >> $batman_script diff --git a/src/freedombone-client b/src/freedombone-client index 65892eab..8b896271 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -47,6 +47,8 @@ SSH_MACS="hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripem SSH_KEX="curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256" SSH_HOST_KEY_ALGORITHMS="ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-ed25519,ssh-rsa" +ZERONET_PORT=15441 + # see https://stribika.github.io/2015/01/04/secure-secure-shell.html function ssh_remove_small_moduli { sudo awk '$5 > 2000' /etc/ssh/moduli > /home/$CURR_USER/moduli @@ -303,6 +305,8 @@ function mesh_batman { echo ' iptables -A INPUT -p udp --dport 5353 -j ACCEPT' >> $batman_script echo ' iptables -A INPUT -p tcp --dport 5354 -j ACCEPT' >> $batman_script echo ' iptables -A INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script + echo " iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script + echo " iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script echo '' >> $batman_script echo ' if [ -f /bin/systemctl ]; then' >> $batman_script echo ' systemctl restart avahi-daemon' >> $batman_script @@ -341,6 +345,8 @@ function mesh_batman { echo ' iptables -D INPUT -p udp --dport 5353 -j ACCEPT' >> $batman_script echo ' iptables -D INPUT -p tcp --dport 5354 -j ACCEPT' >> $batman_script echo ' iptables -D INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script + echo " iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script + echo " iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script echo '' >> $batman_script echo ' if [ -f /bin/systemctl ]; then' >> $batman_script echo ' systemctl restart network-manager' >> $batman_script