浏览代码

Open ipfs port on mesh

Bob Mottram 9 年前
父节点
当前提交
5dd057635b
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 2
    0
      src/freedombone
  2. 3
    0
      src/freedombone-client

+ 2
- 0
src/freedombone 查看文件

2250
   echo '    iptables -A INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2250
   echo '    iptables -A INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2251
   echo "    iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2251
   echo "    iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2252
   echo "    iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2252
   echo "    iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2253
+  echo "    iptables -A INPUT -p tcp --dport $IPFS_PORT -j ACCEPT" >> $batman_script
2253
   echo '' >> $batman_script
2254
   echo '' >> $batman_script
2254
   echo '    systemctl restart avahi-daemon' >> $batman_script
2255
   echo '    systemctl restart avahi-daemon' >> $batman_script
2255
   echo '}' >> $batman_script
2256
   echo '}' >> $batman_script
2285
   echo '    iptables -D INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2286
   echo '    iptables -D INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2286
   echo "    iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2287
   echo "    iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2287
   echo "    iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2288
   echo "    iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2289
+  echo "    iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT" >> $batman_script
2288
   echo '' >> $batman_script
2290
   echo '' >> $batman_script
2289
   echo '    systemctl restart network-manager' >> $batman_script
2291
   echo '    systemctl restart network-manager' >> $batman_script
2290
   echo '}' >> $batman_script
2292
   echo '}' >> $batman_script

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

48
 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"
48
 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"
49
 
49
 
50
 ZERONET_PORT=15441
50
 ZERONET_PORT=15441
51
+IPFS_PORT=4001
51
 TRACKER_PORT=6969
52
 TRACKER_PORT=6969
52
 
53
 
53
 # see https://stribika.github.io/2015/01/04/secure-secure-shell.html
54
 # see https://stribika.github.io/2015/01/04/secure-secure-shell.html
343
   echo "    iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
344
   echo "    iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
344
   echo "    iptables -A INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
345
   echo "    iptables -A INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
345
   echo "    iptables -A INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
346
   echo "    iptables -A INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
347
+  echo "    iptables -A INPUT -p tcp --dport $IPFS_PORT -j ACCEPT" >> $batman_script
346
   echo "    iptables -A INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
348
   echo "    iptables -A INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
347
   echo "    iptables -A INPUT -p tcp --dport 80 -j ACCEPT" >> $batman_script
349
   echo "    iptables -A INPUT -p tcp --dport 80 -j ACCEPT" >> $batman_script
348
   echo "    iptables -A INPUT -p udp -m udp -j ACCEPT" >> $batman_script
350
   echo "    iptables -A INPUT -p udp -m udp -j ACCEPT" >> $batman_script
388
   echo "    iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
390
   echo "    iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
389
   echo "    iptables -D INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
391
   echo "    iptables -D INPUT -p udp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
390
   echo "    iptables -D INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
392
   echo "    iptables -D INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $batman_script
393
+  echo "    iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT" >> $batman_script
391
   echo "    iptables -D INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
394
   echo "    iptables -D INPUT -p udp --dport 1900 -j ACCEPT" >> $batman_script
392
   echo "    iptables -D INPUT -p tcp --dport 80 -j ACCEPT" >> $batman_script
395
   echo "    iptables -D INPUT -p tcp --dport 80 -j ACCEPT" >> $batman_script
393
   echo "    iptables -D INPUT -p udp -m udp -j ACCEPT" >> $batman_script
396
   echo "    iptables -D INPUT -p udp -m udp -j ACCEPT" >> $batman_script