Configuration avancée du tunnel réseau
Sur cette page
Le tunnel réseau FlowHardware permet d'interconnecter des infrastructures distantes via un lien chiffré et persistant. Ce guide couvre les options avancées de configuration.
Architecture du tunnel
[Votre serveur local]
|
| SSH Tunnel / WireGuard
|
[Nœud tunnel FlowHardware]
|
| Réseau privé FlowHardware
|
[Vos VPS / Services FlowHardware]
Types de tunnels disponibles
Tunnel SSH (port forwarding)
Idéal pour exposer un service local sur une IP publique FlowHardware :
# Exposer le port 8080 local sur le port 80 du serveur tunnel
ssh -R 80:localhost:8080 [email protected] -N -f
# Maintenir la connexion avec autossh
autossh -M 0 -R 80:localhost:8080 [email protected] -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -N -f
Tunnel VXLAN (L2 over L3)
Pour étendre un réseau local vers l'infrastructure FlowHardware :
# Créer une interface VXLAN
ip link add vxlan0 type vxlan id 100 remote tunnel.flowhardware.ch local VOTRE_IP dstport 4790
ip link set vxlan0 up
ip addr add 10.100.0.1/24 dev vxlan0
Configuration systemd pour tunnel persistant
Créez /etc/systemd/system/flowhardware-tunnel.service :
[Unit]
Description=FlowHardware Network Tunnel
After=network.target
Wants=network-online.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/autossh -M 0 -R 0.0.0.0:443:localhost:443 -R 0.0.0.0:80:localhost:80 [email protected] -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -N
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
systemctl enable --now flowhardware-tunnel
systemctl status flowhardware-tunnel
MTU et fragmentation
Le tunneling ajoute un overhead aux paquets. Ajustez le MTU pour éviter la fragmentation :
# VXLAN overhead : 50 bytes
# MTU recommandé sur l'interface tunnel
ip link set vxlan0 mtu 1450
# Vérifier avec un ping de grande taille
ping -M do -s 1400 10.100.0.2
Sécurisation du tunnel SSH
# Générer une clé SSH dédiée au tunnel
ssh-keygen -t ed25519 -f ~/.ssh/flowhardware_tunnel -N ""
# Restreindre dans authorized_keys côté serveur
command="",no-pty,no-X11-forwarding ssh-ed25519 AAAA... tunnel@monserveur
Monitoring du tunnel
# Vérifier l'état du tunnel
systemctl status flowhardware-tunnel
# Tester la connectivité
ping 10.100.0.2
# Logs
journalctl -u flowhardware-tunnel -f
Ce guide n'a pas suffi ? Une personne du support vous répond en français.








