瀏覽代碼

Stateless mDNS

Bob Mottram 9 年之前
父節點
當前提交
32eee30170
共有 1 個文件被更改,包括 18 次插入18 次删除
  1. 18
    18
      src/freedombone

+ 18
- 18
src/freedombone 查看文件

@@ -1972,12 +1972,12 @@ function mesh_batman_bridge {
1972 1972
   echo '        ifconfig $BRIDGE up' >> $batman_script
1973 1973
   echo '    fi' >> $batman_script
1974 1974
   echo '' >> $batman_script
1975
-  echo '    iptables -A INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT' >> $batman_script
1976
-  echo '    iptables -A INPUT -p udp -m state -m udp --dport 548 --state NEW -j ACCEPT' >> $batman_script
1977
-  echo '    iptables -A INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
1978
-  echo '    iptables -A INPUT -p udp -m state -m udp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
1979
-  echo '    iptables -A INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
1980
-  echo '    iptables -A INPUT -p udp -m state -m udp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
1975
+  echo '    iptables -A INPUT -p tcp --dport 548 -j ACCEPT' >> $batman_script
1976
+  echo '    iptables -A INPUT -p udp --dport 548 -j ACCEPT' >> $batman_script
1977
+  echo '    iptables -A INPUT -p tcp --dport 5353 -j ACCEPT' >> $batman_script
1978
+  echo '    iptables -A INPUT -p udp --dport 5353 -j ACCEPT' >> $batman_script
1979
+  echo '    iptables -A INPUT -p tcp --dport 5354 -j ACCEPT' >> $batman_script
1980
+  echo '    iptables -A INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
1981 1981
   echo '' >> $batman_script
1982 1982
   echo '    systemctl restart avahi-daemon' >> $batman_script
1983 1983
   echo '}' >> $batman_script
@@ -2005,12 +2005,12 @@ function mesh_batman_bridge {
2005 2005
   echo '    ifconfig $IFACE down' >> $batman_script
2006 2006
   echo '    iwconfig $IFACE mode managed' >> $batman_script
2007 2007
   echo '' >> $batman_script
2008
-  echo '    iptables -D INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT' >> $batman_script
2009
-  echo '    iptables -D INPUT -p udp -m state -m udp --dport 548 --state NEW -j ACCEPT' >> $batman_script
2010
-  echo '    iptables -D INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
2011
-  echo '    iptables -D INPUT -p udp -m state -m udp --dport 5353 --state NEW -j ACCEPT' >> $batman_script
2012
-  echo '    iptables -D INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
2013
-  echo '    iptables -D INPUT -p udp -m state -m udp --dport 5354 --state NEW -j ACCEPT' >> $batman_script
2008
+  echo '    iptables -D INPUT -p tcp --dport 548 -j ACCEPT' >> $batman_script
2009
+  echo '    iptables -D INPUT -p udp --dport 548 -j ACCEPT' >> $batman_script
2010
+  echo '    iptables -D INPUT -p tcp --dport 5353 -j ACCEPT' >> $batman_script
2011
+  echo '    iptables -D INPUT -p udp --dport 5353 -j ACCEPT' >> $batman_script
2012
+  echo '    iptables -D INPUT -p tcp --dport 5354 -j ACCEPT' >> $batman_script
2013
+  echo '    iptables -D INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2014 2014
   echo '' >> $batman_script
2015 2015
   echo '    systemctl restart network-manager' >> $batman_script
2016 2016
   echo '}' >> $batman_script
@@ -5935,12 +5935,12 @@ function configure_firewall_for_avahi {
5935 5935
   if [[ $ENABLE_CJDNS != "yes" && $ENABLE_BATMAN != "yes" && $ENABLE_BABEL != "yes" ]]; then
5936 5936
       return
5937 5937
   fi
5938
-  iptables -A INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT
5939
-  iptables -A INPUT -p udp -m state -m udp --dport 548 --state NEW -j ACCEPT
5940
-  iptables -A INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT
5941
-  iptables -A INPUT -p udp -m state -m udp --dport 5353 --state NEW -j ACCEPT
5942
-  iptables -A INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT
5943
-  iptables -A INPUT -p udp -m state -m udp --dport 5354 --state NEW -j ACCEPT
5938
+  iptables -A INPUT -p tcp --dport 548 -j ACCEPT
5939
+  iptables -A INPUT -p udp --dport 548 -j ACCEPT
5940
+  iptables -A INPUT -p tcp --dport 5353 -j ACCEPT
5941
+  iptables -A INPUT -p udp --dport 5353 -j ACCEPT
5942
+  iptables -A INPUT -p tcp --dport 5354 -j ACCEPT
5943
+  iptables -A INPUT -p udp --dport 5354 -j ACCEPT
5944 5944
   save_firewall_settings
5945 5945
   echo 'configure_firewall_for_avahi' >> $COMPLETION_FILE
5946 5946
 }