forked from Uninett/probe-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_instructions.txt
36 lines (28 loc) · 1.28 KB
/
setup_instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(NB: The setup_server.sh script does some of these steps, but not all of them (not 4, 6, 7))
The following needs to be done before starting the web server (this should be automated with a script):
0. The following programs need to be installed:
- python3
- python3-pip
- nc (netcat)
- sqlite3
1. Make an unpriviliged dummy user, which will be used to initiate reverse SSH connections to the probes.
- adduser dummy
2. Generate an SSH key pair for the user
- login dummy
- ssh-keygen -t rsa -b 4096
(no key password)
3. Make sure root owns 'get_probe_keys.sh' & the script is executable
- chown root get_probe_keys.sh
- chmod +x get_probe_keys.sh
4. Move get_probe_keys.sh to /usr/bin
5. Add the following line to the end of /etc/ssh/sshd_config:
Match User dummy
ForceCommand /bin/false
AuthorizedKeysCommand /usr/bin/get_probe_keys.sh
AuthorizedKeysCommandUser nobody
6. Make a file with the path to the sqlite database (the get_probe_keys script will need to access this file)
(will need to be root)
- mkdir /etc/wifi_probing
- add '/abs/path/to/database.db' to the file /etc/wifi_probing/db_path.txt
7. Push template to elasticsearch
- curl -XPUT localhost:9200/_template/wifi_probe_template -d "$(<wifi_probe_template.json)"