Sign inSign up

coriscodev/forticlient-tailscaled

By coriscodev

•Updated 7 months ago

A combination of OpenFortiVPN and Tailscale. Share a VPN connection across your Tailscale network.

Image
Networking
0

720

coriscodev/forticlient-tailscaled repository overview

⁠FortiClient + Tailscale VPN Gateway

A Docker container that combines OpenFortiVPN and Tailscale to create a secure VPN gateway. Connect to FortiClient VPN servers and share that connection across your Tailscale network.

⁠🚀 Quick Start

docker run -d \
  --name forti-vpn \
  --hostname forti-vpn \
  --cap-add=NET_ADMIN \
  --device=/dev/ppp \
  -e VPN_HOST=vpn.company.com \
  -e VPN_PORT=443 \
  -e VPN_USER=your.username \
  -e VPN_PWD=your_password \
  -e TS_ROUTES=10.10.10.0/24 \
  -e TS_AUTHKEY=tskey-auth-your-tailscale-key \
  -v ./tailscale/state:/var/lib/tailscale \
  coriscodev/forticlient-tailscaled:latest
⁠Using Docker Compose
services:
  forti-vpn:
    image: coriscodev/forticlient-tailscaled:latest
    container_name: forti-vpn
    hostname: forti-vpn
    environment:
      - VPN_HOST=vpn.company.com
      - VPN_PORT=443
      - VPN_USER=your.username
      - VPN_PWD=your_password
      - VPN_CERT= # optional
      - TS_ROUTES=10.10.10.0/24
      - TS_AUTHKEY=tskey-auth-your-tailscale-key
      - TS_EXTRA_FLAGS=--advertise-exit-node --reset
    volumes:
      - ./tailscale/state:/var/lib/tailscale
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/ppp

⁠✨ Features

  • 🔒 FortiClient VPN Support - Connect to FortiClient VPN servers using OpenFortiVPN
  • 🌐 Tailscale Integration - Share VPN connection across your entire Tailscale network
  • 🔄 Persistent State - Tailscale state persists across container restarts
  • 📡 Exit Node Support - Optional exit node advertising for full traffic routing
  • 🛣️ Custom Routes - Advertise specific network ranges to your tailnet
  • 🐳 Easy Deployment - Simple Docker/Docker Compose setup

⁠📋 Environment Variables

VariableRequiredDescription
VPN_HOST✅FortiClient VPN server address
VPN_PORT✅VPN server port (usually 443)
VPN_USER✅VPN username
VPN_PWD✅VPN password
VPN_CERT❌Server certificate SHA256 fingerprint
TS_ROUTES❌Routes to advertise (e.g., 10.0.0.0/8,172.16.0.0/16)
TS_AUTHKEY✅Tailscale authentication key
TS_EXTRA_FLAGS❌Additional Tailscale flags

⁠📖 Documentation

For complete documentation, examples, and troubleshooting:

GitHub Repository: https://github.com/CoriscoDev/forticlient-tailscaled⁠

⁠🔧 Common Use Cases

⁠Route Specific Networks

Share specific internal networks through your Tailscale network:

-e TS_ROUTES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
⁠Use as Exit Node

Route all traffic through the VPN connection:

-e TS_EXTRA_FLAGS="--advertise-exit-node --reset"

⁠🛡️ Security Notes

  • Store credentials securely (use Docker secrets or env files)
  • Limit Tailscale auth key permissions
  • Regularly rotate passwords and keys
  • Approve advertised routes in Tailscale admin console

⁠📝 License

MIT License - see LICENSE⁠

⁠🤝 Contributing

Contributions welcome! Please visit our GitHub repository⁠ to contribute.

⁠💬 Support

⁠🙏 Built With

Tag summary

Content type

Image

Digest

sha256:925bf46f9…

Size

88.3 MB

Last updated

7 months ago

docker pull coriscodev/forticlient-tailscaled