Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
tinc [2019/03/31 23:31] colin |
tinc [2019/04/27 22:19] (Version actuelle) colin |
||
---|---|---|---|
Ligne 29: | Ligne 29: | ||
[[https://www.cyberciti.biz/faq/how-to-install-tinc-vpn-on-ubuntu-linux-16-04-to-secure-traffic/|Install tinc vpn]] | [[https://www.cyberciti.biz/faq/how-to-install-tinc-vpn-on-ubuntu-linux-16-04-to-secure-traffic/|Install tinc vpn]] | ||
- | ===== Documenation ===== | + | ===== Documentation ===== |
- | + | ||
- | [[https://www.tinc-vpn.org/documentation-1.1/Example-configuration.html#Example-configuration|Example configuration]] | + | |
+ | [[https://www.tinc-vpn.org/documentation-1.1/Example-configuration.html#Example-configuration|Example configuration]], | ||
+ | [[https://www.tinc-vpn.org/documentation/tinc.conf.5|Tinc.conf.5]] | ||
+ | [[https://www.tinc-vpn.org/examples/windows-install/m|Windows-install]] | ||
===== Example ===== | ===== Example ===== | ||
- | A: net 10.1.0.0 mask 255.255.0.0 gateway 10.1.54.1 internet IP 1.2.3.4 | + | Port 443 and route. |
- | B: net 10.2.0.0 mask 255.255.0.0 gateway 10.2.1.12 internet IP 2.3.4.5 | + | A: tun0 : 10.1.0.1 mask 255.255.0.0 ; IP PUBLIC : 56.142.24.99 ; Ubuntu server 18.04 |
- | C: net 10.3.0.0 mask 255.255.0.0 gateway 10.3.69.254 internet IP 3.4.5.6 | + | B: tun0 : 10.2.0.2 mask 255.255.0.0 ; IP PHYSIQUE : 192.168.1.11/24 ; Ubuntu desktop 16.04 |
- | D: net 10.4.0.0 mask 255.255.0.0 gateway 10.4.3.32 internet IP 4.5.6.7 | + | |
$ sudo apt update | $ sudo apt update | ||
Ligne 45: | Ligne 45: | ||
===== serverA ===== | ===== serverA ===== | ||
+ | |||
+ | Make sure port 443 open in UDP and TCP via manager like scaleway... | ||
$ sudo mkdir -p /etc/tinc/vpn0/hosts/ | $ sudo mkdir -p /etc/tinc/vpn0/hosts/ | ||
- | $ sudo vi /etc/tinc/vpn0/tinc.conf | + | $ sudo nano /etc/tinc/vpn0/tinc.conf |
Append the following: | Append the following: | ||
Ligne 60: | Ligne 62: | ||
$ sudo tincd -n vpn0 -K4096 | $ sudo tincd -n vpn0 -K4096 | ||
- | $ sudo vi /etc/tinc/vpn0/hosts/serverA | + | $ sudo nano /etc/tinc/vpn0/hosts/serverA |
Compression = 9 | Compression = 9 | ||
- | Address = 51.158.64.111 | + | Address = 56.142.24.99 |
Port = 443 | Port = 443 | ||
Subnet = 10.1.0.1/32 | Subnet = 10.1.0.1/32 | ||
Ligne 82: | Ligne 84: | ||
- | chmod a+rx /etc/tinc/vpn0/tinc-* | + | $ chmod a+rx /etc/tinc/vpn0/tinc-* |
- | systemctl enable tinc | + | $ systemctl enable tinc |
- | systemctl enable tinc@vpn0 | + | $ systemctl enable tinc@vpn0 |
- | systemctl start tinc@vpn0 | + | $ systemctl start tinc@vpn0 |
===== serverB ===== | ===== serverB ===== | ||
Ligne 128: | Ligne 130: | ||
- | chmod a+rx /etc/tinc/vpn0/tinc-* | + | $ chmod a+rx /etc/tinc/vpn0/tinc-* |
+ | |||
+ | $ echo 'vpn0' | sudo tee -a /etc/tinc/nets.boot | ||
+ | |||
+ | $ systemctl enable tinc | ||
+ | $ systemctl start tinc | ||
+ | |||
+ | ===== Utils ===== | ||
+ | Verification tun0 launch : | ||
+ | $ ps aux | grep tincd | ||
- | systemctl enable tinc | + | Journal : |
- | systemctl enable tinc@vpn0 | + | $ journalctl -u tinc |
- | systemctl start tinc@vpn0 | + | $ sudo systemctl enable tinc |
+ | $ sudo systemctl disable tinc | ||
+ | $ sudo systemctl restart tinc | ||
+ | $ sudo systemctl start tinc | ||
+ | $ sudo systemctl stop tinc | ||
+ | Make sure port is opened: | ||
+ | $ netstat -tulpn | grep tincd | ||