informatique:logiciels:openvpn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:logiciels:openvpn [2016/10/15 16:39] – [Partie réseau] pteu | informatique:logiciels:openvpn [2016/10/15 21:19] – [Intégration système] pteu | ||
---|---|---|---|
Line 275: | Line 275: | ||
'' | '' | ||
+ | |||
+ | |||
+ | =====Intégration système===== | ||
+ | |||
+ | On va s' | ||
+ | |||
+ | ====Démarrage automatique==== | ||
+ | |||
+ | Pour lancer openvpn automatiquement au démarrage de la machine : | ||
+ | <code bash> | ||
+ | update-rc.d openvpn defaults | ||
+ | </ | ||
+ | |||
+ | ====syslog==== | ||
+ | |||
+ | Pour orienter les log du daemon openvpn, on peut définir l' | ||
+ | <code bash> | ||
+ | # Create a template for the vpn log location | ||
+ | $template OpenVPN,"/ | ||
+ | |||
+ | # Save log events where the programname starts with ovpn like ovpn-server to the | ||
+ | # location mentioned in the template | ||
+ | : | ||
+ | |||
+ | # Stop processing ovpn-* log events | ||
+ | : | ||
+ | </ | ||
+ | |||
+ | Relancer ensuite le syslog : | ||
+ | <code bash> | ||
+ | systemctl restart rsyslog | ||
+ | </ | ||
+ | |||
+ | ====logrotate==== | ||
+ | |||
+ | Une configuration classique, à déposer dans ''/ | ||
+ | <code bash> | ||
+ | / | ||
+ | { | ||
+ | rotate 12 | ||
+ | size 500M | ||
+ | monthly | ||
+ | missingok | ||
+ | notifempty | ||
+ | delaycompress | ||
+ | compress | ||
+ | copytruncate | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ====fail2ban==== | ||
+ | |||
+ | On déclare le fichier à surveiller dans en créant un ''/ | ||
+ | <code bash> | ||
+ | [openvpn] | ||
+ | enabled = true | ||
+ | protocol = udp | ||
+ | port = 5594 | ||
+ | filter | ||
+ | logpath = / | ||
+ | </ | ||
+ | |||
+ | Et on défini les filtres dans ''/ | ||
+ | <code bash> | ||
+ | [Definition] | ||
+ | failregex = < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
Line 282: | Line 351: | ||
* '' | * '' | ||
* la commande '' | * la commande '' | ||
+ | |||
+ | |||
=====Liens===== | =====Liens===== | ||
+ | * Documentation officielle : [[https:// | ||
* installation d' | * installation d' | ||
* [[http:// | * [[http:// |
informatique/logiciels/openvpn.txt · Last modified: 2018/08/20 12:49 by pteu