Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 19/10/2016, à 17:50

mva93

Problème OpenVPN connexion SSH

Bonjour,

Actuellement j'ai une PKI mis en place et un serveur OpenVPN en cours d’exécution.
J'ai un soucis dans la connexion OpenVPN actuellement.

La négociation avec le serveur VPN fonctionne très bien mais lorsque je suis connecté au bout d'un certain moment d’inactivité les connexion SSH en cours ou autre se coupe plus d'accès aux route puis reprise de l'état sans même une reconnexion au serveur VPN.

J'ai du mal à comprendre et voir où es la problème.
J'ai joué avec les options keepalive 10 60 | 10 600 | 10 3600 |
reneg-sec 30 || 60.

Voici mes deux conf

Conf Serveur :

daemon
port 1194
proto udp
dev tun
ca ca-crt.pem
cert /etc/openvpn/openvpn-crt.pem
key /etc/openvpn/openvpn-key.pem
crl-verify /etc/openvpn/ca-crl.pem
tls-auth /etc/openvpn/ta.pem 0
;username-as-common-name
client-config-dir /etc/openvpn/ccd
dh /etc/openvpn/dh.pem
;auth-user-pass-verify auth-pam.pl via-file
auth-user-pass-verify /etc/openvpn/ucn.pl via-env
plugin /usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so ovpn
server *********** ***********
route *********** ***********
route *********** ***********
route *********** ***********
;route *********** ***********
;topology subnet
ifconfig-pool-persist ipp.txt
;push "redirect-gateway"
push "route *********** ***********"
push "route *********** ***********"
push "route *********** ***********"
push "route *********** ***********"
push "route *********** ***********"
push "route *********** ***********"
push "route *********** ***********"
push "route ********* ***********"
push "dhcp-option DNS **********"
push "dhcp-option DNS **********"
push "dhcp-option WINS *********"
keepalive 10 3600
cipher AES-128-CBC
comp-lzo
max-clients 300
user openvpn
group openvpn
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
log-append /var/log/openvpn/openvpn.log
log on all
verb 15
tls-server
;mute 20

Conf Client

client
dev tun
proto udp
remote DNSServer 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca-crt.pem
cert crt.pem
key key.pem
ns-cert-type server
tls-auth ta.pem 1
auth-nocache
cipher AES-128-CBC
auth-user-pass
comp-lzo
verb 7
route-method exe
route-delay 2
tls-client
;replay-window 128 15
keepalive 10 3600
;explicit-exit-notify 20
;reneg-sec 30
;mssfix 1450

Je vous donnerais bien des logs mais ils sont très verbeux j'en suis arriver à des verb 15 côté serveur et 7 côté client. Cela fait 1 mois que je cherche à comprendre où serais le problème mais je comprend pas. J'ai fouillé dans la DOC de OpenVPN et je ne trouve pas la solution j'ai fouillé dans les forum idem.
Problème de routage ?

iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination 
ACCEPT all -- anywhere anywhere 
ACCEPT udp -- anywhere anywhere state NEW,ESTABLISHED udp dpt:53194 
ACCEPT udp -- anywhere anywhere state NEW,ESTABLISHED udp dpt:53194 

Chain FORWARD (policy ACCEPT)
target prot opt source destination 
LOG_DROP all -- *****.130.0/24 *****.130.0/24 
LOG_DROP all -- *****.130.0/24 *****.131.0/24 
LOG_DROP all -- *****.130.0/24 *****.132.0/24 
LOG_DROP all -- *****.130.0/24 *****.133.0/24 
LOG_DROP all -- *****.131.0/24 *****.130.0/24 
LOG_DROP all -- *****.131.0/24 *****.131.0/24 
LOG_DROP all -- *****.131.0/24 *****.132.0/24 
LOG_DROP all -- *****.131.0/24 *****.133.0/24 
LOG_DROP all -- *****.132.0/24 *****.130.0/24 
LOG_DROP all -- *****.132.0/24 *****.131.0/24 
LOG_DROP all -- *****.132.0/24 *****.132.0/24 
LOG_DROP all -- *****.132.0/24 *****.133.0/24 
LOG_DROP all -- *****.133.0/24 *****.130.0/24 
LOG_DROP all -- *****.133.0/24 *****.131.0/24 
LOG_DROP all -- *****.133.0/24 *****.132.0/24 
LOG_DROP all -- *****.133.0/24 *****.133.0/24 

Chain OUTPUT (policy ACCEPT)
target prot opt source destination 
ACCEPT all -- anywhere anywhere 
ACCEPT udp -- anywhere anywhere state NEW,ESTABLISHED udp dpt:53194 
ACCEPT udp -- anywhere anywhere state NEW,ESTABLISHED udp dpt:53194 

Chain LOG_ACCEPT (0 references)
target prot opt source destination 
LOG all -- anywhere anywhere LOG level info prefix `[IPTABLES ACCEPT] :' 
ACCEPT all -- anywhere anywhere 

Chain LOG_DROP (16 references)
target prot opt source destination 
LOG all -- anywhere anywhere LOG level info prefix `[IPTABLES DROP] :' 
DROP all -- anywhere anywhere

Les routes :

route
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
*****.130.2 * 255.255.255.255 UH 0 0 0 tun0
********** * 255.255.255.240 U 0 0 0 eth0
*****.131.0 *****.130.2 255.255.255.0 UG 0 0 0 tun0
*****.130.0 *****.130.2 255.255.255.0 UG 0 0 0 tun0
*****.133.0 *****.130.2 255.255.255.0 UG 0 0 0 tun0
*****.132.0 *****.130.2 255.255.255.0 UG 0 0 0 tun0
default fw 0.0.0.0 UG 0 0 0 eth0

Pensez-vous que quelque part dans la configuration il y ais un problème.
J'ai testé la configuration sur plusieurs connexion Wifi et filaire et aussi avec une connexion Fiber Channel.
Je ne comprend pas pourquoi mes connexions SSH se déconnecte subitement.

Merci pour vos aide d'avance

Hors ligne