SERVAL installation instructions
The installation instructions to have an initial SERVAL deployment scenario are included in this page. We have divided them in several sections:
Requirements
We have only tested SERVAL in GNU/Linux computers. However, it may run in other UNIX versions if requirements are satisfied. They are:
Configuration
The default configuration should work well when then the client connects to the server and both server and client are running in localhost.
- The configuration file of the server is: server/ebin/serval.app
- The configuration file of the client is: client/etc/serval_client.conf
Compilation
The steps needed for the compilation are:
- Compile the code.
- cd serval-dev/src
- autoconf
- ./configure
- make
Execution
The steps to run the server and connect a client to it are:
- Start the server: ./server/bin/serval-server.sh
- Bring up the network interface (
you MUST be root in order to manage the network interfaces): su -c "./client/bin/serval_client"
- Connect to the network interface administration shell: ./client-shell/bin/serval-client-shell.sh
- Find out what the administration shell can do: enter> help.
COMMAND REFERENCE
=============================================================================
(-) help -- Display the commands reference information.
(-) quit -- Disconnect shell from Serval cliente daemon.
(-) printstate -- Prints the information about the state of the connection.
(-) connect <server> <portnumber> <connectiontype> --
<server> -- DNS name of the machine the Serval is running
<portnumber> -- Port in which the Serval is listening
<connectiontype> -- ssl | tcp | udp
(-) disconnect -- Disconnect client from Serval server
(-) loginplain <user> <password> --
<user> -- The username to log in
<password> -- The password of the user
(-) createvlan <vlanid> <tag> [grouplist] --
<vlanid> -- The name of the VLAN
<tag> -- A description of the purpose of the VLAN
[grouplist] -- One or several group names whose users are allowed to join
(-) joinvlan <vlanid> --
<vlanid> -- The vlan name to join
(-) leavevlan <vlanid> --
<vlanid> -- The vlan is wanted to be left
(-) deletevlan <vlanid> --
<vlanid> -- The vlan is wanted to be deleted
(-) listvlansjoined -- It is listed the VLANs the user belongs to
(-) listclientsinvlan <vlanid> --
<vlanid> -- The vlan name whose clients are wanted to be listed
(-) setpromiscousmode on|off -- Set on or off the promiscous mode
============================================================================
Deployment environment tips
The standar configuration for server is specified in the server file: server/ebin/serval.app. The current test ports are:
{tcp,5690}
{udp,6690}
{ssl,5443}
The users and groups are specified in the server file:
server/etc/user.txt. The current test groups and users are:
{accounts,"user1","pass1"}.
{accounts,"user2","pass2"}.
{accounts,"user3","pass3"}.
{groups,"admin","Group of administrators"}.
{groups,"users","Group of users"}.
{groups,"advanced_users","Group of advanced users"}.
{user_belongs,1,"user1","admin"}.
{user_belongs,2,"user1","users"}.
{user_belongs,3,"user1","advanced_users"}.
{user_belongs,4,"user2","users"}.
{user_belongs,5,"user2","advanced_users"}.
{user_belongs,6,"user3","users"}.
Suppose a deployment environment with two clients, A and B, each one on a different computer, both connected to the SERVAL server and each one with its shell opened. In order to connect them we must authenticate, create a VLAN and ask the clients to join that VLAN. For example:
A client shell:
enter>loginplain user1 pass1.
enter>createvlan vlan1 des1 users.
enter>joinvlan vlan1.
B client shell:
enter>loginplain user2 pass2.
enter>joinvlan vlan1.
If both command sequences has gone well the clients should be connected and could use common programs to connect over TCP/IP through the SERVAL interface: ping, scp, etc.
Example, from B client:
$ ping <A client ip>
$ scp user@<A client ip SERVAL interface>:<path to the file> .
If everything goes well in the gnu_plot window will be drawn the switch sent/received SERVAL messages.
If you want to use another kind of connections, for example udp, you have to:
enter>disconnect.
enter>connect 'server.name.org' 6690 udp.
In order to connect to a server which is different from localhost you have to change the cvs configuration of the client settings in the next files:
- client/etc/serval_client.conf
# If IP_NETWORK LEVEL_CONFIGURATION is set to yes
# the ip configured in this option will be assined
# to the tuntap network interface
IP_ADDRESS=192.168.30.18
- /client/erlang_implementation/ebin/client_application.app
{server_address,'new.server.com'},
/bin/view/Serval/WebCVS
Directory tree
After downloading the Serval source code the
directory tree will look like this.
src
|-- asn
|-- client
| |-- bin
| |-- c_implementation
| | `-- certs
| |-- erlang_implementation
| | |-- ebin
| | |-- include
| | `-- src
| `-- etc
|-- client-shell
| |-- bin
| |-- ebin
| `-- src
|-- doc
|-- include
`-- server
|-- bin
|-- ebin
|-- etc
| `-- certs
`-- src
- /asn Asn directory contains data relationed with Erlang communication protocol. An important file in this directory is Serval.asn wich contains communication protocol messages definitions.
- /doc Contains documentation about the modules of the Serval project.
- /include Contains configuration files of the Serval project
- /server
- /server/bin Contains the executable of the server serval-server.sh.
- /server/ebin Contains Erlang binaries. serval.app is the configuration file of the server.
- /server/etc Contains users.txt file which especifies the users and groups that are allowed to connect to the server. Test users are included in the default configuration.
- /server/etc/certs Contains client's ssl certificates. Test certificates are included.
- /server/src Contains the source code of the server application.
- /client
- /client/bin Contains the executable of the client serval_client.
- /client/c_implementation Contains C source files.
- /client/c_implementation/certs Contains client's ssl certificates. Test certificates are included.
- /client/erlang_implementation Contains Erlang source files
- /client/erlang_implementation/ebin Contains Erlang binary files. client_application.app file contains configuration information for client's application.
- /client/erlang_implementation/include Contains header files.
- /client/erlang_implementation/src Contains Erlang sources.
- /client/etc Standar configuration for the client application is stored in serval_client.conf.
- /client-shell
- /client-shell/bin Contains the executable of the client-shell serval-client-shell.
- /client-shell/ebin Contains Erlang binary files. client_shell_application.app file especifies configuration information for client's shell application.
- /client-shell/src Contains client-shell's sources.
div class="twikiTopicInfo twikiRevInfo twikiGrayText twikiMoved"<&/div>-->