瀏覽代碼

olsr2/manet firewall

Bob Mottram 7 年之前
父節點
當前提交
9bd45f495b
共有 3 個檔案被更改,包括 18 行新增0 行删除
  1. 二進制
      img/icon_protocol.png
  2. 6
    0
      src/freedombone-mesh-install
  3. 12
    0
      src/freedombone-utils-mesh

二進制
img/icon_protocol.png 查看文件


+ 6
- 0
src/freedombone-mesh-install 查看文件

@@ -228,6 +228,12 @@ function mesh_firewall {
228 228
     echo "ip6tables -A INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT" >> $MESH_FIREWALL_SCRIPT
229 229
     echo "iptables -A INPUT -p udp --dport 1900 -j ACCEPT" >> $MESH_FIREWALL_SCRIPT
230 230
     echo "ip6tables -A INPUT -p udp --dport 1900 -j ACCEPT" >> $MESH_FIREWALL_SCRIPT
231
+
232
+    echo '# OLSR2/MANET' >> $MESH_FIREWALL_SCRIPT
233
+    echo 'iptables -A INPUT -p udp --dport 269 -j ACCEPT' >> $MESH_FIREWALL_SCRIPT
234
+    echo 'ip6tables -A INPUT -p udp --dport 269 -j ACCEPT' >> $MESH_FIREWALL_SCRIPT
235
+    echo 'iptables -A INPUT -p tcp --dport 138 -j ACCEPT' >> $MESH_FIREWALL_SCRIPT
236
+    echo 'ip6tables -A INPUT -p tcp --dport 138 -j ACCEPT' >> $MESH_FIREWALL_SCRIPT
231 237
     chmod +x $MESH_FIREWALL_SCRIPT
232 238
 
233 239
     echo '[Unit]' > $FIREWALL_FILENAME

+ 12
- 0
src/freedombone-utils-mesh 查看文件

@@ -195,6 +195,9 @@ function enable_mesh_firewall {
195 195
     iptables -A INPUT -p tcp --dport 8008 -j ACCEPT
196 196
     iptables -A INPUT -p udp --dport 8010 -j ACCEPT
197 197
     iptables -A INPUT -p tcp --dport 8010 -j ACCEPT
198
+    # OLSR2/MANET
199
+    iptables -A INPUT -p udp --dport 269 -j ACCEPT
200
+    iptables -A INPUT -p tcp --dport 138 -j ACCEPT
198 201
 
199 202
 
200 203
     ip6tables -A INPUT -p ipv6-icmp -j ACCEPT
@@ -225,6 +228,9 @@ function enable_mesh_firewall {
225 228
     ip6tables -A INPUT -p tcp --dport 8008 -j ACCEPT
226 229
     ip6tables -A INPUT -p udp --dport 8010 -j ACCEPT
227 230
     ip6tables -A INPUT -p tcp --dport 8010 -j ACCEPT
231
+    # OLSR2/MANET
232
+    ip6tables -A INPUT -p udp --dport 269 -j ACCEPT
233
+    ip6tables -A INPUT -p tcp --dport 138 -j ACCEPT
228 234
 
229 235
 
230 236
     # vpn over the internet
@@ -273,6 +279,9 @@ function disable_mesh_firewall {
273 279
     iptables -D INPUT -p tcp --dport 8008 -j ACCEPT
274 280
     iptables -D INPUT -p udp --dport 8010 -j ACCEPT
275 281
     iptables -D INPUT -p tcp --dport 8010 -j ACCEPT
282
+    # OLSR2/MANET
283
+    iptables -D INPUT -p udp --dport 269 -j ACCEPT
284
+    iptables -D INPUT -p tcp --dport 138 -j ACCEPT
276 285
 
277 286
 
278 287
     ip6tables -D INPUT -p tcp --dport $TRACKER_PORT -j ACCEPT
@@ -302,6 +311,9 @@ function disable_mesh_firewall {
302 311
     ip6tables -D INPUT -p tcp --dport 8008 -j ACCEPT
303 312
     ip6tables -D INPUT -p udp --dport 8010 -j ACCEPT
304 313
     ip6tables -D INPUT -p tcp --dport 8010 -j ACCEPT
314
+    # OLSR2/MANET
315
+    ip6tables -D INPUT -p udp --dport 269 -j ACCEPT
316
+    ip6tables -D INPUT -p tcp --dport 138 -j ACCEPT
305 317
 
306 318
 
307 319
     # vpn over the internet