浏览代码

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,6 +2250,7 @@ function mesh_batman_bridge {
2250 2250
   echo '    iptables -A INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2251 2251
   echo "    iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2252 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 2254
   echo '' >> $batman_script
2254 2255
   echo '    systemctl restart avahi-daemon' >> $batman_script
2255 2256
   echo '}' >> $batman_script
@@ -2285,6 +2286,7 @@ function mesh_batman_bridge {
2285 2286
   echo '    iptables -D INPUT -p udp --dport 5354 -j ACCEPT' >> $batman_script
2286 2287
   echo "    iptables -D INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT" >> $batman_script
2287 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 2290
   echo '' >> $batman_script
2289 2291
   echo '    systemctl restart network-manager' >> $batman_script
2290 2292
   echo '}' >> $batman_script

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

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