This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ASG120 V7.502: how to reactivate site-to-site VPN using a script?

Hello, 
We are using several site-to-site ipsec connections. The problem is with 2 partners, that they do not reconnect after a failure.
I do not know why they are disconnected.
What I do at the moment: go into webadmin, deactivate/reactivate the tunnel, then it gets connected.
As it happens very often (daily) I'd like to use a script for this. 
(SSL Login to the ASG)
Does anyone know how?
Client: Windows XP
Astaro ASG120 FW: 7.502

Thank you in advance
Uwe


This thread was automatically locked due to age.
  • If astaro use ipsec similar to openswan the following should apply.

    You could setup a cron to run a script to do this.  You need to SSH into the device.

    You will need to find out the connection name of the VPN, I think this command should work ipsec auto --status

    Once you know the conn name you can use the following syntax to stop and start the tunnel.

    ipsec auto --down connection name
    ipsec auto --up connection name

    Once you have it scripted use cron to schedule it.
  • Astaro does use OpenSwan.  Uwe, can you post the part of your IPsec log where a cnnection fails?  Also, what it looks like when the remote site makes unsuccessful attempts to reconnect?  If you also could get the same information from the remote site for the same times, I bet we could help you find a way to prevent the disconnection or facilitate the reconnection that should occur automatically.

    Cheers - Bob
  • Hello Paul and Bob, 

    thank you for your answers, I will try both.
    I think it will take a bit longer to get the logfiles Bob, hope you are patient and we could solve the problem.
    Regards
    Uwe
  • Hello Paul, your idea is at least manually working, but still compicated, as I must login and change to root.. Thank you

    @Bob
    Now I have my logfiles from when I reactivated the connections and before. I get no logs from the partners, as both use Funkwerk routers, one r3000 and one r1200, could be a hint couldn't it? They have no syslog server installed and the funkwerk routers only provide a live log.
    I attach ipsec-2010-02-22.log.txt for the "KarlWessel" connection and ipsec-2010-02-24.log.txt for the "Viersen AHK" connection.
    The time and other information is at top of the logfiles.
    Hope you can help me.
    regards
    Uwe
    ipsec-2010-02-22.log.zip
  • Uwe, can you tell me what time to look for in these files?

    Cheers - Bob
  • @Bob:
    ipsec-2010-02-22.log.txt: I Disabled and enabled connection "S_REF_kfvRORQbYx_0" (KarlWessel) at 2010:02:22-13:40:18
    Before there were errors.
    ipsec-2010-02-24.log.txt: 2010:02:24-10:07:26 deactivated and reactivated Connection "Viersen AHK"
    I wrote it at the beginning inside the files
    Uwe