Lately I’ve been using Ansible to update configurations on my JunOS devices. Here’s a fun little script to get you started. It will print the configuration of the DHCP service on a JunOS device, then update the name-server DHCP option to something new. The following playbook uses the JunOS ansible role
Install with “
ansible-galaxy install Juniper.junos”
The structure of your inventory file should be like so —
Here’s the complete playbook. You’ll want to change the “Commit” option to “True” when ready to run. Run with:
sudo ansible-playbook -i your_inventory_file.yaml /path/to/ansible_junos_update_dhcp.yaml
Are you using a Pulse Secure VPN Appliance and need to roll out a connection profile update to clients, but don’t want to reinstall them all using MSI’s and command line parameters? Then you’ve come to the right post!
I recently encountered a situation where I had a need to update the connection profiles on a large number of clients using a Pulse Secure Appliance. According to documentation and a forum post, this isn’t possible to do programmatically. After doing a little research, I wrote a script that will do the following.
1. Confirm that your Pulse Preconfiguration file is accessible from the client’s location.
2. Check for an active VPN connection. If it’s active, the file will be copied locally before the connection is broken.
3. Read the local connection database (connstore.dat) and remove each existing connection.
4. Import your custom pulse configuration and start the client again.
Here’s the full script — Hope you find it useful!
The below configuration script can be used to setup a SRX 300 or similar Juniper Firewall with Dynamic VPN support. Continue reading “Setting up and debugging Dynamic VPN (Client-VPN) with LDAP on Juniper SRX 300”