Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Collaborator

Delete VPN tunnel from the CLI

Jump to solution

One of our customers is running two clusters of 1450 (R77.20.87, JHFA B990173042) managing a vpn connection to the central site with a VSX cluster (R80.30). The problem is that sometimes the 1450 does not delete IKE connections to the central site. Today, we saw 3 IKE connections running, only one of them with IPsec SAs. In these cases no packets pass to the central site.

I want to do some scripting to detect these situations. (I know: Pain in the a… on Embedded GAIA!) But the  "vpn tu" utility is very limited on SMB appliances. It lacks the "vpn tu del" functionality. Such, one must use the menu system of "vpn tu" to delete any vpn tunnel.

Does any possibility exist to delete a vpn tunnel from the command line within a bash script?

0 Kudos
Reply
1 Solution

Accepted Solutions
Champion
Champion
Spoiler
vpntu.png

Took about 15mins for a shell script dummy...

View solution in original post

0 Kudos
Reply
5 Replies
Champion
Champion

Yes - you have to write a bash script that will answer with the right numbers and letters for the command you need from the menue. This is possible in bash, i had an experienced collegue who did that for me (some time ago for another command).

Collaborator

Thanks. That is the answer I feared I would get. SMB with Embedded GIA remains being a pain in the a**.

0 Kudos
Reply
Champion
Champion

Dont be so hard on them 😎

Example was to enter y(es) upon command reboot:

(echo y ) | reboot

0 Kudos
Reply
Champion
Champion

Tried it yet ?

0 Kudos
Reply
Champion
Champion
Spoiler
vpntu.png

Took about 15mins for a shell script dummy...

View solution in original post

0 Kudos
Reply