Open zeronet port on client when using mesh

This commit is contained in:
Bob Mottram 2015-08-24 08:20:34 +01:00
parent 8ab2707f62
commit e26161a754
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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