Updated: Dynamic IP issues with isakmpd

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christopher Hilton
Date: Saturday, August 29, 2009 - 2:05 pm

Per my earlier post I'm trying to debug an IPSec Tunnel between two  
Soekris boxes running OpenBSD 4.5. One side of the connection has  
static IP, the other is a DSL connection and uses dynamic IP. When the  
IP address changes the tunnel drops and the only way I've come up with  
to restore it is to log into the remote side and do the following  
shell commands:

      # kill $(cat /var/run/isakmpd.pid)
      # /sbin/isakmpd -K
      # /sbin/ipsecctl -f /etc/ipsec.conf

I just spent an hour working on the remote side and I've come up with  
more information on the problem. Particularly with isakmpd

My /etc/ipsec.conf looks like this:

my_fqdn="myfqdn.example.com"
my_ip="1.2.3.4"
my_network="192.168.64.0/24"

remote_fqdn="remotefqdn.example.com"
remote_ip="5.6.7.8"
remote_network="192.168.65.0/24"

ike dynamic esp from { $my_ip $my_network} \
         to { $remote_fqdn $remote_network} \
         local $my_ip peer $remote_fqdn \
         srcid $my_fqdn dstid $remote_fqdn

ike dynamic esp from $my_ip to $remote_fqdn \
         local $my_ip peer $remote_fqdn \
         srcid $my_fqdn dstid $remote_fqdn


Through dhclient-script and dhclient-exit-hooks I'm able to do this:

      # ipsecctl -F -D my_ip=${new_ip_address} -f /etc/ipsec.conf

At the time that dhclient changes my IP address but, this doesn't  
work. Isakmpd complains thusly:

Aug 29 16:19:53 stompbox isakmpd[14934]: udp_create: 1.2.3.4:500 must  
exist as a listener too
Aug 29 16:19:53 stompbox isakmpd[14934]: exchange_establish: transport  
"udp" for peer "peer-5.6.7.8-local-1.2.3.4" could not be created

I believe these messages are cause by the first call to isakmpd which  
happens before I know what IP address I have.

If I could get this piece of things to work I think that could solve  
the rest of my problems by just running ddclient as a daemon with a  
timeout of 5 minutes.

Again, Thanks for any assistance

-- Chris

P.S. my earlier post is below.

On Aug 29, 2009, at 2:09 PM, Christopher Hilton wrote:

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Dynamic IP issues, Christopher Hilton, (Sat Aug 29, 11:09 am)
Updated: Dynamic IP issues with isakmpd, Christopher Hilton, (Sat Aug 29, 2:05 pm)