· 9 years ago · Aug 08, 2017, 11:42 AM
1#/etc/ipsec.conf file
2config setup
3 charondebug="ike 1, knl 1, cfg 0"
4 uniqueids=no
5
6conn ikev2-vpn
7 auto=add
8 compress=yes
9 type=tunnel
10 keyexchange=ikev2
11 fragmentation=yes
12 forceencaps=yes
13 ike=aes256-sha1-modp1024,3des-sha1-modp1024!
14 esp=aes256-sha1,3des-sha1!
15 dpdaction=clear
16 dpddelay=3600s
17 rekey=no
18 left=%any
19 leftid=13.59.23.146
20 leftcert=vpn-server-cert.pem
21 leftsendcert=always
22 leftsubnet=0.0.0.0/0
23 right=%any
24 rightid=%any
25 rightauth=eap-mschapv2
26 rightdns=8.8.8.8,8.8.4.4
27 rightsourceip=10.10.10.0/24
28 rightsendcert=never
29 eap_identity=%identity
30
31
32#/etc/ipsec.secrets file
33# ipsec.secrets - strongSwan IPsec secrets file
34: RSA vpn-server-key.pem
35#arav %any : EAP "sunshine3003"
36# when i uncomment the above line,
37#it works. but i need to make it work with MySQL
38
39
40
41#/etc/strongswan.d/charon/sql.conf file
42sql {
43 load = yes
44 database = mysql://root:MajekO12#@localhost/ipsec
45}
46
47
48
49
50
51MySQL entries:
52INSERT INTO identities (type, data) VALUES (2, X'61726176');
53INSERT INTO shared_secrets (type, data) VALUES (2, X'73756e7368696e6533303033');
54INSERT INTO shared_secret_identity (shared_secret, identity) VALUES (1, 1);
55
56EAP username: arav
57Password: sunshine3003
58
59
60
61
62
63
64
65
66
67MySQL dump:
68-- MySQL dump 10.13 Distrib 5.7.19, for Linux (x86_64)
69--
70-- Host: localhost Database: ipsec
71-- ------------------------------------------------------
72-- Server version 5.7.19
73
74/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
75/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
76/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
77/*!40101 SET NAMES utf8 */;
78/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
79/*!40103 SET TIME_ZONE='+00:00' */;
80/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
81/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
82/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
83/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
84
85--
86-- Table structure for table `addresses`
87--
88
89DROP TABLE IF EXISTS `addresses`;
90/*!40101 SET @saved_cs_client = @@character_set_client */;
91/*!40101 SET character_set_client = utf8 */;
92CREATE TABLE `addresses` (
93 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
94 `pool` int(10) unsigned NOT NULL,
95 `address` varbinary(16) NOT NULL,
96 `identity` int(10) unsigned NOT NULL DEFAULT '0',
97 `acquired` int(10) unsigned NOT NULL DEFAULT '0',
98 `released` int(10) unsigned NOT NULL DEFAULT '1',
99 PRIMARY KEY (`id`),
100 KEY `pool` (`pool`),
101 KEY `identity` (`identity`),
102 KEY `address` (`address`)
103) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
104/*!40101 SET character_set_client = @saved_cs_client */;
105
106--
107-- Dumping data for table `addresses`
108--
109
110LOCK TABLES `addresses` WRITE;
111/*!40000 ALTER TABLE `addresses` DISABLE KEYS */;
112/*!40000 ALTER TABLE `addresses` ENABLE KEYS */;
113UNLOCK TABLES;
114
115--
116-- Table structure for table `attribute_pools`
117--
118
119DROP TABLE IF EXISTS `attribute_pools`;
120/*!40101 SET @saved_cs_client = @@character_set_client */;
121/*!40101 SET character_set_client = utf8 */;
122CREATE TABLE `attribute_pools` (
123 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
124 `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
125 PRIMARY KEY (`id`)
126) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
127/*!40101 SET character_set_client = @saved_cs_client */;
128
129--
130-- Dumping data for table `attribute_pools`
131--
132
133LOCK TABLES `attribute_pools` WRITE;
134/*!40000 ALTER TABLE `attribute_pools` DISABLE KEYS */;
135/*!40000 ALTER TABLE `attribute_pools` ENABLE KEYS */;
136UNLOCK TABLES;
137
138--
139-- Table structure for table `attributes`
140--
141
142DROP TABLE IF EXISTS `attributes`;
143/*!40101 SET @saved_cs_client = @@character_set_client */;
144/*!40101 SET character_set_client = utf8 */;
145CREATE TABLE `attributes` (
146 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
147 `identity` int(10) unsigned NOT NULL DEFAULT '0',
148 `pool` int(10) unsigned NOT NULL DEFAULT '0',
149 `type` int(10) unsigned NOT NULL,
150 `value` varbinary(16) NOT NULL,
151 PRIMARY KEY (`id`),
152 KEY `identity` (`identity`),
153 KEY `pool` (`pool`)
154) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
155/*!40101 SET character_set_client = @saved_cs_client */;
156
157--
158-- Dumping data for table `attributes`
159--
160
161LOCK TABLES `attributes` WRITE;
162/*!40000 ALTER TABLE `attributes` DISABLE KEYS */;
163/*!40000 ALTER TABLE `attributes` ENABLE KEYS */;
164UNLOCK TABLES;
165
166--
167-- Table structure for table `certificate_authorities`
168--
169
170DROP TABLE IF EXISTS `certificate_authorities`;
171/*!40101 SET @saved_cs_client = @@character_set_client */;
172/*!40101 SET character_set_client = utf8 */;
173CREATE TABLE `certificate_authorities` (
174 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
175 `certificate` int(10) unsigned NOT NULL,
176 PRIMARY KEY (`id`)
177) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
178/*!40101 SET character_set_client = @saved_cs_client */;
179
180--
181-- Dumping data for table `certificate_authorities`
182--
183
184LOCK TABLES `certificate_authorities` WRITE;
185/*!40000 ALTER TABLE `certificate_authorities` DISABLE KEYS */;
186/*!40000 ALTER TABLE `certificate_authorities` ENABLE KEYS */;
187UNLOCK TABLES;
188
189--
190-- Table structure for table `certificate_distribution_points`
191--
192
193DROP TABLE IF EXISTS `certificate_distribution_points`;
194/*!40101 SET @saved_cs_client = @@character_set_client */;
195/*!40101 SET character_set_client = utf8 */;
196CREATE TABLE `certificate_distribution_points` (
197 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
198 `ca` int(10) unsigned NOT NULL,
199 `type` tinyint(3) unsigned NOT NULL,
200 `uri` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
201 PRIMARY KEY (`id`)
202) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
203/*!40101 SET character_set_client = @saved_cs_client */;
204
205--
206-- Dumping data for table `certificate_distribution_points`
207--
208
209LOCK TABLES `certificate_distribution_points` WRITE;
210/*!40000 ALTER TABLE `certificate_distribution_points` DISABLE KEYS */;
211/*!40000 ALTER TABLE `certificate_distribution_points` ENABLE KEYS */;
212UNLOCK TABLES;
213
214--
215-- Table structure for table `certificate_identity`
216--
217
218DROP TABLE IF EXISTS `certificate_identity`;
219/*!40101 SET @saved_cs_client = @@character_set_client */;
220/*!40101 SET character_set_client = utf8 */;
221CREATE TABLE `certificate_identity` (
222 `certificate` int(10) unsigned NOT NULL,
223 `identity` int(10) unsigned NOT NULL,
224 PRIMARY KEY (`certificate`,`identity`)
225) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
226/*!40101 SET character_set_client = @saved_cs_client */;
227
228--
229-- Dumping data for table `certificate_identity`
230--
231
232LOCK TABLES `certificate_identity` WRITE;
233/*!40000 ALTER TABLE `certificate_identity` DISABLE KEYS */;
234/*!40000 ALTER TABLE `certificate_identity` ENABLE KEYS */;
235UNLOCK TABLES;
236
237--
238-- Table structure for table `certificates`
239--
240
241DROP TABLE IF EXISTS `certificates`;
242/*!40101 SET @saved_cs_client = @@character_set_client */;
243/*!40101 SET character_set_client = utf8 */;
244CREATE TABLE `certificates` (
245 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
246 `type` tinyint(3) unsigned NOT NULL,
247 `keytype` tinyint(3) unsigned NOT NULL,
248 `data` blob NOT NULL,
249 PRIMARY KEY (`id`)
250) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
251/*!40101 SET character_set_client = @saved_cs_client */;
252
253--
254-- Dumping data for table `certificates`
255--
256
257LOCK TABLES `certificates` WRITE;
258/*!40000 ALTER TABLE `certificates` DISABLE KEYS */;
259/*!40000 ALTER TABLE `certificates` ENABLE KEYS */;
260UNLOCK TABLES;
261
262--
263-- Table structure for table `child_config_proposal`
264--
265
266DROP TABLE IF EXISTS `child_config_proposal`;
267/*!40101 SET @saved_cs_client = @@character_set_client */;
268/*!40101 SET character_set_client = utf8 */;
269CREATE TABLE `child_config_proposal` (
270 `child_cfg` int(10) unsigned NOT NULL,
271 `prio` smallint(5) unsigned NOT NULL,
272 `prop` int(10) unsigned NOT NULL
273) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
274/*!40101 SET character_set_client = @saved_cs_client */;
275
276--
277-- Dumping data for table `child_config_proposal`
278--
279
280LOCK TABLES `child_config_proposal` WRITE;
281/*!40000 ALTER TABLE `child_config_proposal` DISABLE KEYS */;
282/*!40000 ALTER TABLE `child_config_proposal` ENABLE KEYS */;
283UNLOCK TABLES;
284
285--
286-- Table structure for table `child_config_traffic_selector`
287--
288
289DROP TABLE IF EXISTS `child_config_traffic_selector`;
290/*!40101 SET @saved_cs_client = @@character_set_client */;
291/*!40101 SET character_set_client = utf8 */;
292CREATE TABLE `child_config_traffic_selector` (
293 `child_cfg` int(10) unsigned NOT NULL,
294 `traffic_selector` int(10) unsigned NOT NULL,
295 `kind` tinyint(3) unsigned NOT NULL,
296 KEY `child_cfg` (`child_cfg`,`traffic_selector`)
297) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
298/*!40101 SET character_set_client = @saved_cs_client */;
299
300--
301-- Dumping data for table `child_config_traffic_selector`
302--
303
304LOCK TABLES `child_config_traffic_selector` WRITE;
305/*!40000 ALTER TABLE `child_config_traffic_selector` DISABLE KEYS */;
306/*!40000 ALTER TABLE `child_config_traffic_selector` ENABLE KEYS */;
307UNLOCK TABLES;
308
309--
310-- Table structure for table `child_configs`
311--
312
313DROP TABLE IF EXISTS `child_configs`;
314/*!40101 SET @saved_cs_client = @@character_set_client */;
315/*!40101 SET character_set_client = utf8 */;
316CREATE TABLE `child_configs` (
317 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
318 `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
319 `lifetime` mediumint(8) unsigned NOT NULL DEFAULT '1500',
320 `rekeytime` mediumint(8) unsigned NOT NULL DEFAULT '1200',
321 `jitter` mediumint(8) unsigned NOT NULL DEFAULT '60',
322 `updown` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
323 `hostaccess` tinyint(1) unsigned NOT NULL DEFAULT '0',
324 `mode` tinyint(4) unsigned NOT NULL DEFAULT '2',
325 `start_action` tinyint(4) unsigned NOT NULL DEFAULT '0',
326 `dpd_action` tinyint(4) unsigned NOT NULL DEFAULT '0',
327 `close_action` tinyint(4) unsigned NOT NULL DEFAULT '0',
328 `ipcomp` tinyint(4) unsigned NOT NULL DEFAULT '0',
329 `reqid` mediumint(8) unsigned NOT NULL DEFAULT '0',
330 PRIMARY KEY (`id`),
331 KEY `name` (`name`)
332) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
333/*!40101 SET character_set_client = @saved_cs_client */;
334
335--
336-- Dumping data for table `child_configs`
337--
338
339LOCK TABLES `child_configs` WRITE;
340/*!40000 ALTER TABLE `child_configs` DISABLE KEYS */;
341/*!40000 ALTER TABLE `child_configs` ENABLE KEYS */;
342UNLOCK TABLES;
343
344--
345-- Table structure for table `identities`
346--
347
348DROP TABLE IF EXISTS `identities`;
349/*!40101 SET @saved_cs_client = @@character_set_client */;
350/*!40101 SET character_set_client = utf8 */;
351CREATE TABLE `identities` (
352 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
353 `type` tinyint(4) unsigned NOT NULL,
354 `data` varbinary(64) NOT NULL,
355 PRIMARY KEY (`id`),
356 UNIQUE KEY `type` (`type`,`data`)
357) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
358/*!40101 SET character_set_client = @saved_cs_client */;
359
360--
361-- Dumping data for table `identities`
362--
363
364LOCK TABLES `identities` WRITE;
365/*!40000 ALTER TABLE `identities` DISABLE KEYS */;
366INSERT INTO `identities` VALUES (1,2,'arav');
367/*!40000 ALTER TABLE `identities` ENABLE KEYS */;
368UNLOCK TABLES;
369
370--
371-- Table structure for table `ike_config_proposal`
372--
373
374DROP TABLE IF EXISTS `ike_config_proposal`;
375/*!40101 SET @saved_cs_client = @@character_set_client */;
376/*!40101 SET character_set_client = utf8 */;
377CREATE TABLE `ike_config_proposal` (
378 `ike_cfg` int(10) unsigned NOT NULL,
379 `prio` smallint(5) unsigned NOT NULL,
380 `prop` int(10) unsigned NOT NULL
381) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
382/*!40101 SET character_set_client = @saved_cs_client */;
383
384--
385-- Dumping data for table `ike_config_proposal`
386--
387
388LOCK TABLES `ike_config_proposal` WRITE;
389/*!40000 ALTER TABLE `ike_config_proposal` DISABLE KEYS */;
390/*!40000 ALTER TABLE `ike_config_proposal` ENABLE KEYS */;
391UNLOCK TABLES;
392
393--
394-- Table structure for table `ike_configs`
395--
396
397DROP TABLE IF EXISTS `ike_configs`;
398/*!40101 SET @saved_cs_client = @@character_set_client */;
399/*!40101 SET character_set_client = utf8 */;
400CREATE TABLE `ike_configs` (
401 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
402 `certreq` tinyint(3) unsigned NOT NULL DEFAULT '1',
403 `force_encap` tinyint(1) NOT NULL DEFAULT '0',
404 `local` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
405 `remote` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
406 PRIMARY KEY (`id`)
407) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
408/*!40101 SET character_set_client = @saved_cs_client */;
409
410--
411-- Dumping data for table `ike_configs`
412--
413
414LOCK TABLES `ike_configs` WRITE;
415/*!40000 ALTER TABLE `ike_configs` DISABLE KEYS */;
416/*!40000 ALTER TABLE `ike_configs` ENABLE KEYS */;
417UNLOCK TABLES;
418
419--
420-- Table structure for table `ike_sas`
421--
422
423DROP TABLE IF EXISTS `ike_sas`;
424/*!40101 SET @saved_cs_client = @@character_set_client */;
425/*!40101 SET character_set_client = utf8 */;
426CREATE TABLE `ike_sas` (
427 `local_spi` varbinary(8) NOT NULL,
428 `remote_spi` varbinary(8) NOT NULL,
429 `id` int(10) unsigned NOT NULL,
430 `initiator` tinyint(1) NOT NULL,
431 `local_id_type` tinyint(3) NOT NULL,
432 `local_id_data` varbinary(64) DEFAULT NULL,
433 `remote_id_type` tinyint(3) NOT NULL,
434 `remote_id_data` varbinary(64) DEFAULT NULL,
435 `host_family` tinyint(3) NOT NULL,
436 `local_host_data` varbinary(16) NOT NULL,
437 `remote_host_data` varbinary(16) NOT NULL,
438 `lastuse` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
439 PRIMARY KEY (`local_spi`)
440) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
441/*!40101 SET character_set_client = @saved_cs_client */;
442
443--
444-- Dumping data for table `ike_sas`
445--
446
447LOCK TABLES `ike_sas` WRITE;
448/*!40000 ALTER TABLE `ike_sas` DISABLE KEYS */;
449/*!40000 ALTER TABLE `ike_sas` ENABLE KEYS */;
450UNLOCK TABLES;
451
452--
453-- Table structure for table `leases`
454--
455
456DROP TABLE IF EXISTS `leases`;
457/*!40101 SET @saved_cs_client = @@character_set_client */;
458/*!40101 SET character_set_client = utf8 */;
459CREATE TABLE `leases` (
460 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
461 `address` int(10) unsigned NOT NULL,
462 `identity` int(10) unsigned NOT NULL,
463 `acquired` int(10) unsigned NOT NULL,
464 `released` int(10) unsigned DEFAULT NULL,
465 PRIMARY KEY (`id`)
466) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
467/*!40101 SET character_set_client = @saved_cs_client */;
468
469--
470-- Dumping data for table `leases`
471--
472
473LOCK TABLES `leases` WRITE;
474/*!40000 ALTER TABLE `leases` DISABLE KEYS */;
475/*!40000 ALTER TABLE `leases` ENABLE KEYS */;
476UNLOCK TABLES;
477
478--
479-- Table structure for table `logs`
480--
481
482DROP TABLE IF EXISTS `logs`;
483/*!40101 SET @saved_cs_client = @@character_set_client */;
484/*!40101 SET character_set_client = utf8 */;
485CREATE TABLE `logs` (
486 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
487 `local_spi` varbinary(8) NOT NULL,
488 `signal` tinyint(3) NOT NULL,
489 `level` tinyint(3) NOT NULL,
490 `msg` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
491 `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
492 PRIMARY KEY (`id`)
493) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
494/*!40101 SET character_set_client = @saved_cs_client */;
495
496--
497-- Dumping data for table `logs`
498--
499
500LOCK TABLES `logs` WRITE;
501/*!40000 ALTER TABLE `logs` DISABLE KEYS */;
502/*!40000 ALTER TABLE `logs` ENABLE KEYS */;
503UNLOCK TABLES;
504
505--
506-- Table structure for table `peer_config_child_config`
507--
508
509DROP TABLE IF EXISTS `peer_config_child_config`;
510/*!40101 SET @saved_cs_client = @@character_set_client */;
511/*!40101 SET character_set_client = utf8 */;
512CREATE TABLE `peer_config_child_config` (
513 `peer_cfg` int(10) unsigned NOT NULL,
514 `child_cfg` int(10) unsigned NOT NULL,
515 PRIMARY KEY (`peer_cfg`,`child_cfg`)
516) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
517/*!40101 SET character_set_client = @saved_cs_client */;
518
519--
520-- Dumping data for table `peer_config_child_config`
521--
522
523LOCK TABLES `peer_config_child_config` WRITE;
524/*!40000 ALTER TABLE `peer_config_child_config` DISABLE KEYS */;
525/*!40000 ALTER TABLE `peer_config_child_config` ENABLE KEYS */;
526UNLOCK TABLES;
527
528--
529-- Table structure for table `peer_configs`
530--
531
532DROP TABLE IF EXISTS `peer_configs`;
533/*!40101 SET @saved_cs_client = @@character_set_client */;
534/*!40101 SET character_set_client = utf8 */;
535CREATE TABLE `peer_configs` (
536 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
537 `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
538 `ike_version` tinyint(3) unsigned NOT NULL DEFAULT '2',
539 `ike_cfg` int(10) unsigned NOT NULL,
540 `local_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
541 `remote_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
542 `cert_policy` tinyint(3) unsigned NOT NULL DEFAULT '1',
543 `uniqueid` tinyint(3) unsigned NOT NULL DEFAULT '0',
544 `auth_method` tinyint(3) unsigned NOT NULL DEFAULT '1',
545 `eap_type` tinyint(3) unsigned NOT NULL DEFAULT '0',
546 `eap_vendor` smallint(5) unsigned NOT NULL DEFAULT '0',
547 `keyingtries` tinyint(3) unsigned NOT NULL DEFAULT '3',
548 `rekeytime` mediumint(8) unsigned NOT NULL DEFAULT '7200',
549 `reauthtime` mediumint(8) unsigned NOT NULL DEFAULT '0',
550 `jitter` mediumint(8) unsigned NOT NULL DEFAULT '180',
551 `overtime` mediumint(8) unsigned NOT NULL DEFAULT '300',
552 `mobike` tinyint(1) NOT NULL DEFAULT '1',
553 `dpd_delay` mediumint(8) unsigned NOT NULL DEFAULT '120',
554 `virtual` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
555 `pool` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
556 `mediation` tinyint(1) NOT NULL DEFAULT '0',
557 `mediated_by` int(10) unsigned NOT NULL DEFAULT '0',
558 `peer_id` int(10) unsigned NOT NULL DEFAULT '0',
559 PRIMARY KEY (`id`),
560 KEY `name` (`name`)
561) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
562/*!40101 SET character_set_client = @saved_cs_client */;
563
564--
565-- Dumping data for table `peer_configs`
566--
567
568LOCK TABLES `peer_configs` WRITE;
569/*!40000 ALTER TABLE `peer_configs` DISABLE KEYS */;
570/*!40000 ALTER TABLE `peer_configs` ENABLE KEYS */;
571UNLOCK TABLES;
572
573--
574-- Table structure for table `pools`
575--
576
577DROP TABLE IF EXISTS `pools`;
578/*!40101 SET @saved_cs_client = @@character_set_client */;
579/*!40101 SET character_set_client = utf8 */;
580CREATE TABLE `pools` (
581 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
582 `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
583 `start` varbinary(16) NOT NULL,
584 `end` varbinary(16) NOT NULL,
585 `timeout` int(10) unsigned NOT NULL,
586 PRIMARY KEY (`id`),
587 UNIQUE KEY `name` (`name`)
588) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
589/*!40101 SET character_set_client = @saved_cs_client */;
590
591--
592-- Dumping data for table `pools`
593--
594
595LOCK TABLES `pools` WRITE;
596/*!40000 ALTER TABLE `pools` DISABLE KEYS */;
597/*!40000 ALTER TABLE `pools` ENABLE KEYS */;
598UNLOCK TABLES;
599
600--
601-- Table structure for table `private_key_identity`
602--
603
604DROP TABLE IF EXISTS `private_key_identity`;
605/*!40101 SET @saved_cs_client = @@character_set_client */;
606/*!40101 SET character_set_client = utf8 */;
607CREATE TABLE `private_key_identity` (
608 `private_key` int(10) unsigned NOT NULL,
609 `identity` int(10) unsigned NOT NULL,
610 PRIMARY KEY (`private_key`,`identity`)
611) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
612/*!40101 SET character_set_client = @saved_cs_client */;
613
614--
615-- Dumping data for table `private_key_identity`
616--
617
618LOCK TABLES `private_key_identity` WRITE;
619/*!40000 ALTER TABLE `private_key_identity` DISABLE KEYS */;
620/*!40000 ALTER TABLE `private_key_identity` ENABLE KEYS */;
621UNLOCK TABLES;
622
623--
624-- Table structure for table `private_keys`
625--
626
627DROP TABLE IF EXISTS `private_keys`;
628/*!40101 SET @saved_cs_client = @@character_set_client */;
629/*!40101 SET character_set_client = utf8 */;
630CREATE TABLE `private_keys` (
631 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
632 `type` tinyint(3) unsigned NOT NULL,
633 `data` blob NOT NULL,
634 PRIMARY KEY (`id`)
635) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
636/*!40101 SET character_set_client = @saved_cs_client */;
637
638--
639-- Dumping data for table `private_keys`
640--
641
642LOCK TABLES `private_keys` WRITE;
643/*!40000 ALTER TABLE `private_keys` DISABLE KEYS */;
644/*!40000 ALTER TABLE `private_keys` ENABLE KEYS */;
645UNLOCK TABLES;
646
647--
648-- Table structure for table `proposals`
649--
650
651DROP TABLE IF EXISTS `proposals`;
652/*!40101 SET @saved_cs_client = @@character_set_client */;
653/*!40101 SET character_set_client = utf8 */;
654CREATE TABLE `proposals` (
655 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
656 `proposal` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
657 PRIMARY KEY (`id`)
658) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
659/*!40101 SET character_set_client = @saved_cs_client */;
660
661--
662-- Dumping data for table `proposals`
663--
664
665LOCK TABLES `proposals` WRITE;
666/*!40000 ALTER TABLE `proposals` DISABLE KEYS */;
667/*!40000 ALTER TABLE `proposals` ENABLE KEYS */;
668UNLOCK TABLES;
669
670--
671-- Table structure for table `shared_secret_identity`
672--
673
674DROP TABLE IF EXISTS `shared_secret_identity`;
675/*!40101 SET @saved_cs_client = @@character_set_client */;
676/*!40101 SET character_set_client = utf8 */;
677CREATE TABLE `shared_secret_identity` (
678 `shared_secret` int(10) unsigned NOT NULL,
679 `identity` int(10) unsigned NOT NULL,
680 PRIMARY KEY (`shared_secret`,`identity`)
681) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
682/*!40101 SET character_set_client = @saved_cs_client */;
683
684--
685-- Dumping data for table `shared_secret_identity`
686--
687
688LOCK TABLES `shared_secret_identity` WRITE;
689/*!40000 ALTER TABLE `shared_secret_identity` DISABLE KEYS */;
690INSERT INTO `shared_secret_identity` VALUES (1,1);
691/*!40000 ALTER TABLE `shared_secret_identity` ENABLE KEYS */;
692UNLOCK TABLES;
693
694--
695-- Table structure for table `shared_secrets`
696--
697
698DROP TABLE IF EXISTS `shared_secrets`;
699/*!40101 SET @saved_cs_client = @@character_set_client */;
700/*!40101 SET character_set_client = utf8 */;
701CREATE TABLE `shared_secrets` (
702 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
703 `type` tinyint(3) unsigned NOT NULL,
704 `data` varbinary(256) NOT NULL,
705 PRIMARY KEY (`id`)
706) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
707/*!40101 SET character_set_client = @saved_cs_client */;
708
709--
710-- Dumping data for table `shared_secrets`
711--
712
713LOCK TABLES `shared_secrets` WRITE;
714/*!40000 ALTER TABLE `shared_secrets` DISABLE KEYS */;
715INSERT INTO `shared_secrets` VALUES (1,2,'sunshine3003');
716/*!40000 ALTER TABLE `shared_secrets` ENABLE KEYS */;
717UNLOCK TABLES;
718
719--
720-- Table structure for table `traffic_selectors`
721--
722
723DROP TABLE IF EXISTS `traffic_selectors`;
724/*!40101 SET @saved_cs_client = @@character_set_client */;
725/*!40101 SET character_set_client = utf8 */;
726CREATE TABLE `traffic_selectors` (
727 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
728 `type` tinyint(3) unsigned NOT NULL DEFAULT '7',
729 `protocol` smallint(5) unsigned NOT NULL DEFAULT '0',
730 `start_addr` varbinary(16) DEFAULT NULL,
731 `end_addr` varbinary(16) DEFAULT NULL,
732 `start_port` smallint(5) unsigned NOT NULL DEFAULT '0',
733 `end_port` smallint(5) unsigned NOT NULL DEFAULT '65535',
734 PRIMARY KEY (`id`)
735) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
736/*!40101 SET character_set_client = @saved_cs_client */;
737
738--
739-- Dumping data for table `traffic_selectors`
740--
741
742LOCK TABLES `traffic_selectors` WRITE;
743/*!40000 ALTER TABLE `traffic_selectors` DISABLE KEYS */;
744/*!40000 ALTER TABLE `traffic_selectors` ENABLE KEYS */;
745UNLOCK TABLES;
746/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
747
748/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
749/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
750/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
751/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
752/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
753/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
754/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
755
756-- Dump completed on 2017-08-08 11:40:26