1 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/access e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/access |
2 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/access 1969-12-31 19:00:00.000000000 -0500 |
3 |
+++ e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/access 2021-03-03 13:28:59.005000000 -0500 |
4 |
@@ -0,0 +1 @@ |
5 |
+public |
6 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/AccessDefault e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/AccessDefault |
7 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/AccessDefault 1969-12-31 19:00:00.000000000 -0500 |
8 |
+++ e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/AccessDefault 2021-03-03 13:29:19.905000000 -0500 |
9 |
@@ -0,0 +1 @@ |
10 |
+no |
11 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/sessions e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/sessions |
12 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/sessions 1969-12-31 19:00:00.000000000 -0500 |
13 |
+++ e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/sessions 2021-03-03 13:26:20.122000000 -0500 |
14 |
@@ -0,0 +1 @@ |
15 |
+0 |
16 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/status e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/status |
17 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/status 1969-12-31 19:00:00.000000000 -0500 |
18 |
+++ e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/status 2021-03-03 13:25:24.290000000 -0500 |
19 |
@@ -0,0 +1 @@ |
20 |
+disabled |
21 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/type e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/type |
22 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/db/configuration/defaults/vpn/type 1969-12-31 19:00:00.000000000 -0500 |
23 |
+++ e-smith-base-5.8.0/root/etc/e-smith/db/configuration/defaults/vpn/type 2021-03-03 13:25:50.502000000 -0500 |
24 |
@@ -0,0 +1 @@ |
25 |
+configuration |
26 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/locale/en/etc/e-smith/web/functions/remoteaccess e-smith-base-5.8.0/root/etc/e-smith/locale/en/etc/e-smith/web/functions/remoteaccess |
27 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/locale/en/etc/e-smith/web/functions/remoteaccess 2016-02-04 18:14:13.000000000 -0500 |
28 |
+++ e-smith-base-5.8.0/root/etc/e-smith/locale/en/etc/e-smith/web/functions/remoteaccess 2021-03-03 15:12:34.138000000 -0500 |
29 |
@@ -48,8 +48,8 @@ |
30 |
<trans>Number of PPTP clients</trans> |
31 |
</entry> |
32 |
<entry> |
33 |
- <base>NUMBER_OF_PPTP_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
34 |
- <trans>The number of pptp clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
35 |
+ <base>NUMBER_OF_VPN_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
36 |
+ <trans>The number of VPN clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
37 |
</entry> |
38 |
<entry> |
39 |
<base>LABEL_SSH_PORT</base> |
40 |
@@ -124,6 +124,15 @@ |
41 |
</trans> |
42 |
</entry> |
43 |
<entry> |
44 |
+ <base>DESC_VPN</base> |
45 |
+ <trans><![CDATA[ <hr class="sectionbar" /><h2>VPN Settings</h2> |
46 |
+ You can allow VPN access to your server. |
47 |
+ You should leave this feature disabled by setting the value |
48 |
+ to the number 0 unless you require VPN access. |
49 |
+ ]]> |
50 |
+ </trans> |
51 |
+ </entry> |
52 |
+ <entry> |
53 |
<base>VALUE_ZERO_OR_POSITIVE</base> |
54 |
<trans>Value must be zero or a positive integer</trans> |
55 |
</entry> |
56 |
@@ -243,4 +252,8 @@ |
57 |
<base>LABEL_IPSECRW_RESET</base> |
58 |
<trans>Reset digital certificates</trans> |
59 |
</entry> |
60 |
+ <entry> |
61 |
+ <base>DESC_IPSEC_VPN_UNAVAILABLE</base> |
62 |
+ <trans>IPSEC VPN is not installed. Please install the contrib if you need VPN access.</trans> |
63 |
+ </entry> |
64 |
</lexicon> |
65 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-au/etc/e-smith/web/functions/remoteaccess e-smith-base-5.8.0/root/etc/e-smith/locale/en-au/etc/e-smith/web/functions/remoteaccess |
66 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-au/etc/e-smith/web/functions/remoteaccess 2016-02-04 18:14:13.000000000 -0500 |
67 |
+++ e-smith-base-5.8.0/root/etc/e-smith/locale/en-au/etc/e-smith/web/functions/remoteaccess 2021-03-03 15:12:34.138000000 -0500 |
68 |
@@ -48,8 +48,8 @@ |
69 |
<trans>Number of PPTP clients</trans> |
70 |
</entry> |
71 |
<entry> |
72 |
- <base>NUMBER_OF_PPTP_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
73 |
- <trans>The number of pptp clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
74 |
+ <base>NUMBER_OF_VPN_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
75 |
+ <trans>The number of VPN clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
76 |
</entry> |
77 |
<entry> |
78 |
<base>LABEL_SSH_PORT</base> |
79 |
@@ -124,6 +124,15 @@ |
80 |
</trans> |
81 |
</entry> |
82 |
<entry> |
83 |
+ <base>DESC_VPN</base> |
84 |
+ <trans><![CDATA[ <hr class="sectionbar" /><h2>VPN Settings</h2> |
85 |
+ You can allow VPN access to your server. |
86 |
+ You should leave this feature disabled by setting the value |
87 |
+ to the number 0 unless you require VPN access. |
88 |
+ ]]> |
89 |
+ </trans> |
90 |
+ </entry> |
91 |
+ <entry> |
92 |
<base>VALUE_ZERO_OR_POSITIVE</base> |
93 |
<trans>Value must be zero or a positive integer</trans> |
94 |
</entry> |
95 |
@@ -243,4 +252,8 @@ |
96 |
<base>LABEL_IPSECRW_RESET</base> |
97 |
<trans>Reset digital certificates</trans> |
98 |
</entry> |
99 |
+ <entry> |
100 |
+ <base>DESC_IPSEC_VPN_UNAVAILABLE</base> |
101 |
+ <trans>IPSEC VPN is not installed. Please install the contrib if you need VPN access.</trans> |
102 |
+ </entry> |
103 |
</lexicon> |
104 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-gb/etc/e-smith/web/functions/remoteaccess e-smith-base-5.8.0/root/etc/e-smith/locale/en-gb/etc/e-smith/web/functions/remoteaccess |
105 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-gb/etc/e-smith/web/functions/remoteaccess 2016-02-04 18:14:13.000000000 -0500 |
106 |
+++ e-smith-base-5.8.0/root/etc/e-smith/locale/en-gb/etc/e-smith/web/functions/remoteaccess 2021-03-03 15:12:34.138000000 -0500 |
107 |
@@ -48,8 +48,8 @@ |
108 |
<trans>Number of PPTP clients</trans> |
109 |
</entry> |
110 |
<entry> |
111 |
- <base>NUMBER_OF_PPTP_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
112 |
- <trans>The number of pptp clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
113 |
+ <base>NUMBER_OF_VPN_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
114 |
+ <trans>The number of VPN clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
115 |
</entry> |
116 |
<entry> |
117 |
<base>LABEL_SSH_PORT</base> |
118 |
@@ -124,6 +124,15 @@ |
119 |
</trans> |
120 |
</entry> |
121 |
<entry> |
122 |
+ <base>DESC_VPN</base> |
123 |
+ <trans><![CDATA[ <hr class="sectionbar" /><h2>VPN Settings</h2> |
124 |
+ You can allow VPN access to your server. |
125 |
+ You should leave this feature disabled by setting the value |
126 |
+ to the number 0 unless you require VPN access. |
127 |
+ ]]> |
128 |
+ </trans> |
129 |
+ </entry> |
130 |
+ <entry> |
131 |
<base>VALUE_ZERO_OR_POSITIVE</base> |
132 |
<trans>Value must be zero or a positive integer</trans> |
133 |
</entry> |
134 |
@@ -243,4 +252,8 @@ |
135 |
<base>LABEL_IPSECRW_RESET</base> |
136 |
<trans>Reset digital certificates</trans> |
137 |
</entry> |
138 |
+ <entry> |
139 |
+ <base>DESC_IPSEC_VPN_UNAVAILABLE</base> |
140 |
+ <trans>IPSEC VPN is not installed. Please install the contrib if you need VPN access.</trans> |
141 |
+ </entry> |
142 |
</lexicon> |
143 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-nz/etc/e-smith/web/functions/remoteaccess e-smith-base-5.8.0/root/etc/e-smith/locale/en-nz/etc/e-smith/web/functions/remoteaccess |
144 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-nz/etc/e-smith/web/functions/remoteaccess 2016-02-04 18:14:13.000000000 -0500 |
145 |
+++ e-smith-base-5.8.0/root/etc/e-smith/locale/en-nz/etc/e-smith/web/functions/remoteaccess 2021-03-03 15:12:34.138000000 -0500 |
146 |
@@ -48,8 +48,8 @@ |
147 |
<trans>Number of PPTP clients</trans> |
148 |
</entry> |
149 |
<entry> |
150 |
- <base>NUMBER_OF_PPTP_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
151 |
- <trans>The number of pptp clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
152 |
+ <base>NUMBER_OF_VPN_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
153 |
+ <trans>The number of VPN clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
154 |
</entry> |
155 |
<entry> |
156 |
<base>LABEL_SSH_PORT</base> |
157 |
@@ -124,6 +124,15 @@ |
158 |
</trans> |
159 |
</entry> |
160 |
<entry> |
161 |
+ <base>DESC_VPN</base> |
162 |
+ <trans><![CDATA[ <hr class="sectionbar" /><h2>VPN Settings</h2> |
163 |
+ You can allow VPN access to your server. |
164 |
+ You should leave this feature disabled by setting the value |
165 |
+ to the number 0 unless you require VPN access. |
166 |
+ ]]> |
167 |
+ </trans> |
168 |
+ </entry> |
169 |
+ <entry> |
170 |
<base>VALUE_ZERO_OR_POSITIVE</base> |
171 |
<trans>Value must be zero or a positive integer</trans> |
172 |
</entry> |
173 |
@@ -243,4 +252,8 @@ |
174 |
<base>LABEL_IPSECRW_RESET</base> |
175 |
<trans>Reset digital certificates</trans> |
176 |
</entry> |
177 |
+ <entry> |
178 |
+ <base>DESC_IPSEC_VPN_UNAVAILABLE</base> |
179 |
+ <trans>IPSEC VPN is not installed. Please install the contrib if you need VPN access.</trans> |
180 |
+ </entry> |
181 |
</lexicon> |
182 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess e-smith-base-5.8.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess |
183 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess 2016-02-04 18:14:13.000000000 -0500 |
184 |
+++ e-smith-base-5.8.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess 2021-03-03 15:12:34.138000000 -0500 |
185 |
@@ -48,8 +48,8 @@ |
186 |
<trans>Number of PPTP clients</trans> |
187 |
</entry> |
188 |
<entry> |
189 |
- <base>NUMBER_OF_PPTP_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
190 |
- <trans>The number of pptp clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
191 |
+ <base>NUMBER_OF_VPN_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE</base> |
192 |
+ <trans>The number of VPN clients is greater than the number of reserved IP for DHCP. You should take a smaller number.</trans> |
193 |
</entry> |
194 |
<entry> |
195 |
<base>LABEL_SSH_PORT</base> |
196 |
@@ -124,6 +124,15 @@ |
197 |
</trans> |
198 |
</entry> |
199 |
<entry> |
200 |
+ <base>DESC_VPN</base> |
201 |
+ <trans><![CDATA[ <hr class="sectionbar" /><h2>VPN Settings</h2> |
202 |
+ You can allow VPN access to your server. |
203 |
+ You should leave this feature disabled by setting the value |
204 |
+ to the number 0 unless you require VPN access. |
205 |
+ ]]> |
206 |
+ </trans> |
207 |
+ </entry> |
208 |
+ <entry> |
209 |
<base>VALUE_ZERO_OR_POSITIVE</base> |
210 |
<trans>Value must be zero or a positive integer</trans> |
211 |
</entry> |
212 |
@@ -243,4 +252,8 @@ |
213 |
<base>LABEL_IPSECRW_RESET</base> |
214 |
<trans>Reset digital certificates</trans> |
215 |
</entry> |
216 |
+ <entry> |
217 |
+ <base>DESC_IPSEC_VPN_UNAVAILABLE</base> |
218 |
+ <trans>IPSEC VPN is not installed. Please install the contrib if you need VPN access.</trans> |
219 |
+ </entry> |
220 |
</lexicon> |
221 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/tests/10e-smith-base/configuration.conf e-smith-base-5.8.0/root/etc/e-smith/tests/10e-smith-base/configuration.conf |
222 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/tests/10e-smith-base/configuration.conf 2021-03-03 13:00:51.018000000 -0500 |
223 |
+++ e-smith-base-5.8.0/root/etc/e-smith/tests/10e-smith-base/configuration.conf 2021-03-03 15:12:44.565000000 -0500 |
224 |
@@ -84,7 +84,6 @@ |
225 |
pop3s=service|access|private|status|enabled |
226 |
popd=service|access|private|status|enabled |
227 |
pppoe=service|DemandIdleTime|no|InitscriptOrder|57|SynchronousPPP|no|status|disabled |
228 |
-pptpd=service|sessions|10|status|disabled |
229 |
qmail=service|InitscriptOrder|80|status|enabled |
230 |
random=service|InitscriptOrder|20|status|enabled |
231 |
scanner=service|ScannerFns|iscan|UpdateTime|1:14|scanMail|yes|status|enabled |
232 |
@@ -96,4 +95,5 @@ |
233 |
sync=service|Host|service.e-smith.com|LastId|0|SuccessId|0|SyncFrequency|1|SyncMinute|57|status|disabled |
234 |
rsyslog=service|InitscriptOrder|05|status|enabled |
235 |
telnet=service|access|private|status|disabled |
236 |
+vpn=configuration|sessions|10|status|disabled |
237 |
wibble=42 |
238 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/web/functions/remoteaccess e-smith-base-5.8.0/root/etc/e-smith/web/functions/remoteaccess |
239 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/web/functions/remoteaccess 2021-03-03 13:00:51.242000000 -0500 |
240 |
+++ e-smith-base-5.8.0/root/etc/e-smith/web/functions/remoteaccess 2021-03-03 15:12:09.789000000 -0500 |
241 |
@@ -60,6 +60,7 @@ |
242 |
ok ($ua->{form}->find_input('sshAccess'), 'Finding the sshAccess field'); |
243 |
ok ($ua->{form}->find_input('sshPermitRootLogin'), 'Finding the sshPermitRootLogin field'); |
244 |
ok ($ua->{form}->find_input('sshTCPPort'), 'Finding the sshTCPPort field'); |
245 |
+ok ($ua->{form}->find_input('vpnSessions'), 'Finding the vpnSessions field'); |
246 |
ok ($ua->{form}->find_input('sshPasswordAuthentication'), 'Finding the sshPasswordAuthentication field'); |
247 |
ok ($ua->{form}->find_input('FTPLimits'), 'Finding the FTPLimits field'); |
248 |
ok ($ua->{form}->find_input('TelnetAccess'), 'Finding the TelnetAccess field'); |
249 |
@@ -69,6 +70,7 @@ |
250 |
$ua->field('sshAccess' => 'public'); |
251 |
$ua->field('sshPermitRootLogin' => 'yes'); |
252 |
$ua->field('sshTCPPort' => '22'); |
253 |
+ $ua->field('vpnSessions' => '10'); |
254 |
$ua->field('sshPasswordAuthentication' => 'yes'); |
255 |
$ua->field('FTPLimits' => 'normal'); |
256 |
$ua->field('TelnetAccess' => 'private'); |
257 |
@@ -94,6 +96,8 @@ |
258 |
|
259 |
is ($db->get('ftp')->prop('access'), 'private', "ftp access is private"); |
260 |
is ($db->get('ftp')->prop('accessLimits'), 'normal', "ftp access limits are normal"); |
261 |
+ is ($db->get('vpn')->prop('sessions') ,'10', "Got the right session count for vpn"); |
262 |
+ is ($db->get('vpn')->prop('status') ,'enabled', "vpn is enabled"); |
263 |
is ($db->get('telnet')->prop('access'), 'private', "Private telnet turned on"); |
264 |
} |
265 |
|
266 |
@@ -107,6 +111,12 @@ |
267 |
<page name="First" post-event="change_settings()" |
268 |
pre-event="print_status_message()"> |
269 |
|
270 |
+ <field type="text" id="vpnSessions" size="3" validation="zero_or_positive(), vpn_and_dhcp_range()" |
271 |
+ value="get_vpn_sessions()"> |
272 |
+ <label>LABEL_PPTP</label> |
273 |
+ <description>DESC_VPN</description> |
274 |
+ </field> |
275 |
+ |
276 |
<subroutine src="show_ipsecrw_section()"/> |
277 |
|
278 |
<subroutine src="show_valid_from_list()"/> |
279 |
diff -Nur e-smith-base-5.8.0.old/root/etc/e-smith/web/functions/useraccounts e-smith-base-5.8.0/root/etc/e-smith/web/functions/useraccounts |
280 |
--- e-smith-base-5.8.0.old/root/etc/e-smith/web/functions/useraccounts 2021-03-03 13:00:51.243000000 -0500 |
281 |
+++ e-smith-base-5.8.0/root/etc/e-smith/web/functions/useraccounts 2021-03-03 15:11:52.696000000 -0500 |
282 |
@@ -211,6 +211,10 @@ |
283 |
> |
284 |
<label>FORWARDING_ADDRESS</label> |
285 |
</field> |
286 |
+ <field type="select" id="VPNClientAccess" options="'yes' => 'YES', |
287 |
+ 'no' => 'NO'" validation="nonblank" value="get_vpn_value()"> |
288 |
+ <label>VPN_CLIENT_ACCESS</label> |
289 |
+ </field> |
290 |
<subroutine src="print_ipsec_client_section()" /> |
291 |
<subroutine src="print_groupMemberships_field()" /> |
292 |
<subroutine src="print_save_or_add_button()" /> |
293 |
@@ -237,7 +241,7 @@ |
294 |
<label>FORWARDING_ADDRESS</label> |
295 |
</field> |
296 |
<field type="select" id="VPNClientAccess" options="'yes' => 'YES', |
297 |
- 'no' => 'NO'" validation="nonblank" value="get_pptp_value()"> |
298 |
+ 'no' => 'NO'" validation="nonblank" value="get_vpn_value()"> |
299 |
<label>VPN_CLIENT_ACCESS</label> |
300 |
</field> |
301 |
<subroutine src="print_ipsec_client_section()" /> |
302 |
diff -Nur e-smith-base-5.8.0.old/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm e-smith-base-5.8.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm |
303 |
--- e-smith-base-5.8.0.old/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2021-03-03 13:00:51.290000000 -0500 |
304 |
+++ e-smith-base-5.8.0/root/usr/share/perl5/vendor_perl/esmith/console/configure.pm 2021-03-03 15:12:22.456000000 -0500 |
305 |
@@ -1682,7 +1682,7 @@ |
306 |
( |
307 |
title => gettext("Select end of DHCP host number range"), |
308 |
text => |
309 |
- gettext("Please enter the last host address in this range. If you are using the standard server defaults and have no particular preference, you should keep the default value. Think to add enough ip for pptp sessions."), |
310 |
+ gettext("Please enter the last host address in this range. If you are using the standard server defaults and have no particular preference, you should keep the default value. Think to add enough ip for vpn sessions."), |
311 |
value => $serverEnd |
312 |
); |
313 |
|
314 |
@@ -1692,11 +1692,11 @@ |
315 |
{ |
316 |
if ( isValidIP($choice) ) |
317 |
{ |
318 |
- # retrieve values to verifiy if ip_count > pptp_sessions |
319 |
+ # retrieve values to verifiy if ip_count > vpn_sessions |
320 |
my $ip_start = unpack 'N', inet_aton($serverStart); |
321 |
my $ip_end = unpack 'N', inet_aton($choice); |
322 |
my $ip_count = $ip_end - $ip_start; |
323 |
- my $pptp_sessions = $db->get_prop('pptpd','sessions'); |
324 |
+ my $vpn_sessions = $db->get_prop('vpn','sessions'); |
325 |
|
326 |
my $dhcp_net = ipv4_network($choice, $priv_mask); |
327 |
if ($dhcp_net eq $priv_net) |
328 |
@@ -1709,7 +1709,7 @@ |
329 |
if (cmpIP($serverStart, $choice) < 0) |
330 |
{ |
331 |
if (((cmpIP($priv_ip, $serverStart) < 0) || |
332 |
- (cmpIP($choice, $priv_ip) < 0)) && ($ip_count > $pptp_sessions)) |
333 |
+ (cmpIP($choice, $priv_ip) < 0)) && ($ip_count > $vpn_sessions)) |
334 |
{ |
335 |
# need to check for valid range as well. |
336 |
unless ($choice eq $serverEnd) |
337 |
@@ -1718,12 +1718,12 @@ |
338 |
} |
339 |
goto DNS_FORWARDER; |
340 |
} |
341 |
- # We want to verify that the number of pptp_IP reserved is not superior |
342 |
+ # We want to verify that the number of vpn_IP reserved is not superior |
343 |
# than the number of dhcp_IP set in the range |
344 |
- elsif ($ip_count <= $pptp_sessions) |
345 |
+ elsif ($ip_count <= $vpn_sessions) |
346 |
{ |
347 |
- $errmsg = gettext("There is not enough IP in the range to include all your pptp sessions"); |
348 |
- $choice = $pptp_sessions . ' allowed pptp clients'; |
349 |
+ $errmsg = gettext("There is not enough IP in the range to include all your vpn sessions"); |
350 |
+ $choice = $vpn_sessions . ' allowed vpn clients'; |
351 |
} |
352 |
else |
353 |
{ |
354 |
diff -Nur e-smith-base-5.8.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/remoteaccess.pm e-smith-base-5.8.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/remoteaccess.pm |
355 |
--- e-smith-base-5.8.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/remoteaccess.pm 2021-03-03 13:00:51.243000000 -0500 |
356 |
+++ e-smith-base-5.8.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/remoteaccess.pm 2021-03-03 15:11:40.938000000 -0500 |
357 |
@@ -43,6 +43,7 @@ |
358 |
validate_network_and_mask ip_number_or_blank subnet_mask_or_blank |
359 |
show_telnet_section get_serial_console show_ftp_section |
360 |
get_ipsecrw_sessions show_ipsecrw_section |
361 |
+ get_vpn_sessions |
362 |
); |
363 |
|
364 |
|
365 |
@@ -143,6 +144,23 @@ |
366 |
return ($access eq 'public') ? 'normal' : 'private'; |
367 |
} |
368 |
|
369 |
+=head2 get_vpn_sessions |
370 |
+ |
371 |
+Get the # of vpn sessions defined in the sessions property of the generik vpn config file variable |
372 |
+ |
373 |
+=cut |
374 |
+ |
375 |
+ sub get_vpn_sessions { |
376 |
+ my $status = get_prop('','vpn','status'); |
377 |
+ if (defined($status) && ($status eq 'enabled')) { |
378 |
+ |
379 |
+ return(get_prop('','vpn','sessions') || '0'); |
380 |
+ } |
381 |
+ else { |
382 |
+ return('0'); |
383 |
+ } |
384 |
+} |
385 |
+ |
386 |
=head2 get_ssh_permit_root_login |
387 |
|
388 |
returns 'yes' or 'no' depending on whether ssh permit root login is enabled |
389 |
@@ -355,13 +373,13 @@ |
390 |
|
391 |
=pod |
392 |
|
393 |
-=head2 pptp_and_dhcp_range |
394 |
+=head2 vpn_and_dhcp_range |
395 |
|
396 |
-Validate the input of pptp session if it is not superior than the maximum number of ip between dhcpd_start and dhcpd_end |
397 |
+Validate the input of vpn session if it is not superior than the maximum number of ip between dhcpd_start and dhcpd_end |
398 |
|
399 |
=cut |
400 |
|
401 |
-sub pptp_and_dhcp_range |
402 |
+sub vpn_and_dhcp_range |
403 |
{ |
404 |
my $self = shift; |
405 |
my $val = shift || 0; |
406 |
@@ -375,7 +393,7 @@ |
407 |
my $ip_end = unpack 'N', inet_aton($dhcp_end); |
408 |
my $ip_count = $ip_end - $ip_start; |
409 |
return 'OK' if( $val < $ip_count ); |
410 |
- return $self->localise('NUMBER_OF_PPTP_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE'); |
411 |
+ return $self->localise('NUMBER_OF_VPN_CLIENTS_MUST_BE_LESSER_THAN_NUMBER_OF_IP_IN_DHCP_RANGE'); |
412 |
} |
413 |
else |
414 |
{ |
415 |
@@ -646,6 +664,7 @@ |
416 |
my $sshTCPPort = ($q->param ('sshTCPPort') || '22'); |
417 |
my $ftplogin = ($q->param ('FTPPasswordLogin') || 'private'); |
418 |
my $ftpaccess = ($q->param ('FTPAccess') || 'off'); |
419 |
+ my $vpnSessions = ($q->param ('vpnSessions') || '0'); |
420 |
# my $serialConsole = ($q->param ('serialConsole') || 'disabled'); |
421 |
|
422 |
#------------------------------------------------------------ |
423 |
@@ -697,6 +716,17 @@ |
424 |
} |
425 |
} |
426 |
|
427 |
+ if ($vpnSessions == 0) |
428 |
+ { |
429 |
+ $db->get('vpn')->set_prop('sessions', $vpnSessions); |
430 |
+ $db->get('vpn')->set_prop('status', 'disabled'); |
431 |
+ } |
432 |
+ else |
433 |
+ { |
434 |
+ $db->get('vpn')->set_prop('status', 'enabled'); |
435 |
+ $db->get('vpn')->set_prop('sessions', $vpnSessions); |
436 |
+ } |
437 |
+ |
438 |
|
439 |
# REMOVED by markk, May 16 2005 - see DPAR MN00084537 |
440 |
# $rec = $db->get('serial-console'); |
441 |
@@ -761,7 +791,7 @@ |
442 |
my $q = $self->cgi; |
443 |
|
444 |
# Don't show ipsecrw setting unless the status property exists |
445 |
- return '' unless ($db->get('ipsec') |
446 |
+ return $self->localise('DESC_IPSEC_VPN_UNAVAILABLE') unless ($db->get('ipsec') |
447 |
&& $db->get('ipsec')->prop('RoadWarriorStatus')); |
448 |
|
449 |
print $q->Tr( |
450 |
diff -Nur e-smith-base-5.8.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/useraccounts.pm e-smith-base-5.8.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/useraccounts.pm |
451 |
--- e-smith-base-5.8.0.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/useraccounts.pm 2021-03-03 13:00:51.244000000 -0500 |
452 |
+++ e-smith-base-5.8.0/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/useraccounts.pm 2021-03-03 15:10:48.081000000 -0500 |
453 |
@@ -51,6 +51,7 @@ |
454 |
reset_password |
455 |
check_password |
456 |
print_save_or_add_button |
457 |
+ get_vpn_value |
458 |
print_ipsec_client_section |
459 |
get_prop |
460 |
|
461 |
@@ -285,7 +286,10 @@ |
462 |
($rec ? ($rec->prop('EmailForward')) : 'local'); |
463 |
my $fwd = $cgi->param('ForwardAddress') ? |
464 |
$cgi->param('ForwardAddress') : |
465 |
- ($rec ? ($rec->prop('ForwardAddress')) : ''); |
466 |
+ ($rec ? ($rec->prop('ForwardAddress')) : ''); |
467 |
+ my $vpn = $cgi->param('VPNClientAccess') ? |
468 |
+ $cgi->param('VPNClientAccess') : |
469 |
+ ($rec ? ($rec->prop('VPNClientAccess')) : get_vpn_value() ); |
470 |
# now that we're down with the 411, let's set the values |
471 |
$cgi->param(-name=>'FirstName', -value=>$fn); |
472 |
$cgi->param(-name=>'LastName', -value=>$ln); |
473 |
@@ -296,6 +300,7 @@ |
474 |
$cgi->param(-name=>'Phone', -value=>$phone); |
475 |
$cgi->param(-name=>'EmailForward', -value=>$emf); |
476 |
$cgi->param(-name=>'ForwardAddress', -value=>$fwd); |
477 |
+ $cgi->param(-name=>'VPNClientAccess', -value=>$vpn); |
478 |
} else { |
479 |
print qq( |
480 |
<td><input type="text" name="acctName" value="$an"> |
481 |
@@ -461,6 +466,18 @@ |
482 |
return $configdb->get('ldap')->prop($CGIParam2DBfield{$field}); |
483 |
} |
484 |
|
485 |
+=head2 get_vpn_value() |
486 |
+ |
487 |
+Routine to display default value for VPN |
488 |
+ |
489 |
+=cut |
490 |
+ |
491 |
+sub get_vpn_value |
492 |
+{ |
493 |
+ my $vpn = $configdb->get('vpn') || return 'no'; |
494 |
+ return $configdb->get('vpn')->prop('AccessDefault') || 'no'; |
495 |
+} |
496 |
+ |
497 |
=head1 VALIDATION ROUTINES |
498 |
|
499 |
=head2 pseudonym_clash |
500 |
@@ -718,8 +735,9 @@ |
501 |
'Street' => $self->{cgi}->param('Street'), |
502 |
'EmailForward' => $self->{cgi}->param('EmailForward'), |
503 |
'ForwardAddress' => $self->{cgi}->param('ForwardAddress'), |
504 |
- 'VPNClientAccess'=> $self->{cgi}->param('VPNClientAccess'), |
505 |
+ # 'VPNClientAccess'=> $self->{cgi}->param('VPNClientAccess'), |
506 |
); |
507 |
+ $newProperties{'VPNClientAccess'} = $self->{cgi}->param('VPNClientAccess') if defined $self->{cgi}->param('VPNClientAccess'); |
508 |
|
509 |
$acct->merge_props(%newProperties); |
510 |
|