Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
howto:utiliser_la_connexion_vpn_de_la_brique_en_filaire [2017/09/23 17:32] emile created |
howto:utiliser_la_connexion_vpn_de_la_brique_en_filaire [2017/09/23 17:45] emile |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====Utiliser le VPN de la brique sur la connexion filaire===== | =====Utiliser le VPN de la brique sur la connexion filaire===== | ||
- | Note: Ce tuto à été fait sur un réseau de type Livebox mais il est certainement aisé de faire la même chose dans un réseau d'un opérateur concurrent. | + | Note: Ce tuto a été réalisé sur un réseau de type Livebox mais il est certainement aisé de faire la même chose sur un réseau d'un autre opérateur mainstream. |
====Phase A - "Désactiver" la Livebox==== | ====Phase A - "Désactiver" la Livebox==== | ||
- | Pour commencer il nous faut desactiver le dhcp de la livebox. Pour cela il faut aller dans 'configuration avancé', puis 'Configuration réseau', puis 'DHCP', pour avoir le bouton "désactiver". | + | Pour commencer il nous faut désactiver le dhcp de la livebox. Pour cela il faut aller dans 'configuration avancé', puis 'Configuration réseau', puis 'DHCP', pour avoir le bouton "désactiver". |
{{:howto:dhcp.png}} | {{:howto:dhcp.png}} | ||
Line 92: | Line 92: | ||
ip6tables -w -I FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | ip6tables -w -I FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | ||
ip6tables -w -I FORWARD -i eth0 -o tun0 -j ACCEPT | ip6tables -w -I FORWARD -i eth0 -o tun0 -j ACCEPT | ||
+ | ip6tables -w -I FORWARD -i eth0 -o wlan0 -j ACCEPT | ||
+ | ip6tables -w -I FORWARD -i wlan0 -o eth0 -j ACCEPT | ||
ip6tables -w -I INPUT -i eth0 -j ACCEPT | ip6tables -w -I INPUT -i eth0 -j ACCEPT | ||
ip6tables -w -I OUTPUT -o eth0 -j ACCEPT | ip6tables -w -I OUTPUT -o eth0 -j ACCEPT | ||
Line 99: | Line 101: | ||
iptables -w -I FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | iptables -w -I FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | ||
iptables -w -I FORWARD -i eth0 -o tun0 -j ACCEPT | iptables -w -I FORWARD -i eth0 -o tun0 -j ACCEPT | ||
+ | iptables -w -I FORWARD -i eth0 -o wlan0 -j ACCEPT | ||
+ | iptables -w -I FORWARD -i wlan0 -o eth0 -j ACCEPT | ||
iptables -w -I INPUT -i eth0 -j ACCEPT | iptables -w -I INPUT -i eth0 -j ACCEPT | ||
;; | ;; | ||
Line 106: | Line 110: | ||
ip6tables -w -D FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | ip6tables -w -D FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | ||
ip6tables -w -D FORWARD -i eth0 -o tun0 -j ACCEPT | ip6tables -w -D FORWARD -i eth0 -o tun0 -j ACCEPT | ||
+ | ip6tables -w -D FORWARD -i eth0 -o wlan0 -j ACCEPT | ||
+ | ip6tables -w -D FORWARD -i wlan0 -o eth0 -j ACCEPT | ||
ip6tables -w -D INPUT -i eth0 -j ACCEPT | ip6tables -w -D INPUT -i eth0 -j ACCEPT | ||
ip6tables -w -D OUTPUT -o eth0 -j ACCEPT | ip6tables -w -D OUTPUT -o eth0 -j ACCEPT | ||
Line 113: | Line 119: | ||
iptables -w -D FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | iptables -w -D FORWARD -i tun0 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | ||
iptables -w -D FORWARD -i eth0 -o tun0 -j ACCEPT | iptables -w -D FORWARD -i eth0 -o tun0 -j ACCEPT | ||
+ | iptables -w -D FORWARD -i eth0 -o wlan0 -j ACCEPT | ||
+ | iptables -w -D FORWARD -i wlan0 -o eth0 -j ACCEPT | ||
iptables -w -D INPUT -i eth0 -j ACCEPT | iptables -w -D INPUT -i eth0 -j ACCEPT | ||
;; | ;; | ||
Line 120: | Line 128: | ||
;; | ;; | ||
esac | esac | ||
+ | |||
+ | Puis on fait en sorte que tout démarre au boot: | ||
+ | |||
+ | systemctl daemon-reload | ||
+ | systemctl enable wiredgw.service | ||
C'est à peu près tout :) on peut rebooter notre brique pour voir si ça fonctionne bien! | C'est à peu près tout :) on peut rebooter notre brique pour voir si ça fonctionne bien! |