瀏覽代碼

upnp port for zeronet

Bob Mottram 9 年之前
父節點
當前提交
63b1d97eeb
共有 2 個檔案被更改,包括 3 行新增0 行删除
  1. 1
    0
      src/freedombone
  2. 2
    0
      src/freedombone-client

+ 1
- 0
src/freedombone 查看文件

6018
   iptables -A INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT
6018
   iptables -A INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT
6019
   iptables -A INPUT -i $WIFI_INTERFACE -p tcp --dport $ZERONET_PORT -j ACCEPT
6019
   iptables -A INPUT -i $WIFI_INTERFACE -p tcp --dport $ZERONET_PORT -j ACCEPT
6020
   iptables -A INPUT -i $WIFI_INTERFACE -p udp --dport $TRACKER_PORT -j ACCEPT
6020
   iptables -A INPUT -i $WIFI_INTERFACE -p udp --dport $TRACKER_PORT -j ACCEPT
6021
+  iptables -A INPUT -i $WIFI_INTERFACE -p udp --dport 1900 -j ACCEPT
6021
   save_firewall_settings
6022
   save_firewall_settings
6022
   echo 'configure_firewall_for_zeronet' >> $COMPLETION_FILE
6023
   echo 'configure_firewall_for_zeronet' >> $COMPLETION_FILE
6023
 }
6024
 }

+ 2
- 0
src/freedombone-client 查看文件

341
   echo "    iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
341
   echo "    iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
342
   echo "    iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
342
   echo "    iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
343
   echo "    iptables -A INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
343
   echo "    iptables -A INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
344
+  echo "    iptables -A INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
344
   echo '' >> $batman_script
345
   echo '' >> $batman_script
345
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
346
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
346
   echo '        systemctl restart avahi-daemon' >> $batman_script
347
   echo '        systemctl restart avahi-daemon' >> $batman_script
382
   echo "    iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
383
   echo "    iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
383
   echo "    iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
384
   echo "    iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
384
   echo "    iptables -D INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
385
   echo "    iptables -D INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
386
+  echo "    iptables -D INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
385
   echo '' >> $batman_script
387
   echo '' >> $batman_script
386
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
388
   echo '    if [ -f /bin/systemctl ]; then' >> $batman_script
387
   echo '        systemctl restart network-manager' >> $batman_script
389
   echo '        systemctl restart network-manager' >> $batman_script