Bladeren bron

enable and disable avahi ports

Bob Mottram 9 jaren geleden
bovenliggende
commit
66b96ebf79
1 gewijzigde bestanden met toevoegingen van 12 en 2 verwijderingen
  1. 12
    2
      src/freedombone-client

+ 12
- 2
src/freedombone-client Bestand weergeven

263
   echo '        ifconfig $BRIDGE up' >> $batman_script
263
   echo '        ifconfig $BRIDGE up' >> $batman_script
264
   echo '    fi' >> $batman_script
264
   echo '    fi' >> $batman_script
265
   echo '' >> $batman_script
265
   echo '' >> $batman_script
266
-  echo '    iptables -A INPUT -i $IFACE -p udp --dport 5353 -j ACCEPT' >> $batman_script
266
+  echo '    iptables -A INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT' >> $batman_script
267
+  echo '    iptables -A INPUT -p tcp -m state -m udp --dport 548 --state NEW -j ACCEPT' >> $batman_script
268
+  echo '    iptables -A INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
269
+  echo '    iptables -A INPUT -p tcp -m state -m udp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
270
+  echo '    iptables -A INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
271
+  echo '    iptables -A INPUT -p tcp -m state -m udp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
267
   echo '' >> $batman_script
272
   echo '' >> $batman_script
268
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
273
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
269
   echo '        systemctl restart avahi-daemon' >> $batman_script
274
   echo '        systemctl restart avahi-daemon' >> $batman_script
295
   echo '    ifconfig $IFACE down' >> $batman_script
300
   echo '    ifconfig $IFACE down' >> $batman_script
296
   echo '    iwconfig $IFACE mode managed' >> $batman_script
301
   echo '    iwconfig $IFACE mode managed' >> $batman_script
297
   echo '' >> $batman_script
302
   echo '' >> $batman_script
298
-  echo '    iptables -D INPUT -i $IFACE -p udp --dport 5353 -j ACCEPT' >> $batman_script
303
+  echo '    iptables -D INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT' >> $batman_script
304
+  echo '    iptables -D INPUT -p tcp -m state -m udp --dport 548 --state NEW -j ACCEPT' >> $batman_script
305
+  echo '    iptables -D INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
306
+  echo '    iptables -D INPUT -p tcp -m state -m udp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
307
+  echo '    iptables -D INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
308
+  echo '    iptables -D INPUT -p tcp -m state -m udp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
299
   echo '' >> $batman_script
309
   echo '' >> $batman_script
300
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
310
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
301
   echo '        systemctl restart network-manager' >> $batman_script
311
   echo '        systemctl restart network-manager' >> $batman_script