OPNsense Forum

International Forums => French - Français => Topic started by: trap16 on October 26, 2018, 05:36:04 am

Title: Client VPN sur reseau orange (livebox remplacee par routeur pfsense)
Post by: trap16 on October 26, 2018, 05:36:04 am
Bonjour,

Je suis recent utilisateur de opnsense sous fibre orange (j'ai pu enlever la livebox orange grace au tutorial correspondant).
Je desire utiliser une connection via NordVPN sous openvpn pour certains traffic sortant de mon reseau.

J'ai donc suivi le tutorial nordvpn pour pfsense : https://nordvpn.com/fr/tutorials/pfsense/pfsense-openvpn/
Cela marche (presque), il me reste un soucis que je n'arrive pas a resoudre, en suivant le tutorial, je me retrouve avec une gateway sur mon interface nordvpn de 255.255.255.0 (!)

L'interface nordvpn de mon routeur est configure en DHCP et la gateway est en dynamic. Mais avec cette configuration l'adresse 255.255.255.0 est alloue a la gateway.
NordVPN m'assigne une IP de 10.8.8.2 sur cette interface, j'ai donc essaye de mettre en gateway 10.8.8.1 a la place de dynamic et la tout marche !

Mon soucis est que je dois manuellement changer l'ip de la gateway chaque fois qu'elle change (apparemment ca n'arrive pas souvent mais je preferais savoir ce qui se passe et si il y a un moyen d'automatiser ca)

Ci dessous les logs en trace 5 de ma connection a nordvpn, on vois bien le 10.8.8.1 qui se ballade, quelqu'un a une idee de ce qui est mal configure ?

Merci d'avance.

[EDIT] : En checkant ce que fait ovpn-linkup , je me suis apercu qu'il met le 5ieme parametre 255.255.255.0 dans /tmp/ovnpcl-router
root@OPNsense:/var/log # cat /tmp/ovpnc1_router
255.255.255.0


Oct 26 05:16:19   openvpn[69952]: Initialization Sequence Completed
Oct 26 05:16:10   openvpn[69952]: /usr/local/etc/inc/plugins.inc.d/openvpn/ovpn-linkup ovpnc1 1500 1585 10.8.8.2 255.255.255.0 init
Oct 26 05:16:10   openvpn[69952]: /sbin/route add -net 10.8.8.0 10.8.8.1 255.255.255.0
Oct 26 05:16:10   openvpn[69952]: /sbin/ifconfig ovpnc1 10.8.8.2 10.8.8.1 mtu 1500 netmask 255.255.255.0 up
Oct 26 05:16:10   openvpn[69952]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Oct 26 05:16:10   openvpn[69952]: TUN/TAP device /dev/tun1 opened
Oct 26 05:16:10   openvpn[69952]: TUN/TAP device ovpnc1 exists previously, keep at program end
Oct 26 05:16:10   openvpn[69952]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Oct 26 05:16:10   openvpn[69952]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Oct 26 05:16:10   openvpn[69952]: Data Channel MTU parms [ L:1585 D:1450 EF:53 EB:411 ET:32 EL:3 ]
Oct 26 05:16:10   openvpn[69952]: Data Channel: using negotiated cipher 'AES-256-GCM'
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: data channel crypto options modified
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: adjusting link_mtu to 1657
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: peer-id set
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: route-related options modified
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: --ifconfig/up options modified
Oct 26 05:16:10   openvpn[69952]: Socket Buffers: R=[42080->524288] S=[57344->524288]
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: compression parms modified
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: explicit notify parm(s) modified
Oct 26 05:16:10   openvpn[69952]: OPTIONS IMPORT: timers and/or timeouts modified
Oct 26 05:16:10   openvpn[69952]: Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
Oct 26 05:16:10   openvpn[69952]: Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
Oct 26 05:16:10   openvpn[69952]: Options error: option 'redirect-gateway' cannot be used in this context ([PUSH-OPTIONS])
Oct 26 05:16:10   openvpn[69952]: PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.8.8.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.8.8.2 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Oct 26 05:16:10   openvpn[69952]: SENT CONTROL [cz36.nordvpn.com]: 'PUSH_REQUEST' (status=1)
Oct 26 05:16:09   openvpn[69952]: [cz36.nordvpn.com] Peer Connection Initiated with [AF_INET]89.187.189.195:1194