So the next step is to add some IPv4 and IPv6
routes to this VPN test connection, and to do that,
we're going to use PowerShell.
So I'll open the PowerShell command window here,
and the command to add a route to a VPN connection is Add‑VpnConnectionRoute.
We'll have to supply the name, so the switch for that is ConnectionName,
and then the name of the profile.
If you're using spaces in your VPN profile name,
you would have to obviously put those in quotes,
I didn't need to do that here, but I did it anyway.
Then we'll supply the destination prefix switch, and this is the IPv4 or
IPv6 prefix that you want to route over the tunnel,
so I'll add a couple of examples here.
That's it.
So we've basically told the VPN that anything matching
172.16.0.0/16 goes over the tunnel.
So I'm going to add another route for my IPv6 prefix as well, and that's it.
So our routing is in place, and of course,
you can run as many Add‑VpnConnectionRoute commands as you need.
So if you have multiple subnets that you want to reach,
you can run multiple commands.
I would encourage you, of course, to summarize as much as possible.
You don't want to pound 50 or 100 routes in here,
try to summarize as much as you can, but ultimately,
any routes that you need to get to over the VPN tunnel need to be added here.
So the next thing we'll do is add our IPsec policy.
Once again,
we need to define the policy because the default policy for this VPN
Tunnel does not match what's configured on the server.
Now,
this command is a tad complex let's say so I have actually kind
of pre‑staged it here on the Notepad for you,
and I will walk you through this, and then I'm going to copy and paste it.
So the command is actually Set‑VpnConnectionIPsecConfiguration,
so the connection name is, of course,
the name of your Test VPN profile, and again,
if your profile name has spaces in it, you will need the quotes.
Then we would use the authentication transform constants, and
the setting here we're using is GCMAES128.
CipherTransformConstants are GCMAES128 as well.
We are using the ‑DHGroup 14, and Group14 here.
Group14 is an RSA 2048‑bit key.
Here is our encryption method, which is GCMAECS128.
Our integrity check method, which is SHA256.
Our perfect forward secrecy, or PFS, group we're using ECP256,
and we're adding the ‑Force switch here.
So I'm just going to copy all of this and I'm going to paste
it into this PowerShell command window, and that's it.
So at this point, we have our test VPN profile configured and ready to go, and so we'll fire up a quick test and see if everything's working.