This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
linux:network:vpn [2021/02/13 16:14] tkilla |
linux:network:vpn [2024/01/18 20:59] (current) tkilla |
||
---|---|---|---|
Line 6: | Line 6: | ||
TBD | TBD | ||
+ | |||
+ | ===== Headscale / Tailscale ===== | ||
+ | |||
+ | Headscale is the open source variant of Tailscale. | ||
+ | |||
+ | Install it on your Server: [[https:// | ||
+ | |||
+ | Proxy it via nginx to get httpS. Nginx Example Config: | ||
+ | |||
+ | map $http_upgrade $connection_upgrade { | ||
+ | default | ||
+ | ' | ||
+ | '' | ||
+ | } | ||
+ | | ||
+ | server { | ||
+ | listen 80; | ||
+ | listen [:: | ||
+ | | ||
+ | listen 443 ssl http2; | ||
+ | listen [::]:443 ssl http2; | ||
+ | | ||
+ | server_name <YOUR DOMAIN>; | ||
+ | | ||
+ | ssl_certificate / | ||
+ | ssl_certificate_key / | ||
+ | ssl_protocols TLSv1.2 TLSv1.3; | ||
+ | | ||
+ | location / { | ||
+ | proxy_pass https://< | ||
+ | proxy_http_version 1.1; | ||
+ | proxy_set_header Upgrade $http_upgrade; | ||
+ | proxy_set_header Connection $connection_upgrade; | ||
+ | proxy_set_header Host $server_name; | ||
+ | proxy_redirect http:// https://; | ||
+ | proxy_buffering off; | ||
+ | proxy_set_header X-Real-IP $remote_addr; | ||
+ | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
+ | proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; | ||
+ | add_header Strict-Transport-Security " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | Install Tailscale Client on your Clients: [[https:// | ||
+ | |||
+ | Then run: | ||
+ | |||
+ | tailscale up --login-server https://< | ||
+ | |||
+ | which will give you the server Add command in the browser. Mission complete :) | ||
===== tinc ===== | ===== tinc ===== |