Browse Source

Don't remove user certs

Bob Mottram 7 years ago
parent
commit
8434e38c9e
2 changed files with 2 additions and 3 deletions
  1. 2
    1
      src/freedombone-app-vpn
  2. 0
    2
      src/freedombone-utils-firewall

+ 2
- 1
src/freedombone-app-vpn View File

218
 
218
 
219
     chown $username:$username $user_vpn_cert_file
219
     chown $username:$username $user_vpn_cert_file
220
 
220
 
221
-    rm /etc/openvpn/easy-rsa/keys/$username.crt
221
+    #rm /etc/openvpn/easy-rsa/keys/$username.crt
222
+    #rm /etc/openvpn/easy-rsa/keys/$username.csr
222
     shred -zu /etc/openvpn/easy-rsa/keys/$username.key
223
     shred -zu /etc/openvpn/easy-rsa/keys/$username.key
223
 
224
 
224
     echo $"VPN key created at $user_vpn_cert_file"
225
     echo $"VPN key created at $user_vpn_cert_file"

+ 0
- 2
src/freedombone-utils-firewall View File

111
 }
111
 }
112
 
112
 
113
 function firewall_disable_vpn {
113
 function firewall_disable_vpn {
114
-    iptables -D INPUT -p tcp --dport 1194 -j ACCEPT
115
     iptables -D INPUT -p udp --dport 1194 -j ACCEPT
114
     iptables -D INPUT -p udp --dport 1194 -j ACCEPT
116
     iptables -D INPUT -i tun+ -j ACCEPT
115
     iptables -D INPUT -i tun+ -j ACCEPT
117
     iptables -D FORWARD -i tun+ -j ACCEPT
116
     iptables -D FORWARD -i tun+ -j ACCEPT
125
 }
124
 }
126
 
125
 
127
 function firewall_enable_vpn {
126
 function firewall_enable_vpn {
128
-    iptables -A INPUT -p tcp --dport 1194 -j ACCEPT
129
     iptables -A INPUT -p udp --dport 1194 -j ACCEPT
127
     iptables -A INPUT -p udp --dport 1194 -j ACCEPT
130
     iptables -A INPUT -i tun+ -j ACCEPT
128
     iptables -A INPUT -i tun+ -j ACCEPT
131
     iptables -A FORWARD -i tun+ -j ACCEPT
129
     iptables -A FORWARD -i tun+ -j ACCEPT