瀏覽代碼

Separate vpn port for mesh

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

+ 3
- 0
src/freedombone-app-vpn 查看文件

@@ -46,6 +46,7 @@ VPN_ORGANISATION="Freedombone"
46 46
 VPN_UNIT="Freedombone Unit"
47 47
 STUNNEL_PORT=3439
48 48
 VPN_TLS_PORT=553
49
+VPN_MESH_TLS_PORT=653
49 50
 
50 51
 vpn_variables=(MY_EMAIL_ADDRESS
51 52
                DEFAULT_DOMAIN_NAME
@@ -504,6 +505,7 @@ function install_stunnel {
504 505
     if [ $rootdir ]; then
505 506
         prefix=$rootdir
506 507
         prefixchroot="chroot $rootdir"
508
+        VPN_TLS_PORT=$VPN_MESH_TLS_PORT
507 509
     fi
508 510
 
509 511
     $prefixchroot apt-get -yq install stunnel4
@@ -634,6 +636,7 @@ function install_vpn {
634 636
     if [ $rootdir ]; then
635 637
         prefix=$rootdir
636 638
         prefixchroot="chroot $rootdir"
639
+        VPN_TLS_PORT=$VPN_MESH_TLS_PORT
637 640
     fi
638 641
     $prefixchroot apt-get -yq install fastd openvpn easy-rsa
639 642
 

+ 2
- 2
src/freedombone-mesh-batman 查看文件

@@ -159,8 +159,8 @@ function stop {
159 159
     iptables -D INPUT -p udp --dport 8008 -j ACCEPT
160 160
     iptables -D INPUT -p tcp --dport 8008 -j ACCEPT
161 161
     # vpn over the internet
162
-    iptables -D INPUT -p tcp --dport 553 -j ACCEPT
163
-    iptables -D INPUT -p udp --dport 553 -j ACCEPT
162
+    iptables -D INPUT -p tcp --dport 653 -j ACCEPT
163
+    iptables -D INPUT -p udp --dport 653 -j ACCEPT
164 164
     iptables -D INPUT -i ${EIFACE} -m state --state NEW -p tcp --dport 1194 -j ACCEPT
165 165
     iptables -D INPUT -i tun+ -j ACCEPT
166 166
     iptables -D FORWARD -i tun+ -j ACCEPT