Server Sandbox

Install the script

For each machine yo need to install the script. The steps to install the scripts are very easy.

1) Open a terminal and go to a PATH for store the script. cd $HOME path is a good place.

2) Clone the repository from Github

git clone https://github.com/Kikobeats/server-sandbox.git server-sandbox

Now is the moment to clone one virtual machine in two more :-)

2) Join in the folder with cd server-sandbox and edit settings.sh with your favorite editor. (If you haven't idea, you can use gedit settings.sh)

This are the following options:

## DNS Settings
DNS_NAME="st.um"
PRIMARY_DNS="172.16.22.135"
SECONDARY_DNS="172.16.22.137"
FORWARDERS=""

## SMTP Settings
LOCAL_NETWORK="172.16.22.0/24"
RELAY_DOMAINS="$DNS_NAME; um.es"

## OPENSSL Settings
USERNAME="josefranciscoverdugambin"

Set the values:

  • DNS_NAME: Name that you can use for you DNS. We are use st.um but you can use others like server.dummie, server.dev or whatever.
  • PRIMARY_DNS: IP of your primary server. You know it using ifconfig command in terminal (In my case eth0 correspond to private network adapter).

  • SECONDARY_DNS: Like PRIMARY_DNS but of your secondary server.
  • FORWARDERS: IP of the DNS used to resend the DNS query if we can't resolve it. You can use Google open DNS for this (8.8.8.8 and 8.8.4.4).
  • LOCAL_NETWORK: IP of the network used by VMWare/VirtualBox in the private network. You know this, see the IP's of the primary and secondary and the netmask. If your netmask is 255.55.555.0 you have a Class C Network and the network IP is xxx.xxx.xxx.0/24.
  • RELAY_DOMAINS: Valid names for custom mails names.
  • USERNAME: The username of your virtual machine account used to check the validity of the certificate.

3) Run the script with administrator privileges sudo sh init.sh

Extra installation

In the Mail service, the mail account is associate with mail user account in the machine. For testing the mail, we recommended you create two accounts in the primary server. You can run:

sh ./Services/Mail/account

to create user1 and user2 accounts.