Template Directories
A large part of the SOHO VPN Router project is working with templates. Have you ever created templates for the running-config on Cisco routers? We will do the same thing here for Linux and Openswan. The only difference is that there are quite a few more files to keep track of.
The template files fall into two categories. Static template files are files that you can create once and use for every SOHO VPN Router you configure. Dynamic template files are template files that will be different for every SOHO VPN Router.
Static Template Files
If this is your first time through the documentation, you have to create the Static and Dynamic template files and place them in the appropriate directories.
(There are a few files in this table that will need editing. I plan to go back and clean up the documentation later.)
| Directory Name | File Name | Permissions |
| /etc/ | dnscheck.awk | |
| dnsmasq.conf | |
| dnspeers.conf | |
| dyninit.awk | |
| dynlookup | 755 |
| dynlookup2 | 755 |
| dyntunnels | 755 |
| qos.conf | |
| TZ | |
| updatecrls | 755 |
| /etc/crontabs/ | root | |
| /etc/hotplug.d/iface/ | 10-ez-ipupdate | 755 |
| 20-qos | 755 |
| /etc/init.d/ | S10boot | 755 |
| S51setdate | 755 |
| S52rdate | 755 |
| S55dnstable | 755 |
| S65qos-start | 755 |
| S99done | 755 |
| /etc/ipsec.d/scripts/ | newlease4ipsec.sh | 755 |
| ipsec-restart.sh | 755 |
Dynamic Template Files
If this is your first time through the documentation, you have to create the Static and Dynamic template files and place them in the appropriate directories.
| Directory Name | File Name | Permissions |
| /etc/ | ipsec.conf | |
| ipsec.secrets | |
| ez-ipupdate.conf | |
| firewall.user | |
| dyndns.info.peers.conf | |
Template Directory Structure
Copy template files from the template directory to a working directory for each new user (each new SOHO VPN Router). The template directory should be located on a server. (Care should be taken to maintain a central source library.) The working directory should be on a computer with access to the internal interface of the SOHO VPN Router.
TextPad is a good shareware program for editing the configuration files. Make sure you save the files in Unix format.
- Step 1
- Create template directories and subdirectories. In the examples below 1 in templates.dyndnsinfo1a indicate the configuration file version number. a and b in templates.dyndns.info1a and templates.dyndns.info1b indicate router A and router B. Router A is the VPN Router. Router B is the QoS router. Each router will have different static and dynamic template files.
| Source Directory: | |
| /SOHO VPN Router/templates.dyndns.info1a/etc |
| /SOHO VPN Router/templates.dyndns.info1b/etc |
| Destination Directory: | |
| /SOHO VPN Router/soho-user-a.dyndns.info1a/etc |
| /SOHO VPN Router/soho-user-a.dyndns.info1b/etc |
- Step 2
- Create subdirectories for the template directories and the working directory. The working directory is the Destination Directory described above for Router A and Router B. Each SOHO VPN Router has its own set of working directories.
| Description | Parent Directory | Sub Directory |
| VPN Router Template | /templates.dyndns.info1a/ | /etc/ |
| | | /etc/crontabs/ |
| | | /etc/hotplug.d/iface/ |
| | | /etc/init.d/ |
| | | /etc/ipsec.d/ |
| | | /etc/ipsec.d/cacerts/ |
| | | /etc/ipsec.d/certs/ |
| | | /etc/ipsec.d/certs/location-a |
| | | /etc/ipsec.d/certs/location-b |
| | | /etc/ipsec.d/crls/ |
| | | /etc/ipsec.d/private/ |
| | | /etc/ipsec.d/private/location-a |
| | | /etc/ipsec.d/private/location-b |
| | | /etc/ipsec.d/scripts/ |
| | /templates.dyndns.info1b/ | /etc/ |
| | | /etc/init.d/ |
| SOHO User A | /soho-user-a.dyndns.info1a/ | /etc/ |
| | | /etc/crontabs/ |
| | | /etc/hotplug.d/iface/ |
| | | /etc/init.d/ |
| | | /etc/ipsec.d/ |
| | | /etc/ipsec.d/cacerts/ |
| | | /etc/ipsec.d/certs/ |
| | | /etc/ipsec.d/certs/location-a |
| | | /etc/ipsec.d/certs/location-b |
| | | /etc/ipsec.d/crls/ |
| | | /etc/ipsec.d/private/ |
| | | /etc/ipsec.d/private/location-a |
| | | /etc/ipsec.d/private/location-b |
| | | /etc/ipsec.d/scripts/ |
| | /soho-user-a.dyndns.info1b/ | /etc/ |
| | | /etc/init.d/ |