Hie all,
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
remote extern ip: 82.229.223.240
remote intern ip: 192.168.100.254
first, here are my routes:
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
second, here are my conf files:
setket.conf:
#############################################################3
flush;
spdflush;
spdadd 192.168.100.0/24 192.168.200.0/24 any -P in ipsec
esp/tunnel/82.229.223.240-82.236.103.1/require ;
spdadd 192.168.200.0/24 192.168.100.0/24 any -P out ipsec
esp/tunnel/82.236.103.1-82.229.223.240/require ;
############################################################
racoon.conf
( need i a "padding" block??????)
#############################################################
path certificate "/usr/local/etc/racoon/ssl/" ;
log debug;
listen
{
isakmp 82.236.103.1[500];
}
timer
{
phase1 40 sec;
phase2 35 sec;
}
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
sainfo address 192.168.200.0/24 any address 192.168.100.0/24 any
{
pfs_group 5;
lifetime time 2 min;
encryption_algorithm aes;
authentication_algorithm hmac_sha1;
compression_algorithm deflate;
}
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >
so it's ok for the vpn
but the ping fails, i have no answers:
PING 192.168.100.254 (192.168.100.254): 56 data bytes
^C
--- 192.168.100.254 ping statistics ---
117 packets transmitted, 0 packets received, 100.0% packet loss
---------------------------------------------------------------------------------
i'm 99% sure that it's rules in my pf.conf but i can't see it.
can someone help me?
ps:excuse my bad english
Hie all,
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
remote extern ip: 82.229.223.240
remote intern ip: 192.168.100.254
first, here are my routes:
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
second, here are my conf files:
setket.conf:
#############################################################3
flush;
spdflush;
spdadd 192.168.100.0/24 192.168.200.0/24 any -P in ipsec
esp/tunnel/82.229.223.240-82.236.103.1/require ;
spdadd 192.168.200.0/24 192.168.100.0/24 any -P out ipsec
esp/tunnel/82.236.103.1-82.229.223.240/require ;
############################################################
racoon.conf
( need i a "padding" block??????)
#############################################################
path certificate "/usr/local/etc/racoon/ssl/" ;
log debug;
listen
{
isakmp 82.236.103.1[500];
}
timer
{
phase1 40 sec;
phase2 35 sec;
}
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
sainfo address 192.168.200.0/24 any address 192.168.100.0/24 any
{
pfs_group 5;
lifetime time 2 min;
encryption_algorithm aes;
authentication_algorithm hmac_sha1;
compression_algorithm deflate;
}
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >
so it's ok for the vpn
but the ping fails, i have no answers:
PING 192.168.100.254 (192.168.100.254): 56 data bytes
^C
--- 192.168.100.254 ping statistics ---
117 packets transmitted, 0 packets received, 100.0% packet loss
---------------------------------------------------------------------------------
i'm 99% sure that it's rules in my pf.conf but i can't see it.
can someone help me?
ps:excuse my bad english
Hie all,
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
remote extern ip: 82.229.223.240
remote intern ip: 192.168.100.254
first, here are my routes:
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
second, here are my conf files:
setket.conf:
#############################################################3
flush;
spdflush;
spdadd 192.168.100.0/24 192.168.200.0/24 any -P in ipsec
esp/tunnel/82.229.223.240-82.236.103.1/require ;
spdadd 192.168.200.0/24 192.168.100.0/24 any -P out ipsec
esp/tunnel/82.236.103.1-82.229.223.240/require ;
############################################################
racoon.conf
( need i a "padding" block??????)
#############################################################
path certificate "/usr/local/etc/racoon/ssl/" ;
log debug;
listen
{
isakmp 82.236.103.1[500];
}
timer
{
phase1 40 sec;
phase2 35 sec;
}
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
sainfo address 192.168.200.0/24 any address 192.168.100.0/24 any
{
pfs_group 5;
lifetime time 2 min;
encryption_algorithm aes;
authentication_algorithm hmac_sha1;
compression_algorithm deflate;
}
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >
so it's ok for the vpn
but the ping fails, i have no answers:
PING 192.168.100.254 (192.168.100.254): 56 data bytes
^C
--- 192.168.100.254 ping statistics ---
117 packets transmitted, 0 packets received, 100.0% packet loss
---------------------------------------------------------------------------------
i'm 99% sure that it's rules in my pf.conf but i can't see it.
can someone help me?
ps:excuse my bad english
Hie all,
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >
so it's ok for the vpn
ps:excuse my bad english
Hie all,
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >
so it's ok for the vpn
ps:excuse my bad english
Hie all,
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >
so it's ok for the vpn
ps:excuse my bad english
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
mike writes:Hie all,
Salut :-)I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Je suppose que tu as trouve ca sur une doc "officielle" FreeBSD, qui
est la seule a encore evoquer ce type configuration.
Ca presente quelques avantages anecdotiques et eventuellement
exploitables, a cote de ca ca marche pas toujours bien pour ce que
j'en ai entendu parler, c'est pas standard (ca marche que avec un BSD
en face qui utilise le meme type de configuration), et ca complique
souvent les choses pour rien.....
[....]# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
Du coup, sans le gif0, ta "route" IPSec n'apparaitra plus ici (c'est
justement le seul avantage a ma connaissance de l'utilisation des gif,
ca permet d'etre visible des la table de routage).
[....]remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
Euh, je suis pas expert en racoon (nan, je deconne :-), mais ta
proposal est un poil vide....
Ton racoon demarre avec une conf comme ca ?
Si la reponse est "oui", faudra que je fixe ca, parceque la page de
man est on ne peux plus claire:
proposal { sub-substatements }
encryption_algorithm algorithm;
[....]
This directive must be defined.
Pareil pour hash_algorithm et pour authentication_method.....
[...]#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
C'est la que ca se complique, d'apres ce que tu expliques comme
symptome plus tard:
Tu confonds l'interface sur laquelle passe le traffic a chiffrer
(gif0) et l'interface sur laquelle passent les paquets IPSec
(negociation IKE, ESP, etc...).
Tout ce qui est ESP et UDP 500 doit correspondre a l'interface
ext_if...
Le fait que ton tunnel semble se negocier tient manifestement du
malentendu de competition, ou du fait que ton filtrage n'aie
absolument aucune autre regle et soit en "pass all" par defaut....
Par contre, ta regle qui autorise le ICMP ne cible pas la bonne
adresse de destination: tu veux pinguer 192.168.100.x, pas
82.229.223.240 !
Bref, tu peux effacer a moitie ton pf.conf et le recommencer, en
faisant bien attention a comprendre ce qui est "tunnel IPSec" (donc
interfaces externes, et IPs des gates IPSec) et ce qui est "traffic a
chiffrer", donc plans d'adressages internes, et, selon le cas,
interface interne ou interface IPSec (gif0 dans ton cas, mais ca
pourrait aussi etre enc0 si tu laisse tomber les gif et que t'actives
enc0).i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >>
so it's ok for the vpn
Waaaw.... le racoon demarre et ca negocie, donc.... Tu peux
re-reverifier que t'as pas fait une erreur de copier/coller dans ta
conf la au dessus, et que ton racoon demarre effectivement avec une
section proposal a moitie vide ?
[....]ps:excuse my bad english
Ok, si tu excuses mon francais ;-)
A +
VANHU.
mike <mike@inguera.com> writes:
Hie all,
Salut :-)
I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Je suppose que tu as trouve ca sur une doc "officielle" FreeBSD, qui
est la seule a encore evoquer ce type configuration.
Ca presente quelques avantages anecdotiques et eventuellement
exploitables, a cote de ca ca marche pas toujours bien pour ce que
j'en ai entendu parler, c'est pas standard (ca marche que avec un BSD
en face qui utilise le meme type de configuration), et ca complique
souvent les choses pour rien.....
[....]
# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
Du coup, sans le gif0, ta "route" IPSec n'apparaitra plus ici (c'est
justement le seul avantage a ma connaissance de l'utilisation des gif,
ca permet d'etre visible des la table de routage).
[....]
remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
Euh, je suis pas expert en racoon (nan, je deconne :-), mais ta
proposal est un poil vide....
Ton racoon demarre avec une conf comme ca ?
Si la reponse est "oui", faudra que je fixe ca, parceque la page de
man est on ne peux plus claire:
proposal { sub-substatements }
encryption_algorithm algorithm;
[....]
This directive must be defined.
Pareil pour hash_algorithm et pour authentication_method.....
[...]
#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
C'est la que ca se complique, d'apres ce que tu expliques comme
symptome plus tard:
Tu confonds l'interface sur laquelle passe le traffic a chiffrer
(gif0) et l'interface sur laquelle passent les paquets IPSec
(negociation IKE, ESP, etc...).
Tout ce qui est ESP et UDP 500 doit correspondre a l'interface
ext_if...
Le fait que ton tunnel semble se negocier tient manifestement du
malentendu de competition, ou du fait que ton filtrage n'aie
absolument aucune autre regle et soit en "pass all" par defaut....
Par contre, ta regle qui autorise le ICMP ne cible pas la bonne
adresse de destination: tu veux pinguer 192.168.100.x, pas
82.229.223.240 !
Bref, tu peux effacer a moitie ton pf.conf et le recommencer, en
faisant bien attention a comprendre ce qui est "tunnel IPSec" (donc
interfaces externes, et IPs des gates IPSec) et ce qui est "traffic a
chiffrer", donc plans d'adressages internes, et, selon le cas,
interface interne ou interface IPSec (gif0 dans ton cas, mais ca
pourrait aussi etre enc0 si tu laisse tomber les gif et que t'actives
enc0).
i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >>
so it's ok for the vpn
Waaaw.... le racoon demarre et ca negocie, donc.... Tu peux
re-reverifier que t'as pas fait une erreur de copier/coller dans ta
conf la au dessus, et que ton racoon demarre effectivement avec une
section proposal a moitie vide ?
[....]
ps:excuse my bad english
Ok, si tu excuses mon francais ;-)
A +
VANHU.
mike writes:Hie all,
Salut :-)I'm running a freebsd7 box and i have some troubles in setting up a vpn
with ipsec.
informations:
my extern ip: 82.236.103.1
my intern ip: 192.168.200.254
my gif0 interface:
gif0: flags51<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1280
tunnel inet 82.236.103.1 --> 82.229.223.240
inet 192.168.200.254 --> 192.168.100.254 netmask 0xffffffff
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Je suppose que tu as trouve ca sur une doc "officielle" FreeBSD, qui
est la seule a encore evoquer ce type configuration.
Ca presente quelques avantages anecdotiques et eventuellement
exploitables, a cote de ca ca marche pas toujours bien pour ce que
j'en ai entendu parler, c'est pas standard (ca marche que avec un BSD
en face qui utilise le meme type de configuration), et ca complique
souvent les choses pour rien.....
[....]# netstat -rn
Destination Gateway Flags Refs Use Netif
default 82.236.103.254 UGS 0 28622 rl0
82.236.103.0/24 link#2 UC 0 0 rl0
[...]
192.168.100.0/24 192.168.100.254 UGS 0 0 gif0
192.168.100.254 192.168.200.254 UH 1 2462 gif0
192.168.200.0/24 link#1 UC 0 0 re0
[...]
Du coup, sans le gif0, ta "route" IPSec n'apparaitra plus ici (c'est
justement le seul avantage a ma connaissance de l'utilisation des gif,
ca permet d'etre visible des la table de routage).
[....]remote 82.229.223.240 {
exchange_mode main;
my_identifier asn1dn;
peers_identifier asn1dn;
verify_identifier on;
certificate_type x509 "ipsec.inguera.com.crt"
"zeus.inguera.com.key";
peers_certfile x509 "ipsec.leonzarea.com.crt";
lifetime time 10 min;
proposal {
dh_group 5;
}
}
Euh, je suis pas expert en racoon (nan, je deconne :-), mais ta
proposal est un poil vide....
Ton racoon demarre avec une conf comme ca ?
Si la reponse est "oui", faudra que je fixe ca, parceque la page de
man est on ne peux plus claire:
proposal { sub-substatements }
encryption_algorithm algorithm;
[....]
This directive must be defined.
Pareil pour hash_algorithm et pour authentication_method.....
[...]#####################################################################################
pf.conf (concerning vpn)
ext_if = external interface
int_if = internal interface
vpn_if = gif0
vpn_dest = remote hosts (in this case 82.229.223.240)
#################################################################################
pass in quick on $vpn_if proto {tcp, udp} from $vpn_dest to
$int_if:network port 500
pass in quick on $vpn_if proto esp from $vpn_dest to $int_if:network
pass in quick on $vpn_if proto ah from $vpn_dest to $int_if:network
pass out quick on $vpn_if proto icmp from $int_if:network to $vpn_dest
pass out quick on $vpn_if proto {esp, ah} from $int_if:network to $vpn_dest
####################################################################################
C'est la que ca se complique, d'apres ce que tu expliques comme
symptome plus tard:
Tu confonds l'interface sur laquelle passe le traffic a chiffrer
(gif0) et l'interface sur laquelle passent les paquets IPSec
(negociation IKE, ESP, etc...).
Tout ce qui est ESP et UDP 500 doit correspondre a l'interface
ext_if...
Le fait que ton tunnel semble se negocier tient manifestement du
malentendu de competition, ou du fait que ton filtrage n'aie
absolument aucune autre regle et soit en "pass all" par defaut....
Par contre, ta regle qui autorise le ICMP ne cible pas la bonne
adresse de destination: tu veux pinguer 192.168.100.x, pas
82.229.223.240 !
Bref, tu peux effacer a moitie ton pf.conf et le recommencer, en
faisant bien attention a comprendre ce qui est "tunnel IPSec" (donc
interfaces externes, et IPs des gates IPSec) et ce qui est "traffic a
chiffrer", donc plans d'adressages internes, et, selon le cas,
interface interne ou interface IPSec (gif0 dans ton cas, mais ca
pourrait aussi etre enc0 si tu laisse tomber les gif et que t'actives
enc0).i run racoon this way to have debug:
racoon -F -d -f /path/to/conf/file
when i do a ping to 192.168.100.254 (internal remote host)
i and the remote admin, can see that the vpn has been established:
2008-05-21 20:38:46: INFO: IPsec-SA established: ESP/Tunnel
82.236.103.1[0]->82.229.223.240[0] spi=.......
2008-05-21 20:38:46: DEBUG: == >>
so it's ok for the vpn
Waaaw.... le racoon demarre et ca negocie, donc.... Tu peux
re-reverifier que t'as pas fait une erreur de copier/coller dans ta
conf la au dessus, et que ton racoon demarre effectivement avec une
section proposal a moitie vide ?
[....]ps:excuse my bad english
Ok, si tu excuses mon francais ;-)
A +
VANHU.
effectivement c'est un mauvais copier coller pour le racoon.conf.
j'ai refait mes regles pf concernant la partie du vpn, elle sont deja
plus logique mais je ne peux toujours pas pinger le reseau distant mais
mon probleme se situe au niiveau du routage des paquets je pens.
comment faire sans utiliser gif0?
un lien?
effectivement c'est un mauvais copier coller pour le racoon.conf.
j'ai refait mes regles pf concernant la partie du vpn, elle sont deja
plus logique mais je ne peux toujours pas pinger le reseau distant mais
mon probleme se situe au niiveau du routage des paquets je pens.
comment faire sans utiliser gif0?
un lien?
effectivement c'est un mauvais copier coller pour le racoon.conf.
j'ai refait mes regles pf concernant la partie du vpn, elle sont deja
plus logique mais je ne peux toujours pas pinger le reseau distant mais
mon probleme se situe au niiveau du routage des paquets je pens.
comment faire sans utiliser gif0?
un lien?
VANHULLEBUS Yvan writes:
'Lut Yvan,Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Gnagnagna ©
Avec de l'ipsec transport, si tu utilises un protocole de routage
dynamique, ça se tient,
mais il faut reconnaitre que la doc FreeBSD est
vraiment merdique (depuis le temps que je cause d'envoyer un patch, il
va vraiment falloir que je le fasse...)
VANHULLEBUS Yvan <vanhu@nospam_free.fr> writes:
'Lut Yvan,
Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Gnagnagna ©
Avec de l'ipsec transport, si tu utilises un protocole de routage
dynamique, ça se tient,
mais il faut reconnaitre que la doc FreeBSD est
vraiment merdique (depuis le temps que je cause d'envoyer un patch, il
va vraiment falloir que je le fasse...)
VANHULLEBUS Yvan writes:
'Lut Yvan,Bon, je vais deja commencer par troller sur l'utilisation d'une
interface gif pour de l'IPSec....
Gnagnagna ©
Avec de l'ipsec transport, si tu utilises un protocole de routage
dynamique, ça se tient,
mais il faut reconnaitre que la doc FreeBSD est
vraiment merdique (depuis le temps que je cause d'envoyer un patch, il
va vraiment falloir que je le fasse...)
un lien?
Voir du coté de chez Fred, au hasard :
http://www.lacave.net/~fred/projets/racoon/config.html
un lien?
Voir du coté de chez Fred, au hasard :
http://www.lacave.net/~fred/projets/racoon/config.html
un lien?
Voir du coté de chez Fred, au hasard :
http://www.lacave.net/~fred/projets/racoon/config.html