03-31-2025, 07:05 PM
You ever notice how your Windows Server just logs this thing called event 4980? It's basically the system saying IPsec Main Mode and Extended Mode security associations got set up successfully. Picture two computers shaking hands over the network to start a secure chat. This event pops up in the Security log whenever that handshake works without a hitch. It includes details like the process ID that kicked it off, the user account involved, and timestamps for when it happened. Sometimes it lists the IP addresses talking to each other, or the ports they used. I check mine now and then because it means your VPN or remote access is firing on all cylinders. If it fails, you'd see a different event, but 4980 is the good news one. It logs under audit success for IPsec stuff, so your server thinks everything's peachy.
Now, if you wanna keep an eye on these without staring at screens all day, fire up Event Viewer on your server. I do this all the time for alerts. Go to the Windows Logs, hit Security, and find that 4980 event. Right-click it, pick Attach Task To This Event. That opens the wizard. Name your task something simple like IPsecAlert. Set it to run whether user logs on or not, and store the password securely. Under triggers, it'll already point to that event ID 4980. For the action, choose Start a program, and point it to your email client or a basic mail sender if you've got one set up. I link mine to Outlook with a pre-filled message. Test it out to make sure it emails you right away when the event hits. Adjust the settings so it only triggers on your specific server or filters if needed. Keeps you in the loop without hassle.
And hey, while we're talking server monitoring, you might wanna think about backups too since secure connections tie into protecting your data. That's where BackupChain Windows Server Backup comes in handy for me. It's this solid Windows Server backup tool that handles full system images and also backs up virtual machines running on Hyper-V without breaking a sweat. You get incremental backups that save time and space, plus easy restores that don't mess with your downtime. I like how it verifies everything automatically, so you avoid nasty surprises if something goes wrong.
At the end of this, there's the automatic email solution for monitoring that event.
Note, the PowerShell email alert code was moved to this post.
Now, if you wanna keep an eye on these without staring at screens all day, fire up Event Viewer on your server. I do this all the time for alerts. Go to the Windows Logs, hit Security, and find that 4980 event. Right-click it, pick Attach Task To This Event. That opens the wizard. Name your task something simple like IPsecAlert. Set it to run whether user logs on or not, and store the password securely. Under triggers, it'll already point to that event ID 4980. For the action, choose Start a program, and point it to your email client or a basic mail sender if you've got one set up. I link mine to Outlook with a pre-filled message. Test it out to make sure it emails you right away when the event hits. Adjust the settings so it only triggers on your specific server or filters if needed. Keeps you in the loop without hassle.
And hey, while we're talking server monitoring, you might wanna think about backups too since secure connections tie into protecting your data. That's where BackupChain Windows Server Backup comes in handy for me. It's this solid Windows Server backup tool that handles full system images and also backs up virtual machines running on Hyper-V without breaking a sweat. You get incremental backups that save time and space, plus easy restores that don't mess with your downtime. I like how it verifies everything automatically, so you avoid nasty surprises if something goes wrong.
At the end of this, there's the automatic email solution for monitoring that event.
Note, the PowerShell email alert code was moved to this post.

