瀏覽代碼

Firewall for mesh tunnel

Bob Mottram 7 年之前
父節點
當前提交
c247d4c63d
共有 2 個文件被更改,包括 11 次插入1 次删除
  1. 1
    1
      src/freedombone-app-batman
  2. 10
    0
      src/freedombone-mesh-batman

+ 1
- 1
src/freedombone-app-batman 查看文件

169
     echo '; IP address the broker will listen and accept tunnels on' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
169
     echo '; IP address the broker will listen and accept tunnels on' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
170
     echo 'address=127.0.0.1' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
170
     echo 'address=127.0.0.1' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
171
     echo '; Ports where the broker will listen on' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
171
     echo '; Ports where the broker will listen on' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
172
-    echo "port=53,123,8942" >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
172
+    echo 'port=53,8942' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
173
     echo '; Interface with that IP address' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
173
     echo '; Interface with that IP address' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
174
     echo 'interface=lo' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
174
     echo 'interface=lo' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
175
     echo '; Maximum number of tunnels that will be allowed by the broker' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg
175
     echo '; Maximum number of tunnels that will be allowed by the broker' >> $rootdir/opt/tunneldigger/broker/l2tp_broker.cfg

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

158
     # SSB/Patchwork
158
     # SSB/Patchwork
159
     iptables -D INPUT -p udp --dport 8008 -j ACCEPT
159
     iptables -D INPUT -p udp --dport 8008 -j ACCEPT
160
     iptables -D INPUT -p tcp --dport 8008 -j ACCEPT
160
     iptables -D INPUT -p tcp --dport 8008 -j ACCEPT
161
+    # Tunnel over the internet
162
+    iptables -D INPUT -p tcp --dport 53 -j ACCEPT
163
+    iptables -D INPUT -p udp --dport 53 -j ACCEPT
164
+    iptables -D INPUT -p tcp --dport 8942 -j ACCEPT
165
+    iptables -D INPUT -p udp --dport 8942 -j ACCEPT
161
 
166
 
162
     systemctl restart network-manager
167
     systemctl restart network-manager
163
 }
168
 }
313
     # SSB/Patchwork
318
     # SSB/Patchwork
314
     iptables -A INPUT -p udp --dport 8008 -j ACCEPT
319
     iptables -A INPUT -p udp --dport 8008 -j ACCEPT
315
     iptables -A INPUT -p tcp --dport 8008 -j ACCEPT
320
     iptables -A INPUT -p tcp --dport 8008 -j ACCEPT
321
+    # Tunnel over the internet
322
+    iptables -A INPUT -p tcp --dport 53 -j ACCEPT
323
+    iptables -A INPUT -p udp --dport 53 -j ACCEPT
324
+    iptables -A INPUT -p tcp --dport 8942 -j ACCEPT
325
+    iptables -A INPUT -p udp --dport 8942 -j ACCEPT
316
 
326
 
317
     systemctl restart avahi-daemon
327
     systemctl restart avahi-daemon
318
 
328