- use SEED Ubuntu12.04 VM (32-bit) as your program's environment.
- successfully installed
OpenSSL
(in the VM above it should beOpenSSL 1.0.1
) in you VM's Linux system
- Compile: type
make
- Clean-up: type
make clean
- Confidential: OpenSSL AES-256 CBC Mode
- Integrity: OpenSSL HMAC-SHA256 Hashing Function
- Authenticity: Set-up a local CA (related files are kept locally and not uploaded onto GitHub)
Authenticated Encryption
: useEncrypt-then-MAC
method (as shown in slides)
- Suppose you have 4 VMs running under the same local network(
192.168.15.0/24
), they are:- "vm_0" (
192.168.15.4
) - "jin511_" (
192.168.15.5
) - "vm_3" (
192.168.15.7
) - "vm_4" (
192.168.15.8
)
- (Actually they are the real VMs which running on the Purdue Server
mc20
under my user's subnetjin511
)
- "vm_0" (
- In
192.168.15.4:/<path_2_working_dir>
:- Type
sudo su
- Type
sudo ./simpletun -i tun0 -s -d
to start the server tun0 on192.168.15.4
(virtual ip address10.0.1.1
) - Then in another window (or you can make the script above running in the backgroung), type
bash first.sh
to configure tun0's virtual ip address and the local route table
- Type
- In
192.168.15.5:/<path_2_working_dir>
:- Type
sudo su
- Type
sudo ./simpletun -i tun0 -c 192.168.15.4 -d -v 10.0.2.1
to start the client tun0 on192.168.15.5
(virtual ip address10.0.2.1
) - Then in another window (or you can make the script above running in the backgroung), type
bash second.sh
to configure tun0's virtual ip address and the local route table
- Type
- In
192.168.15.7:/<path_2_working_dir>
:- Type
sudo su
- Type
sudo ./simpletun -i tun0 -c 192.168.15.4 -d -v 10.0.3.1
to start the client tun0 on192.168.15.7
(virtual ip address10.0.3.1
) - Then in another window (or you can make the script above running in the backgroung), type
bash third.sh
to configure tun0's virtual ip address and the local route table
- Type
- In
192.168.15.8:/<path_2_working_dir>
:- Type
sudo su
- Type
sudo ./simpletun -i tun0 -c 192.168.15.4 -d -v 10.0.4.1
to start the client tun0 on192.168.15.8
(virtual ip address10.0.4.1
) - Then in another window (or you can make the script above running in the backgroung), type
bash forth.sh
to configure tun0's virtual ip address and the local route table
- Type
- Note that you can enter
0\n
(change session key randomly) or1\n
(change session iv (for encryption)) on the client side in the same terminal of./simpletun ...
.
- Now, everything is done!
- You can manipulate any network operations between
10.0.1.1/24
and10.0.2.1/24
/10.0.3.1/24
/10.0.4.1/24
(but not among last three) - For example:
- in "vm_0", type
ssh [email protected]
/ssh [email protected]
/ssh [email protected]
- in "vm_3", type
ping 10.0.1.1
- in "jin511_", type
ssh [email protected]
- ....
- in "vm_0", type
- Note that, all the ssh/ping/<other_network_operations> can be run simultaneously, with a normal functionality, since I already implemented a server which can build independent tunnels and multiple processes to handle requests from different addresses in parallel.