Wednesday, March 30, 2016

how to create secure tunnel between remote computers

anytun is anycast tunneling daemon, it support encryption type such as       aes-ctr,  aes-ctr-128, aes-ctr-192, and aes-ctr-256. and it support both ipv4 and ipv6

***info***
host1: ipv4:192.168.202.23 or ipv6 2002:f388:1:2::2
host2: ipv4: 192.168.56.23, or ipv6 2002:f388:1:1::2
passphrase: pass_a_keys_passwordPassword1234567


- you need a router to route host1 and host2 or you can use the same subnet both host1 and host2

1- installation
$ sudo apt-get install anytun

***  if we use ipv4 as endpoints ***
- host1:
$ sudo anytun -r 192.168.56.23 -t tun -n 192.168.123.2/30 -c aes-ctr-256 -k aes-ctr-256 -E pass_a_keys_passwordPassword1234567 -e right

-host2:
$ sudo anytun -r 192.168.202.23 -t tun -n 192.168.123.1/30 -c aes-ctr-256 -k aes-ctr-256 -E pass_a_keys_passwordPassword1234567 -e left

now if you want to connect through tunnel between host1 and host2 use ip 192.168.123.2 and 192.168.123.1

 ***  if we use ipv6 as endpoints ***
host1:
$ sudo anytun -r 2002:f388:1:1::2 -t tun -n 192.168.123.2/30 -c aes-ctr-256 -k aes-ctr-256 -E pass_a_keys_passwordPassword1234567 -e right

host2:
$ sudo anytun -r 2002:f388:1:1::2 -t tun -n 192.168.123.2/30 -c aes-ctr-256 -k aes-ctr-256 -E pass_a_keys_passwordPassword1234567 -e right


-screenshot ping from host1 to host2 through tunnel ip





No comments:

Post a Comment