浏览代码

Tox ports open for mesh

Bob Mottram 8 年前
父节点
当前提交
d20e0dc15a
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 2
    0
      src/freedombone-app-tox
  2. 5
    0
      src/freedombone-mesh-batman

+ 2
- 0
src/freedombone-app-tox 查看文件

@@ -195,6 +195,7 @@ function remove_tox_node {
195 195
     fi
196 196
 
197 197
     iptables -D INPUT -p tcp --dport $TOX_PORT -j ACCEPT
198
+    iptables -D INPUT -p udp --dport $TOX_PORT -j ACCEPT
198 199
     function_check save_firewall_settings
199 200
     save_firewall_settings
200 201
 
@@ -268,6 +269,7 @@ function configure_firewall_for_tox {
268 269
     fi
269 270
 
270 271
     iptables -A INPUT -p tcp --dport $TOX_PORT -j ACCEPT
272
+    iptables -A INPUT -p udp --dport $TOX_PORT -j ACCEPT
271 273
     function_check save_firewall_settings
272 274
     save_firewall_settings
273 275
 

+ 5
- 0
src/freedombone-mesh-batman 查看文件

@@ -62,6 +62,7 @@ sed -i "s|Wifi channel:.*|Wifi channel:${CHANNEL}|g" $COMPLETION_FILE
62 62
 
63 63
 ZERONET_PORT=15441
64 64
 IPFS_PORT=4001
65
+TOX_PORT=33445
65 66
 
66 67
 # Ethernet bridge definition (bridged to bat0)
67 68
 BRIDGE=br-mesh
@@ -134,6 +135,8 @@ function stop {
134 135
     iptables -D INPUT -p udp --dport $ZERONET_PORT -j ACCEPT
135 136
     iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT
136 137
     iptables -D INPUT -p udp --dport $IPFS_PORT -j ACCEPT
138
+    iptables -D INPUT -p tcp --dport $TOX_PORT -j ACCEPT
139
+    iptables -D INPUT -p udp --dport $TOX_PORT -j ACCEPT
137 140
 
138 141
     systemctl restart network-manager
139 142
 }
@@ -233,6 +236,8 @@ function start {
233 236
     iptables -A INPUT -p tcp --dport $ZERONET_PORT -j ACCEPT
234 237
     iptables -A INPUT -p udp --dport $ZERONET_PORT -j ACCEPT
235 238
     iptables -A INPUT -p tcp --dport $IPFS_PORT -j ACCEPT
239
+    iptables -A INPUT -p tcp --dport $TOX_PORT -j ACCEPT
240
+    iptables -A INPUT -p udp --dport $TOX_PORT -j ACCEPT
236 241
 
237 242
     systemctl restart avahi-daemon
238 243