brouillon_ipsec
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | Prochaine révisionLes deux révisions suivantes | ||
brouillon_ipsec [2009/06/30 00:25] – thierry | brouillon_ipsec [2009/06/30 00:26] – thierry | ||
---|---|---|---|
Ligne 482: | Ligne 482: | ||
VID=4f45606c50487c5662707575 | VID=4f45606c50487c5662707575 | ||
VID=afcad71368a1f1c96b8696fc77570100 (Dead Peer Detection v1.0) | VID=afcad71368a1f1c96b8696fc77570100 (Dead Peer Detection v1.0) | ||
- | |||
- | ==== Test sur 2 IP Public ==== | ||
- | |||
- | Faire partager un reseau local, entre 2 IP public. | ||
- | |||
- | === conf === | ||
- | |||
- | " | ||
- | |||
- | Sur " | ||
- | |||
- | # cat ipsec.secrets | ||
- | IP_PUBLIC_20 IP_PUBLIC_15 : PSK " | ||
- | |||
- | # cat ipsec.conf | ||
- | version 2.0 # conforms to second version of ipsec.conf specification | ||
- | | ||
- | config setup | ||
- | nat_traversal=yes | ||
- | nhelpers=0 | ||
- | | ||
- | conn mynet | ||
- | authby=secret | ||
- | left=IP_PUBLIC_20 | ||
- | leftsubnet=192.168.1.0/ | ||
- | leftnexthop=IP_PUBLIC_15 | ||
- | right=IP_PUBLIC_15 | ||
- | rightnexthop=IP_PUBLIC_20 | ||
- | auto=start | ||
- | | ||
- | include / | ||
- | |||
- | Sur IP_PUBLIC_15 : \\ | ||
- | (Simple inversion) | ||
- | # cat ipsec.secrets | ||
- | IP_PUBLIC_15 IP_PUBLIC_20 : PSK " | ||
- | Et " | ||
- | |||
- | === detaillons === | ||
- | Au niveau IP, c'est un peu étrange... | ||
- | |||
- | Sur IP_PUBLIC_A : | ||
- | # route -n | ||
- | Table de routage IP du noyau | ||
- | Destination | ||
- | IP_PUBLIC_15 | ||
- | 192.168.1.0 | ||
- | ... | ||
- | |||
- | Sur IP_PUBLIC_B : | ||
- | # route -n | ||
- | Table de routage IP du noyau | ||
- | Destination | ||
- | 192.168.1.0 | ||
- | ... | ||
- | |||
- | Au niveau du firewall IP_PUBLIC_A : | ||
- | WAN_IF=eth0 | ||
- | WIFI_IF=eth1 | ||
- | | ||
- | # ipsec test | ||
- | |||
- | $IPTABLES -A INPUT -i $WAN_IF -p 50 -s IP_PUBLIC_15 -j ACCEPT | ||
- | $IPTABLES -A INPUT -i $WAN_IF -p 51 -s IP_PUBLIC_15 -j ACCEPT | ||
- | | ||
- | $IPTABLES -A INPUT -i $WAN_IF -s IP_PUBLIC_15 -d 192.168.1.0/ | ||
- | $IPTABLES -A OUTPUT -o $WAN_IF -d IP_PUBLIC_15 -s 192.168.1.0/ | ||
- | | ||
- | $IPTABLES -A FORWARD -i $WAN_IF -o $WIFI_IF -j ACCEPT | ||
- | $IPTABLES -A FORWARD -i $WIFI_IF -o $WAN_IF -j ACCEPT | ||
brouillon_ipsec.txt · Dernière modification : 2009/07/04 21:46 de thierry