Remote id in IKEv2-VPN created with DotRas

506 Views Asked by At

I need to submit a custom Remote id when connecting to a IKEv2-VPN created with DotRas but I haven't figured out any way of doing this.

Remote id is submitted, however it's just the IP that is submitted. I need to customize this.

This is the code that creates the connection:

    private void CreateConnection(String connectionName)
    {
        this.rasPhoneBook.Open(PHONEBOOK_PATH);
        RasEntry entry = RasEntry.CreateVpnEntry(connectionName, SERVER_ADDRESS,
            RasVpnStrategy.IkeV2Only,
            RasDevice.Create(connectionName, RasDeviceType.Vpn));
        this.rasPhoneBook.Entries.Add(entry);
    }

And this is where I connect:

    private void Connect()
    {
        // disconnect any lingering connections before connecting
        this.Disconnect();
        this.rasDialer.EntryName = this.serviceNameTextBox.Text;
        this.rasDialer.PhoneBookPath = PHONEBOOK_PATH;
        this.rasDialer.Credentials = new NetworkCredential(this.usernameTextBox.Text, 
            this.passwordTextBox.Text);
        this.rasDialer.DialAsync();
    }

Thanks for any help solving this.

0

There are 0 best solutions below