This is stage 3 :
Previously..(with '24' soundtrack)
-IPoP was Installed
-Alice and Bob registered on XMPP server
-Alice and Bob are friends.
In this tutorial I am going to connect Alice and Bob through IPoP's SocialVPN controller. SocialVPN helps in creation of virtual private networks connecting an Internet users to their friend’s devices. It derives friend relationship from XMPP servers( That is why we added Alice and Bob as friends in the previous stage). Each user is in control of who their VPN connects to(for example Alice is friends with Bob and Carol, but Bob and Carol are not friends, in that case there will not be a VPN link between Bob and Carol).
Well, my GSoC project will be related to this, IFFFFFFFF (thats a very big IF) I get selected (fingers crossed).
Alice and Bob create 'config.json' file and store it in their respective IPOP directory (remember 'home/ipop-15.01.0_ubuntu14? If not go back to stage 2)
The contents of Alice's Config file will be... (xmpp_host depends on the server you used)
{
"xmpp_username": "alice_sushant@xmpp.jp",
"xmpp_password": "****(Yah, right!)",
"xmpp_host": "xmpp.jp",
"ip4": "172.31.0.100",
"ip4_mask": 24,
"stat_report": true,
"tincan_logging": 0,
"controller_logging": "DEBUG"
}
Similarily Bob's config file (just change (username, password) , everything else stays the same(ip4,ip4_mask...))
Run this on both, Alice and Bob
Run (on Alice):
Previously..(with '24' soundtrack)
-IPoP was Installed
-Alice and Bob registered on XMPP server
-Alice and Bob are friends.
Social VPN
![]() |
| Alice friends with Bob and Carol, but Bob and Carol are not friends. |
In this tutorial I am going to connect Alice and Bob through IPoP's SocialVPN controller. SocialVPN helps in creation of virtual private networks connecting an Internet users to their friend’s devices. It derives friend relationship from XMPP servers( That is why we added Alice and Bob as friends in the previous stage). Each user is in control of who their VPN connects to(for example Alice is friends with Bob and Carol, but Bob and Carol are not friends, in that case there will not be a VPN link between Bob and Carol).
Step 1: Creating configuration file
Well, my GSoC project will be related to this, IFFFFFFFF (thats a very big IF) I get selected (fingers crossed).
Alice and Bob create 'config.json' file and store it in their respective IPOP directory (remember 'home/ipop-15.01.0_ubuntu14? If not go back to stage 2)
The contents of Alice's Config file will be... (xmpp_host depends on the server you used)
{
"xmpp_username": "alice_sushant@xmpp.jp",
"xmpp_password": "****(Yah, right!)",
"xmpp_host": "xmpp.jp",
"ip4": "172.31.0.100",
"ip4_mask": 24,
"stat_report": true,
"tincan_logging": 0,
"controller_logging": "DEBUG"
}
Similarily Bob's config file (just change (username, password) , everything else stays the same(ip4,ip4_mask...))
Step 2 : Running IPoP
Run this on both, Alice and Bob
Start IPOP:
$ sudo sh -c './ipop-tincan-x86_64 1> out.log 2> err.log &'
Note: use "ipop-tincan-x86" in place of "ipop-tincan-x86_64" for 32-bit Ubuntu machine.
$ sudo sh -c './ipop-tincan-x86_64 1> out.log 2> err.log &'
Note: use "ipop-tincan-x86" in place of "ipop-tincan-x86_64" for 32-bit Ubuntu machine.
then
Start SVPN controller:
./svpn_controller.py -c config.json &> log.txt &
./svpn_controller.py -c config.json &> log.txt &
Step 3: Checking if connected
Run (on Alice):
echo -e '\x02\x01{"m":"get_state"}' | netcat -q 1 -u 127.0.0.1 5800
See the above image, if Bob didnot start SVPN controller than his node won't be visible.
But if starts, then his node is visible but 'Offline'
To bring him online, or to complete the connection, ping him
See the above image, if Bob didnot start SVPN controller than his node won't be visible.
But if starts, then his node is visible but 'Offline'
To bring him online, or to complete the connection, ping him
$ ping 172.31.0.101
(wait for some time, when reply comes you can stop pinging with ctr+C)
Now run 'echo -e '\x02\x01{"m":"get_state"}' | netcat -q 1 -u 127.0.0.1 5800' again.
(wait for some time, when reply comes you can stop pinging with ctr+C)
Now run 'echo -e '\x02\x01{"m":"get_state"}' | netcat -q 1 -u 127.0.0.1 5800' again.
If you are getting something like this..
than congratulations you have successfully created a VPN.
You can see in the image that your IP is 172.31.0.100, and your peer's IP is 172.31.0.101
You can see in the image that your IP is 172.31.0.100, and your peer's IP is 172.31.0.101
To stop the vpn run:
Run:
pkill ipop-tincan-x86_64
ps aux | grep svpn_controller.py
kill <pid-of-svpn-controller.py>
ps aux | grep svpn_controller.py
kill <pid-of-svpn-controller.py>



No comments:
Post a Comment