Running Cisco ASDM under Linux

Recently I had the need to configure an ASA while onsite at a customer's office and while I have experience making changes through the console, it's a lot easier for some things to be configured through Cisco's ASDM. At the time, I was in a rush so instead of trying to get ASDM to run on Ubuntu, I ended up booting into Windows and gaining access that way. One of the advantages of carrying a triple-booted MacBook Pro.

Years ago, I remember being able to get ASDM to run on Linux, but it appears getting it to work has changed so I decided to write this post to help anyone else not wanting to rely on Windows to configure their Cisco devices. I'm using the latest release of Ubuntu 21.04 instead of the last LTS as most people will be connecting from their workstations and not their servers, but this should work on older versions of Ubuntu as well.

Download 64-bit Java Runtime Environment (JRE)

First off, you'll need to download the latest 64-bit Oracle JRE which contains the Java Web Start runtime we need. Unfortunately, the free OpenJDK doesn't include Java Web Start and the opensource version, OpenWebStart, doesn't seem to work with ASDM.

*NOTE: Oracle JRE is no longer free for commercial use. There are scenarios where you can still use it for free, but you must make that determination on your own. You can look at their FAQ for more info.

Go to https://java.com/en/download/ on your Linux workstation and click on the Linux x64 download link.

Next create the parent directory we'll be storing the JRE in by opening a terminal and running the following command.

mkdir ~/java

Now extract the downloaded JRE files to the newly created directory.

tar -xvf ~/Download/jre-8u291-linux-x64.tar.gz -C ~/java

*NOTE: The JRE version you download may be different from the one shown, so make sure to adjust the commands accordingly.

Launching ASDM

The Java Web Start runtime file we need to launch ASDM is ~/java/jre1.8.0_291/bin/javaws.

Within the terminal, run javaws and point it at the management URL of your Cisco ASA.

Make sure to change the IP address to the IP of your ASA.

~/java/jre1.8.0_291/bin/javaws https://192.168.1.1/admin/public/asdm.jnlp

You'll then be prompted with a Java security warning. Just select the checkbox and click Run.

Java Security Warning

Enter the device's credentials and click OK.

ASDM Login Prompt

You should then presented with the ASDM Dashboard and be ready to configure the crap out of your Cisco router.

ASDM Dashboard

ASDM Shortcuts

Desktop Launcher

If you have desktop icons enabled in Ubuntu, you'll automatically have an ASDM shortcut created for you the first time you successfully launch ASDM. You will, however, need to make a copy of this shortcut to bypass a security issue which disables the launcher after every use.

Right-click on the shortcut, click copy, then right-click on the desktop and paste. You can then delete the original shortcut.

Copy ASDM Shortcut

Now right-click on the shortcut and click Allow Launching.

Select Allow Launching

The shortcut will now turn into a much easier to identify ASDM Desktop Launcher.

ASDM Desktop Launcher

You can use this shortcut to connect to the ASDM of your router.

Command-Line Shortcut

The following shortcut will allow you to connect to the ASDM of any Cisco router which makes it much more flexible than the previous method.

I got the following tip from the Youtube video below by StormWind Studios while researching how to get ASDM to run on Linux. The first part of the video didn't work for me, but the tip on how to create a shortcut to launch ASDM works great.

Edit the .bashrc in your home directory and add the following code to the bottom of the file and Save.

# Cisco ASDM Launch Function
function asdm {
    ~/java/jre1.8.0_291/bin/javaws https://$1/admin/public/asdm.jnlp
}

Now relaunch your terminal and enter the following to launch ASDM.

asdm 192.168.1.1

You can use the command to launch the ASDM from any Cisco router be entering its IP.

Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Reddit
Reddit
Email this to someone
email
Print this page
Print

Please Share Me...I'm Lonely